Mailtea API keys API

The API keys API from Mailtea — 3 operation(s) for api keys.

GitHub OpenAPI

Operations 4

GET /v1/api-keys List API Keys #
POST /v1/api-keys Create API Key #
DELETE /v1/api-keys/{id} Revoke API Key #
GET /v1/api-keys/current Get Current API Key #

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-api-keys-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-api-keys-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mailtea API keys 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: API Keys
paths:
  /v1/api-keys:
    get:
      operationId: listApiKeys
      summary: List API Keys
      description: 'List all active API keys for your organization


        List all active (non-revoked) API keys for the authenticated user''s organization.'
      tags:
      - API Keys
      externalDocs:
        url: https://docs.mailtea.app/docs/api-reference/api-keys/list-api-keys
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Array of API key objects.
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique key identifier.
                        name:
                          type: string
                          description: Label assigned when the key was created.
                        mode:
                          type: string
                          description: '`live` or `test`. A test key never delivers mail — see [Test mode](/docs/documentation/test-mode).'
                        created_at:
                          type: string
                          description: ISO 8601 creation timestamp.
              example:
                data:
                - id: tok_abc123def456
                  name: Production sending key
                  mode: live
                  created_at: '2026-03-28T10:30:00.000Z'
                - id: tok_ghi789jkl012
                  name: CI test key
                  mode: test
                  created_at: '2026-03-25T14:00:00.000Z'
        '401':
          description: Unauthorized — missing or invalid token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden — token does not have `settings:write` scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth:
        - settings:write
      x-mailtea-scopes:
      - settings:write
    post:
      operationId: createApiKey
      summary: Create API Key
      description: 'Create a new API key for programmatic access


        Create a new API key. The full token is only returned once on creation — store it securely, as it cannot be retrieved later.'
      tags:
      - API Keys
      externalDocs:
        url: https://docs.mailtea.app/docs/api-reference/api-keys/create-api-key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: A label for the key. 1–50 characters.
                permission:
                  type: string
                  description: Access level. `full_access` (default), `sending_access`, `drafts_only` or `drafts_and_templates`.
                domain_id:
                  type: string
                  description: Publication ID to scope the key to. Only valid with `sending_access`, `drafts_only` or `drafts_and_templates`. Must be a publication you are a member of. A key that is itself scoped to one publication must pass that publication here.
                mode:
                  type: string
                  description: '`live` (default) or `test`. A test key validates and records sends exactly like a live one but never delivers them — see [Test mode](/docs/documentation/test-mode). Its token begins `mt_test_`.'
              required:
              - name
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique key identifier. Use this to revoke the key later.
                  token:
                    type: string
                    description: The full bearer token. **Only returned once** — save it immediately.
                  mode:
                    type: string
                    description: '`live` or `test`.'
              example:
                id: tok_abc123def456
                token: mt_pat_tok_abc123def456_aBcDeFgHiJkLmNoPqRsTuVwXyZ
                mode: live
        '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. The token lacks `settings:write`; the requested `permission` would grant scopes the calling token does not hold; the calling token is a test key (`reason: "test_mode_unsupported"`, since a test key cannot mint keys of either mode); the account''s email is unverified (`Verify your email address to create API keys…`); or the calling key is scoped to one publication and the new key would not be scoped to that same publication.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: '`domain_id` is not a publication you are a member of.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth:
        - settings:write
      x-mailtea-scopes:
      - settings:write
  /v1/api-keys/{id}:
    delete:
      operationId: revokeApiKey
      summary: Revoke API Key
      description: 'Revoke an API key to permanently disable it


        Revoke an API key. Once revoked, the key can no longer be used for authentication. This action is permanent.'
      tags:
      - API Keys
      externalDocs:
        url: https://docs.mailtea.app/docs/api-reference/api-keys/revoke-api-key
      parameters:
      - name: id
        in: path
        required: true
        description: The unique identifier of the API key to revoke.
        schema:
          type: string
      responses:
        '200':
          description: OK
        '401':
          description: Unauthorized — missing or invalid token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden — token does not have `settings:write` scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found — key does not exist or belongs to a different organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth:
        - settings:write
      x-mailtea-scopes:
      - settings:write
  /v1/api-keys/current:
    get:
      operationId: currentApiKey
      summary: Get Current API Key
      description: 'What the key making the request is for


        Describe the API key making the request: its team, the publication it is scoped to and that publication''s receiving domain, its scopes, whether it is live or test, and the team''s plan limits. An app that is handed a key calls this first, so nobody has to copy ids out of Mailtea Studio.'
      tags:
      - API Keys
      externalDocs:
        url: https://docs.mailtea.app/docs/api-reference/api-keys/current-api-key
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    description: Always `"api_key"`.
                  id:
                    type: string
                    description: The key's id. For an OAuth connection, `oauth:<clientId>`.
                  mode:
                    type: string
                    description: '`live` or `test`.'
                  scopes:
                    type: array
                    items:
                      type: string
                    description: What the key may do. See [API keys](/docs/documentation/api-keys#scopes).
                  publication:
                    type:
                    - object
                    - 'null'
                    description: The publication the key is scoped to, or `null` for a key that reaches the whole team.
                    properties:
                      receiving_domain:
                        type:
                        - string
                        - 'null'
                        description: The publication's Mailtea-managed receiving domain (any address at it reaches the publication), or `null` when it has none. See [Receiving domains](/docs/api-reference/inbound/receiving-domains).
                  plan:
                    type: object
                    properties:
                      ramp:
                        type:
                        - object
                        - 'null'
                        description: 'A new team''s daily limit, on every plan, for its first week by default: `daily_limit` and `ends_at`. `null` once it is over.'
              example:
                object: api_key
                id: tok_a1b2c3
                mode: live
                scopes:
                - issues:read
                - issues:write
                - issues:send
                team:
                  id: org_123
                  name: Acme
                publication:
                  id: pub_456
                  name: Acme Support
                  receiving_domain: calm-harbor.mailtea.email
                plan:
                  key: free
                  name: Free
                  daily_limit: 100
                  monthly_limit: 3000
                  ramp:
                    daily_limit: 1000
                    ends_at: '2026-10-22T09:00:00.000Z'
        '400':
          description: The request was made with a Studio sign-in rather than an API key (`reason` `not_an_api_key`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
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