Mailtea Contacts API
The Contacts API from Mailtea — 3 operation(s) for contacts.
The Contacts API from Mailtea — 3 operation(s) for contacts.
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-contacts-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 Contacts 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: Contacts
paths:
/v1/contacts:
get:
operationId: listContacts
summary: List Contacts
description: 'List contacts for a publication with cursor-based pagination
List contacts for a publication, ordered by newest first. Results are paginated using cursor-based pagination.'
tags:
- Contacts
externalDocs:
url: https://docs.mailtea.app/docs/api-reference/contacts/list-contacts
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
- name: status
in: query
required: false
description: 'Filter by status: `active`, `unsubscribed`, or `suppressed`.'
schema:
type: string
- name: search
in: query
required: false
description: Search contacts by email address. Part of an address (`reader@`, `example.com`) matches every contact whose address contains it. Several whole addresses separated by commas, spaces or line breaks (`kai@example.com, mia@example.com`) return exactly those contacts, up to 200 at once. The same rule applies in Mailtea Studio and the MCP `contact.list` tool.
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 contact objects.
items:
type: object
properties:
object:
type: string
description: Always `"contact"`.
id:
type: string
description: Unique contact identifier.
publication_id:
type: string
description: The publication this contact belongs to.
email:
type: string
description: Contact email address.
status:
type: string
description: One of `active`, `unsubscribed`, `suppressed`.
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: contact
id: con_abc123
publication_id: pub_abc123
email: reader@example.com
status: active
created_at: '2026-03-28T10:00:00.000Z'
updated_at: '2026-03-28T10:00:00.000Z'
has_more: true
next_cursor: eyJ0IjoiMjAyNi0wMy0yOFQxMDowMDowMC4wMDBaIiwiaSI6ImNvbl9hYmMxMjMifQ
'400':
description: 'Missing required `publication_id` query parameter, or a `search` list that cannot be run as given (`reason: "invalid_search"`): an entry that is not a whole address, or more than 200 addresses. The `error` names the entry or the count.'
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
x-mailtea-scopes:
- contacts:read
post:
operationId: createContact
summary: Create Contact
description: 'Add a new contact to a publication
Create a new contact for a publication. If a contact with the same email already exists, it is reactivated. You can optionally set the contact''s status.'
tags:
- Contacts
externalDocs:
url: https://docs.mailtea.app/docs/api-reference/contacts/create-contact
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
publication_id:
type: string
description: The publication to add the contact to.
email:
type: string
description: Contact email address.
status:
type: string
description: 'Initial status: `active` (default), `unsubscribed`, or `suppressed`.'
required:
- publication_id
- email
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
object:
type: string
description: Always `"contact"`.
id:
type: string
description: Unique contact identifier.
publication_id:
type: string
description: The publication this contact belongs to.
email:
type: string
description: Contact email address.
status:
type: string
description: One of `active`, `unsubscribed`, `suppressed`.
created_at:
type: string
description: ISO 8601 creation timestamp.
updated_at:
type: string
description: ISO 8601 last-updated timestamp.
example:
object: contact
id: con_abc123
publication_id: pub_abc123
email: reader@example.com
status: active
created_at: '2026-03-28T10:00:00.000Z'
updated_at: '2026-03-28T10: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: 'Contact limit reached — the team''s plan is at its contact cap. The response is `{ "error": "Contact limit reached (N). Upgrade to add more contacts." }`, where `N` is the cap.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Publication not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- bearerAuth:
- contacts:write
x-mailtea-scopes:
- contacts:write
/v1/contacts/{id}:
delete:
operationId: deleteContact
summary: Delete Contact
description: 'Permanently delete a contact from a publication
Permanently delete a contact. The `:id` parameter accepts either a contact ID or an email address. This action cannot be undone.'
tags:
- Contacts
externalDocs:
url: https://docs.mailtea.app/docs/api-reference/contacts/delete-contact
parameters:
- name: id
in: path
required: true
description: The contact ID or email address. When using an email, URL-encode the `@` as `%40`.
schema:
type: string
- name: publication_id
in: query
required: true
description: The publication the contact belongs to.
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
object:
type: string
description: Always `"contact"`.
id:
type: string
description: The deleted contact's identifier.
deleted:
type: boolean
description: Always `true`.
example:
object: contact
id: con_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: Contact not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- bearerAuth:
- contacts:write
x-mailtea-scopes:
- contacts:write
get:
operationId: retrieveContact
summary: Retrieve Contact
description: 'Get details of a single contact by ID or email
Retrieve the details of a single contact. The `:id` parameter accepts either a contact ID or an email address.'
tags:
- Contacts
externalDocs:
url: https://docs.mailtea.app/docs/api-reference/contacts/retrieve-contact
parameters:
- name: id
in: path
required: true
description: The contact ID or email address. When using an email, URL-encode the `@` as `%40`.
schema:
type: string
- name: publication_id
in: query
required: true
description: The publication the contact belongs to.
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
object:
type: string
description: Always `"contact"`.
id:
type: string
description: Unique contact identifier.
publication_id:
type: string
description: The publication this contact belongs to.
email:
type: string
description: Contact email address.
status:
type: string
description: One of `active`, `unsubscribed`, `suppressed`.
created_at:
type: string
description: ISO 8601 creation timestamp.
updated_at:
type: string
description: ISO 8601 last-updated timestamp.
example:
object: contact
id: con_abc123
publication_id: pub_abc123
email: reader@example.com
status: active
created_at: '2026-03-28T10:00:00.000Z'
updated_at: '2026-03-28T10: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: Contact not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- bearerAuth:
- contacts:read
x-mailtea-scopes:
- contacts:read
patch:
operationId: updateContact
summary: Update Contact
description: 'Update a contact''s status
Update a contact''s status. The `:id` parameter accepts either a contact ID or an email address.'
tags:
- Contacts
externalDocs:
url: https://docs.mailtea.app/docs/api-reference/contacts/update-contact
parameters:
- name: id
in: path
required: true
description: The contact ID or email address. When using an email, URL-encode the `@` as `%40`.
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
publication_id:
type: string
description: The publication the contact belongs to.
status:
type: string
description: 'New status: `active`, `unsubscribed`, or `suppressed`.'
required:
- publication_id
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
object:
type: string
description: Always `"contact"`.
id:
type: string
description: Unique contact identifier.
publication_id:
type: string
description: The publication this contact belongs to.
email:
type: string
description: Contact email address.
status:
type: string
description: One of `active`, `unsubscribed`, `suppressed`.
created_at:
type: string
description: ISO 8601 creation timestamp.
updated_at:
type: string
description: ISO 8601 last-updated timestamp.
example:
object: contact
id: con_abc123
publication_id: pub_abc123
email: reader@example.com
status: unsubscribed
created_at: '2026-03-28T10:00:00.000Z'
updated_at: '2026-03-28T12: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: Contact not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- bearerAuth:
- contacts:write
x-mailtea-scopes:
- contacts:write
/v1/contacts/{id}/properties:
get:
operationId: getContactProperties
summary: Read the values
description: 'Requires `contacts:read`. Returns the same shape as the response above, listing
only properties this contact has a value for.
```bash
curl https://api.mailtea.app/v1/contacts/con_abc123/properties?publication_id=pub_abc123 \
-H "Authorization: Bearer $MAILTEA_API_KEY"
```'
tags:
- Contacts
externalDocs:
url: https://docs.mailtea.app/docs/api-reference/contacts/set-contact-properties
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- bearerAuth:
- contacts:read
x-mailtea-scopes:
- contacts:read
put:
operationId: setContactProperties
summary: Set Contact Properties
description: 'Write the per-contact values behind {{contact.key}} merge tags
Set this contact''s property **values** — the data behind `{{contact.}}`
merge tags in your emails.
Creating a property with Create Contact Property
defines the field. This endpoint puts a value on a contact.'
tags:
- Contacts
externalDocs:
url: https://docs.mailtea.app/docs/api-reference/contacts/set-contact-properties
parameters:
- name: id
in: path
required: true
description: The contact ID or email address. When using an email, URL-encode the `@` as `%40`.
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
publication_id:
type: string
description: The publication the contact belongs to.
values:
type: array
description: 1–100 entries, each identifying one property and its value.
required:
- publication_id
- values
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
example:
contact_id: con_abc123
properties:
- property_id: cprop_abc
key: first_name
type: string
value: Ada
- property_id: cprop_def
key: plan
type: string
value: pro
'400':
description: Validation failed — including an entry with both `property_id` and `key`, or neither.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: The token lacks `contacts:write`, or the publication is not yours.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No such contact in that publication, or no such property in your organization.
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