Mailtea Topics API
The Topics API from Mailtea — 2 operation(s) for topics.
The Topics API from Mailtea — 2 operation(s) for topics.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/mailtea-app:mailtea-app-topics-api"
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.
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: 3.2.0
info:
title: Mailtea Topics 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: Topics
paths:
/v1/topics:
get:
operationId: listTopics
summary: List Topics
description: 'List topics for a publication with cursor-based pagination
List all topics for a publication, ordered by newest first. Results are paginated using cursor-based pagination.'
tags:
- Topics
externalDocs:
url: https://docs.mailtea.app/docs/api-reference/topics/list-topics
parameters:
- name: publication_id
in: query
required: true
description: Filter to a specific publication.
schema:
type: string
- name: limit
in: query
required: false
description: Number of results per page. 1–100, default `20`.
schema:
type: number
- name: after
in: query
required: false
description: Pagination cursor from a previous response's `next_cursor`.
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
object:
type: string
description: Always `"list"`.
data:
type: array
description: Array of topic objects.
items:
type: object
properties:
object:
type: string
description: Always `"topic"`.
id:
type: string
description: Unique topic identifier.
publication_id:
type: string
description: The publication this topic belongs to.
name:
type: string
description: Topic name.
description:
type: string
description: Topic description.
default_subscription:
type: string
description: '`opt_in` or `opt_out`.'
visibility:
type: string
description: '`public` or `private`.'
created_at:
type: string
description: ISO 8601 creation timestamp.
updated_at:
type: string
description: ISO 8601 last-updated timestamp.
has_more:
type: boolean
description: Whether additional pages exist.
next_cursor:
type: string
description: Cursor to pass as the `after` query parameter for the next page. Only present when `has_more` is `true`.
example:
object: list
data:
- object: topic
id: tag_abc123
publication_id: pub_abc123
name: Product Updates
description: Updates about new product features
default_subscription: opt_in
visibility: public
created_at: '2026-03-29T10:00:00.000Z'
updated_at: '2026-03-29T10:00:00.000Z'
- object: topic
id: tag_def456
publication_id: pub_abc123
name: Weekly Digest
description: Weekly summary of top content
default_subscription: opt_out
visibility: public
created_at: '2026-03-29T09:00:00.000Z'
updated_at: '2026-03-29T09:00:00.000Z'
has_more: false
'400':
description: Missing required `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 — publication not owned by your organization.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- bearerAuth:
- contacts:read
- bearerAuth:
- issues:write
x-mailtea-scopes:
- contacts:read
- issues:write
post:
operationId: createTopic
summary: Create Topic
description: 'Create a new topic for a publication
Create a new topic for a publication. Topics let contacts manage their subscription preferences at a granular level. Each topic controls whether new contacts are opted in or out by default, and whether the topic is visible to contacts on their preference page.'
tags:
- Topics
externalDocs:
url: https://docs.mailtea.app/docs/api-reference/topics/create-topic
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
publication_id:
type: string
description: The publication to create the topic in.
name:
type: string
description: Topic name. 1–50 characters. Must be unique within the publication.
default_subscription:
type: string
description: 'Whether new contacts are automatically subscribed: `opt_in` or `opt_out`.'
description:
type: string
description: Human-readable description. Max 200 characters.
visibility:
type: string
description: 'Whether contacts can see and manage this topic: `public` or `private`. Defaults to `private`.'
required:
- publication_id
- name
- default_subscription
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
object:
type: string
description: Always `"topic"`.
id:
type: string
description: Unique topic identifier.
publication_id:
type: string
description: The publication this topic belongs to.
name:
type: string
description: Topic name.
description:
type: string
description: Topic description.
default_subscription:
type: string
description: '`opt_in` or `opt_out`.'
visibility:
type: string
description: '`public` or `private`.'
created_at:
type: string
description: ISO 8601 creation timestamp.
updated_at:
type: string
description: ISO 8601 last-updated timestamp.
example:
object: topic
id: tag_abc123
publication_id: pub_abc123
name: Product Updates
description: Updates about new product features
default_subscription: opt_in
visibility: public
created_at: '2026-03-29T10:00:00.000Z'
updated_at: '2026-03-29T10: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'
'409':
description: Conflict — a topic with this name already exists in the publication.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- bearerAuth:
- contacts:write
x-mailtea-scopes:
- contacts:write
/v1/topics/{id}:
delete:
operationId: deleteTopic
summary: Delete Topic
description: 'Permanently delete a topic
Permanently delete a topic. This action cannot be undone.'
tags:
- Topics
externalDocs:
url: https://docs.mailtea.app/docs/api-reference/topics/delete-topic
parameters:
- name: id
in: path
required: true
description: The topic ID.
schema:
type: string
- name: publication_id
in: query
required: true
description: The publication the topic belongs to.
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
object:
type: string
description: Always `"topic"`.
id:
type: string
description: The deleted topic's identifier.
deleted:
type: boolean
description: Always `true`.
example:
object: topic
id: tag_abc123
deleted: true
'400':
description: Missing required `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: Topic not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- bearerAuth:
- contacts:write
x-mailtea-scopes:
- contacts:write
get:
operationId: retrieveTopic
summary: Retrieve Topic
description: 'Retrieve a single topic by ID
Retrieve a single topic by its ID.'
tags:
- Topics
externalDocs:
url: https://docs.mailtea.app/docs/api-reference/topics/retrieve-topic
parameters:
- name: id
in: path
required: true
description: The topic ID.
schema:
type: string
- name: publication_id
in: query
required: true
description: The publication the topic belongs to.
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
object:
type: string
description: Always `"topic"`.
id:
type: string
description: Unique topic identifier.
publication_id:
type: string
description: The publication this topic belongs to.
name:
type: string
description: Topic name.
description:
type: string
description: Topic description.
default_subscription:
type: string
description: '`opt_in` or `opt_out`.'
visibility:
type: string
description: '`public` or `private`.'
created_at:
type: string
description: ISO 8601 creation timestamp.
updated_at:
type: string
description: ISO 8601 last-updated timestamp.
example:
object: topic
id: tag_abc123
publication_id: pub_abc123
name: Product Updates
description: Updates about new product features
default_subscription: opt_in
visibility: public
created_at: '2026-03-29T10:00:00.000Z'
updated_at: '2026-03-29T10:00:00.000Z'
'400':
description: Missing required `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 — publication not owned by your organization.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Topic not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- bearerAuth:
- contacts:read
- bearerAuth:
- issues:write
x-mailtea-scopes:
- contacts:read
- issues:write
patch:
operationId: updateTopic
summary: Update Topic
description: 'Update a topic''s name, description, subscription default, or visibility
Update an existing topic. You can change its name, description, default subscription behavior, and visibility. If you change the name, it must still be unique within the publication.'
tags:
- Topics
externalDocs:
url: https://docs.mailtea.app/docs/api-reference/topics/update-topic
parameters:
- name: id
in: path
required: true
description: The topic ID.
schema:
type: string
- name: publication_id
in: query
required: true
description: The publication the topic belongs to.
schema:
type: string
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: Updated topic name. 1–50 characters. Must be unique within the publication.
description:
type: string
description: Updated description. Max 200 characters.
default_subscription:
type: string
description: 'Updated subscription default: `opt_in` or `opt_out`.'
visibility:
type: string
description: 'Updated visibility: `public` or `private`.'
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
object:
type: string
description: Always `"topic"`.
id:
type: string
description: Unique topic identifier.
publication_id:
type: string
description: The publication this topic belongs to.
name:
type: string
description: Topic name.
description:
type: string
description: Topic description.
default_subscription:
type: string
description: '`opt_in` or `opt_out`.'
visibility:
type: string
description: '`public` or `private`.'
created_at:
type: string
description: ISO 8601 creation timestamp.
updated_at:
type: string
description: ISO 8601 last-updated timestamp.
example:
object: topic
id: tag_abc123
publication_id: pub_abc123
name: Product News
description: Updates about new product features
default_subscription: opt_out
visibility: public
created_at: '2026-03-29T10:00:00.000Z'
updated_at: '2026-03-29T12:00:00.000Z'
'400':
description: Validation failed — invalid fields or missing `publication_id`.
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: Topic not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: Conflict — a topic with this name already exists in the publication.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- bearerAuth:
- contacts:write
x-mailtea-scopes:
- contacts: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