Mailtea Webhooks API

The Webhooks API from Mailtea — 2 operation(s) for webhooks.

GitHub OpenAPI

Operations 5

GET /v1/webhooks/endpoints List Webhooks #
POST /v1/webhooks/endpoints Create Webhook #
DELETE /v1/webhooks/endpoints/{id} Delete Webhook #
GET /v1/webhooks/endpoints/{id} Retrieve Webhook #
PATCH /v1/webhooks/endpoints/{id} Update Webhook #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mailtea-app:mailtea-app-webhooks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mailtea-app-webhooks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mailtea Webhooks API
  version: 0.24.0
  summary: Send transactional and marketing email, manage contacts and audiences, verify sending domains, render templates, and subscribe to webhook events.
  description: Every endpoint lives under `/v1` and takes a Bearer token (`mt_pat_…` personal access token, `mt_svc_…` service key, or `mt_test_…` test key) in the `Authorization` header. The required scopes are listed per operation. This document is generated from the API reference at https://docs.mailtea.app/docs/api-reference.
  termsOfService: https://mailtea.app/terms
  contact:
    name: Mailtea
    url: https://mailtea.app
    email: support@mailtea.app
  license:
    name: AGPL-3.0-only
    identifier: AGPL-3.0-only
servers:
- url: https://api.mailtea.app
  description: Mailtea cloud
tags:
- name: Webhooks
paths:
  /v1/webhooks/endpoints:
    get:
      operationId: listWebhooks
      summary: List Webhooks
      description: 'Retrieve a list of webhook endpoints for a publication


        Retrieve a paginated list of webhook endpoints for a publication. The `signing_secret` is not included in list responses — use Retrieve Webhook to get it.'
      tags:
      - Webhooks
      externalDocs:
        url: https://docs.mailtea.app/docs/api-reference/webhooks/list-webhooks
      parameters:
      - name: publication_id
        in: query
        required: true
        description: The publication to list webhooks for.
        schema:
          type: string
      - name: limit
        in: query
        required: false
        description: Number of webhooks to return. Min 1, max 100. Default 20.
        schema:
          type: number
      - name: after
        in: query
        required: false
        description: Cursor for forward pagination.
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                object: list
                data:
                - object: webhook
                  id: whk_abc123
                  publication_id: pub_abc123
                  endpoint: https://example.com/webhooks/mailtea
                  events:
                  - email.delivered
                  - email.bounced
                  status: enabled
                  mode_filter: all
                  created_at: '2026-03-30T10:00:00.000Z'
                  updated_at: '2026-03-30T10:00:00.000Z'
                has_more: false
        '400':
          description: Missing `publication_id` query parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized — missing or invalid token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden — insufficient permissions or publication not owned by your organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth:
        - webhooks:read
      x-mailtea-scopes:
      - webhooks:read
    post:
      operationId: createWebhook
      summary: Create Webhook
      description: 'Create a new webhook endpoint that listens for events


        Create a new webhook endpoint. Webhooks allow you to receive real-time HTTP notifications when events happen in your publication. The response includes a `signing_secret` that you should store securely to verify webhook payloads.'
      tags:
      - Webhooks
      externalDocs:
        url: https://docs.mailtea.app/docs/api-reference/webhooks/create-webhook
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                publication_id:
                  type: string
                  description: The publication to create the webhook for.
                endpoint:
                  type: string
                  description: The URL where webhook events will be sent. Must be a valid HTTPS URL. Max 2048 characters.
                events:
                  type: array
                  description: Array of event types to subscribe to. At least one event is required.
                mode_filter:
                  type: string
                  description: 'Which mail this endpoint hears about — `all` (default), `live`, or `test`. Email-only: `contact.*` and `automation.*` events are always `live`, so an endpoint set to `test` receives none of them. See [Test mode](/docs/documentation/test-mode).'
              required:
              - publication_id
              - endpoint
              - events
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    description: Always `"webhook"`.
                  id:
                    type: string
                    description: Unique webhook identifier.
                  publication_id:
                    type: string
                    description: The publication this webhook belongs to.
                  endpoint:
                    type: string
                    description: The URL that receives events.
                  events:
                    type: array
                    description: Subscribed event types.
                  signing_secret:
                    type: string
                    description: HMAC signing secret for payload verification. Only returned on create and retrieve.
                  status:
                    type: string
                    description: '`enabled` or `disabled`.'
                  mode_filter:
                    type: string
                    description: '`all`, `live`, or `test`. Which mail this endpoint hears about — see [Test mode](/docs/documentation/test-mode).'
                  created_at:
                    type: string
                    description: ISO 8601 creation timestamp.
                  updated_at:
                    type: string
                    description: ISO 8601 last-updated timestamp.
              example:
                object: webhook
                id: whk_abc123
                publication_id: pub_abc123
                endpoint: https://example.com/webhooks/mailtea
                events:
                - email.delivered
                - email.bounced
                - email.complained
                signing_secret: whsec_abc123...
                status: enabled
                mode_filter: all
                created_at: '2026-03-30T10:00:00.000Z'
                updated_at: '2026-03-30T10:00:00.000Z'
        '400':
          description: Validation failed — missing or invalid fields.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized — missing or invalid token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden — insufficient permissions or publication not owned by your organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Publication not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth:
        - webhooks:write
      x-mailtea-scopes:
      - webhooks:write
  /v1/webhooks/endpoints/{id}:
    delete:
      operationId: deleteWebhook
      summary: Delete Webhook
      description: 'Permanently delete a webhook endpoint


        Permanently delete a webhook endpoint. Events will no longer be sent to this URL.'
      tags:
      - Webhooks
      externalDocs:
        url: https://docs.mailtea.app/docs/api-reference/webhooks/delete-webhook
      parameters:
      - name: id
        in: path
        required: true
        description: The webhook ID.
        schema:
          type: string
      - name: publication_id
        in: query
        required: true
        description: The publication that owns this webhook.
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                object: webhook
                id: whk_abc123
                deleted: true
        '401':
          description: Unauthorized — missing or invalid token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden — insufficient permissions or publication not owned by your organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Webhook not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth:
        - webhooks:write
      x-mailtea-scopes:
      - webhooks:write
    get:
      operationId: retrieveWebhook
      summary: Retrieve Webhook
      description: 'Retrieve a single webhook endpoint with its signing secret


        Retrieve a single webhook endpoint by ID. This endpoint returns the `signing_secret`, which can be used to verify webhook payloads.'
      tags:
      - Webhooks
      externalDocs:
        url: https://docs.mailtea.app/docs/api-reference/webhooks/retrieve-webhook
      parameters:
      - name: id
        in: path
        required: true
        description: The webhook ID.
        schema:
          type: string
      - name: publication_id
        in: query
        required: true
        description: The publication that owns this webhook.
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                object: webhook
                id: whk_abc123
                publication_id: pub_abc123
                endpoint: https://example.com/webhooks/mailtea
                events:
                - email.delivered
                - email.bounced
                - email.complained
                signing_secret: whsec_abc123...
                status: enabled
                mode_filter: all
                created_at: '2026-03-30T10:00:00.000Z'
                updated_at: '2026-03-30T10:00:00.000Z'
        '400':
          description: Missing `publication_id` query parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized — missing or invalid token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden — insufficient permissions or publication not owned by your organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Webhook not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth:
        - webhooks:read
      x-mailtea-scopes:
      - webhooks:read
    patch:
      operationId: updateWebhook
      summary: Update Webhook
      description: 'Update a webhook endpoint''s URL, events, or status


        Update an existing webhook endpoint. You can change the endpoint URL, the subscribed events, or enable/disable the webhook. All fields are optional — only include the fields you want to change.'
      tags:
      - Webhooks
      externalDocs:
        url: https://docs.mailtea.app/docs/api-reference/webhooks/update-webhook
      parameters:
      - name: id
        in: path
        required: true
        description: The webhook ID.
        schema:
          type: string
      - name: publication_id
        in: query
        required: true
        description: The publication that owns this webhook.
        schema:
          type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                endpoint:
                  type: string
                  description: New endpoint URL. Must be a valid HTTPS URL. Max 2048 characters.
                events:
                  type: array
                  description: New list of event types. Replaces the existing list. At least one event is required.
                status:
                  type: string
                  description: '`enabled` or `disabled`.'
                mode_filter:
                  type: string
                  description: 'Which mail this endpoint hears about — `all` (default), `live`, or `test`. Email-only: `contact.*` and `automation.*` events are always `live`, so an endpoint set to `test` receives none of them. See [Test mode](/docs/documentation/test-mode).'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                object: webhook
                id: whk_abc123
                publication_id: pub_abc123
                endpoint: https://example.com/webhooks/mailtea
                events:
                - email.delivered
                - email.bounced
                - email.opened
                signing_secret: whsec_abc123...
                status: enabled
                mode_filter: all
                created_at: '2026-03-30T10:00:00.000Z'
                updated_at: '2026-03-30T12:00:00.000Z'
        '400':
          description: Validation failed — invalid URL, event type, or status.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized — missing or invalid token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden — insufficient permissions or publication not owned by your organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Webhook not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth:
        - webhooks:write
      x-mailtea-scopes:
      - webhooks:write
components:
  schemas:
    Error:
      type: object
      description: Every error body carries `error`; validation failures add `details` and some refusals add a machine-readable `code`.
      properties:
        error:
          type: string
        code:
          type: string
        details:
          type: array
          items:
            type: object
      required:
      - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A Mailtea API key. Scopes such as `contacts:write` are properties of the key, chosen when it is created; each operation lists the scope it needs under `x-mailtea-scopes`. See https://docs.mailtea.app/docs/api-reference/authentication.
externalDocs:
  description: API reference
  url: https://docs.mailtea.app/docs/api-reference