Mailtea Unsubscribe API

The Unsubscribe API from Mailtea — 1 operation(s) for unsubscribe.

GitHub OpenAPI

Operations 2

GET /v1/public/unsubscribe/{token} Get Unsubscribe Page #
POST /v1/public/unsubscribe/{token} Update Unsubscribe #

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-unsubscribe-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-unsubscribe-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mailtea Unsubscribe 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: Unsubscribe
paths:
  /v1/public/unsubscribe/{token}:
    get:
      operationId: getUnsubscribePage
      summary: Get Unsubscribe Page
      description: 'Read a recipient''s status and topic preferences by unsubscribe token


        Return the data behind a recipient''s hosted preference page: their current subscription status and their per-topic preferences. This endpoint **never mutates** — link prefetchers and mail-security scanners can safely open it.


        A browser request (one that sends `Accept: text/html`) is redirected (`302`) to the branded web page at `{web}/unsubscribe/{token}`. To get the JSON payload below, send `Accept: application/json`.'
      tags:
      - Unsubscribe
      externalDocs:
        url: https://docs.mailtea.app/docs/api-reference/unsubscribe/get-unsubscribe-page
      parameters:
      - name: token
        in: path
        required: true
        description: The recipient's unsubscribe token, from the email's unsubscribe link.
        schema:
          type: string
      - name: topic
        in: query
        required: false
        description: A public topic ID to focus on the page. When it matches one of the recipient's topics, it is echoed back as `focusTopicId`; an unknown or non-public value is ignored.
        schema:
          type: string
      - name: tag
        in: query
        required: false
        description: Pre-rename spelling of `topic`. Accepted forever — this parameter is baked into already-delivered mail. `topic` wins when both are present.
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    description: Always `true` for a valid token.
                  email:
                    type: string
                    description: The recipient's email address.
                  publicationName:
                    type: string
                    description: The publication's name.
                  status:
                    type: string
                    description: 'The recipient''s global subscription status: `active`, `unsubscribed`, or `suppressed`.'
                  topics:
                    type: array
                    description: One entry per public topic. Empty when the publication has no public topics.
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: The topic ID. Pass this back as a topic `id` when saving preferences.
                        name:
                          type: string
                          description: The topic name shown to the recipient.
                        description:
                          type: string
                          description: The topic description shown to the recipient.
                        subscribed:
                          type: boolean
                          description: Whether the recipient is currently subscribed to this topic — their explicit choice if set, otherwise the topic's default.
                  focusTopicId:
                    type:
                    - string
                    - 'null'
                    description: The topic to highlight when the request carried a valid `?topic=` (or legacy `?tag=`), else `null`.
                  branding:
                    type: object
                    description: 'Presentation fields for the hosted page (logo, accent color, tagline, and whether to show the "Powered by Mailtea" badge). `accentColor` is the publication''s stored site setting, kept for existing integrations: Mailtea''s own hosted page and public site take their colors from the Website Builder theme, and Mailtea Studio no longer edits this value.'
              example:
                ok: true
                email: reader@example.com
                publicationName: Acme News
                status: active
                topics:
                - id: tag_product
                  name: Product updates
                  description: New features and product news.
                  subscribed: true
                - id: tag_events
                  name: Events
                  description: Webinars and meetups.
                  subscribed: false
                focusTopicId: null
                branding:
                  logoUrl: null
                  accentColor: '#000000'
                  tagline: ''
                  showPoweredByBadge: true
        '404':
          description: Invalid unsubscribe token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security: []
    post:
      operationId: updateUnsubscribe
      summary: Update Unsubscribe
      description: 'Unsubscribe, resubscribe, or save topic preferences by unsubscribe token


        Apply a change to a recipient''s subscription. The body (and the optional `?topic=` query parameter) selects one of four actions, evaluated in this order:


        1. **Group-scoped one-click** — a `topic` (query `?topic=` or body `topic`) opts the recipient **out of that one topic**, leaving their global subscription untouched. This is what a `List-Unsubscribe` one-click POST hits when the email carried a public topic, so a mail client''s "unsubscribe" stops just that stream.

        2. **Save topic preferences** — a `topics` array sets the recipient''s per-topic choices. The global subscription is untouched.

        3. **Resubscribe** — `{ "resubscribe": true }` re-activates a previously unsubscribed recipient.

        4. **Global unsubscribe** — an empty body (or any body that matches none of the above) unsubscribes the recipient from the whole publication. A bare one-click POST with no JSON body lands here.'
      tags:
      - Unsubscribe
      externalDocs:
        url: https://docs.mailtea.app/docs/api-reference/unsubscribe/update-unsubscribe
      parameters:
      - name: token
        in: path
        required: true
        description: The recipient's unsubscribe token, from the email's unsubscribe link or `List-Unsubscribe` header.
        schema:
          type: string
      - name: topic
        in: query
        required: false
        description: A public topic ID for a group-scoped unsubscribe. Takes precedence over the body.
        schema:
          type: string
      - name: tag
        in: query
        required: false
        description: Pre-rename spelling of `topic`. Accepted forever — this parameter is baked into the `List-Unsubscribe` links of already-delivered mail. `topic` wins when both are present.
        schema:
          type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                topic:
                  type: string
                  description: A public topic ID for a group-scoped unsubscribe (same as the `?topic=` query parameter).
                tag:
                  type: string
                  description: Pre-rename spelling of `topic`, accepted forever.
                topics:
                  type: array
                  description: 'Per-topic preferences: `[{ "id": "<topic_id>", "subscribed": <boolean> }]`. Only public topics of the recipient''s publication are applied; unknown, private, or cross-publication IDs are ignored.'
                resubscribe:
                  type: boolean
                  description: '`true` re-activates the recipient.'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                ok: true
                status: unsubscribed
        '404':
          description: Invalid unsubscribe token, or a `topic` that is not a public topic of the recipient's publication (`Unknown unsubscribe group`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security: []
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