Amati API
Send transactional emails and campaigns, manage domains and mailboxes, store files in Drive, schedule meetings, create Meet rooms and keep Newsletter contacts from your own systems.
The API is part of the Pro plan. Keys, apps and webhooks are created by a company administrator.
Getting started
- In the panel, open the company menu and go to API.
- Create a key and pick only the permissions you need. It is shown a single time.
- Send the key in the Authorization header of every call.
curl https://amati.digital/api/v1/me \
-H "Authorization: Bearer amk_..."
The response shows the person behind the key, the company, the role and the permissions.
Authentication
Every call acts as a person in the company, with the role and access they have in the panel. If that person leaves the company, the credential stops working. The API checks this on every call, along with the required permission and whether the app is enabled.
API keys
For scripts and internal integrations. The key starts with amk_ and acts as the administrator who created it. It can expire in 30, 90 or 365 days, or never. Keep it in a secrets manager, never in code or in the browser.
OAuth apps
For systems used by several people: each one authorizes with their own account. The flow is Authorization Code with PKCE S256 and a confidential client. The access token lasts 1 hour, and the refresh token lasts 90 days and changes on every use. If an old refresh token is presented again, the whole authorization is dropped.
GET https://amati.digital/oauth/authorize
?response_type=code&client_id=amc_...&redirect_uri=https://app.exemplo.com/callback
&scope=drive.read%20agenda.write&state=...
&code_challenge=...&code_challenge_method=S256
POST https://amati.digital/oauth/token
grant_type=authorization_code&code=...&redirect_uri=...&code_verifier=...
client_id=amc_...&client_secret=...
POST https://amati.digital/oauth/token
grant_type=refresh_token&refresh_token=amt_rt_...&client_id=amc_...&client_secret=...
POST https://amati.digital/oauth/revoke
token=...&client_id=amc_...&client_secret=...
A new app only works in the company that created it. For other companies to authorize it, request a review in the panel: Amati checks the app before releasing it. The authorizing company must also be on the Pro plan.
Partners (ERP)
An Amati partner system (such as the Elephantfy/Rhyno ERP) gets an amp_ key that only opens /partner/*. With it, it creates each customer company (already active, billed by the partner), picks the plan, turns apps on, suspends and reactivates, registers webhooks and issues the company amk_ key. Everything else, from domains and mailboxes to emails and campaigns, uses the company key on the regular routes. Creation is idempotent by external_id. A domain the partner already had on the server comes in with POST /mail/domains and adopt=true, with its mailboxes and no new DNS.
curl -X POST https://amati.digital/api/v1/partner/workspaces \
-H "Authorization: Bearer amp_..." -H "Content-Type: application/json" \
-d '{"external_id":"90621","name":"Loja","owner_email":"dono@loja.com.br","plan":"pro","apps":["webmail","newsletter"]}'
curl -X POST https://amati.digital/api/v1/messages \
-H "Authorization: Bearer amk_..." -H "Idempotency-Key: pedido-1042-confirmacao" \
-d '{"from":"pedidos@loja.com.br","from_name":"Loja","to":["cliente@exemplo.com"],"subject":"Pedido #1042 confirmado","html":"<p>Obrigado!</p>","tags":{"kind":"order_confirmation"},"metadata":{"order_id":1042}}'
Permissions
| mail.send | Send email from your mailboxes connected to Webmail | member |
| mail.transactional | Send automatic emails (order, password, invoice) from the company domains | member |
| mail.admin | Manage the company domains, mailboxes and aliases (admins only) | admin |
| drive.read | See the folders and files you can access in Drive | viewer |
| drive.write | Create folders and save files in Drive | member |
| drive.share | Create expiring links to Drive files | member |
| agenda.read | See your calendars and busy times | viewer |
| agenda.write | Create, change and cancel events | member |
| meet.create | Create Meet rooms | member |
| newsletter.read | View Newsletter contacts and lists (admins only) | admin |
| newsletter.write | Create, change and unsubscribe Newsletter contacts (admins only) | admin |
| newsletter.campaigns | Create, test and send Newsletter campaigns (admins only) | admin |
The API does not read emails: it only sends them. This is a security decision.
General rules
- Errors
- Every failure answers in JSON with the fields error (a stable code for your system) and message (text for people). Validation errors also bring errors, by field. The most common codes are invalid_token (401), insufficient_scope, forbidden_role, app_disabled, plan_required and workspace_blocked (403), not_found (404), validation_failed (422) and rate_limited (429).
- Limits
- 300 calls per minute per credential. Transactional email (/messages): 600 recipients per minute and 20,000 per day per company (100 per day on the free trial). Sending from a mailbox (/mail/send): 30 per minute per person. Newsletter: 1,000 new contacts per day per company. Responses carry X-RateLimit-Limit and X-RateLimit-Remaining. At the limit, the response is 429 with Retry-After, in seconds.
- Idempotency
- On writes, send the Idempotency-Key header with a value unique to the operation. Repeating the call with the same key, for up to 7 days, returns the first response instead of repeating the action. The same key on a different request returns 422, and a request still running returns 409. Errors are not stored, so you can retry.
- Pagination
- Long lists use a cursor: pass limit (up to 200) and, for the next page, the next_cursor from the previous response as cursor. When next_cursor is null, you have reached the end.
- Tracing
- Send X-Correlation-Id to find the call later: it comes back in the response and goes into the audit log of writes.
- Versions
- The version is part of the address (/api/v1). New fields may appear without notice, so ignore what you do not recognize. Breaking changes only ship in a new version.
{ "error": "insufficient_scope", "message": "..." }
Webhooks
Register an https address in the panel and choose the events. Amati sends a JSON POST when something happens, within about a minute.
- agenda.event.created
- agenda.event.updated
- agenda.event.deleted
- drive.file.uploaded
- newsletter.contact.subscribed
- newsletter.contact.unsubscribed
- newsletter.contact.bounced
- newsletter.contact.complained
- newsletter.campaign.submitted
- newsletter.campaign.approved
- newsletter.campaign.rejected
- newsletter.campaign.paused
- newsletter.campaign.sent
- mail.message.delivered
- mail.message.delayed
- mail.message.bounced
- mail.message.complained
- mail.message.rejected
- mail.message.opened
- mail.message.clicked
- mail.domain.active
- mail.domain.dns_broken
{
"id": "01JX4Q8Z6MZ3T5E7V9W1Y3B5D7",
"type": "drive.file.uploaded",
"created_at": "2026-11-04T12:00:00-03:00",
"workspace_id": "01JX2KA4TNH8Q0R2S4V6X8Z0B2",
"data": { "id": 482, "parent_id": 120 }
}
The event carries identifiers only. For the details, fetch the resource through the API: this way each credential sees only what it is allowed to see. If the call returns 403 or 404, that credential cannot reach the item. Newsletter contact events also include the email.
Check the signature
Each delivery carries Amati-Signature with t (timestamp) and v1 (HMAC SHA-256 of "t.body" with the webhook secret). Compute it over the raw body, before parsing the JSON, and reject timestamps more than 5 minutes off.
[$t, $v1] = sscanf($_SERVER['HTTP_AMATI_SIGNATURE'], 't=%d,v1=%s');
$body = file_get_contents('php://input');
$expected = hash_hmac('sha256', $t.'.'.$body, $secret);
if (! hash_equals($expected, $v1) || abs(time() - $t) > 300) {
http_response_code(400);
exit;
}
Delivery
Answer with any 2xx status within 5 seconds and do the heavy work afterwards. Otherwise Amati retries: 6 attempts over about 15 hours, without following redirects. An event may arrive more than once or out of order, so use the Amati-Delivery header to ignore repeats. After 50 failures in a row the address is turned off, and you can turn it back on in the panel.
Reference
Base address: https://amati.digital/api/v1. Successful responses come inside data.
Account
GET /me Person, company and permissions of the credential
Permission: — · Success: 200
{
"data": {
"user": {
"id": "18",
"name": "Ana Lima",
"email": "ana@empresa.com",
"timezone": "America/Sao_Paulo"
},
"workspace": {
"id": "01JX2K",
"name": "Empresa",
"locale": "pt_BR",
"timezone": "America/Sao_Paulo"
},
"role": "admin",
"scopes": [
"drive.read"
],
"apps": {
"webmail": true,
"drive": true,
"agenda": true,
"meet": true
},
"links": {
"webmail": "https://amati.digital/webmail"
}
}
}
Transactional email
POST /messages Send a transactional email
Permission: mail.transactional · Success: 201 · Idempotency-Key
The sender can be any address of a company domain with transactional_ready=true (see /mail/domains); no mailbox needed. It goes straight through high-deliverability sending: it does not land in Sent nor count toward the mailbox hourly limit. attachments carries the file in base64 (up to 10, 10 MB in total; executables are refused); with content_id it becomes an inline image, referenced in the HTML as cid:<content_id>. headers accepts List-Unsubscribe, References, In-Reply-To and X-*. tags (up to 10, letters, digits, _ and -) and metadata come back in the mail.message.* webhooks. Without text, the plain version is generated from the HTML. Addresses with a permanent bounce are left out and listed in suppressed. Always send Idempotency-Key: a retry with the same key does not send the email again.
- from email, required
- from_name string
- to array<email>, required
- cc array<email>
- bcc array<email>
- reply_to array<email>
- subject string, required
- html string
- text string
- attachments array<object{filename*:string,content*:base64,content_type:string,content_id:string}>
- headers map<string>
- tags map<string>
- metadata object
{
"data": {
"id": "01JXB7R2M4K8Q",
"status": "delivered",
"from": "pedidos@loja.com.br",
"to": [
"cliente@exemplo.com"
],
"subject": "Pedido #1042 confirmado",
"tags": {
"kind": "order_confirmation"
},
"metadata": {
"order_id": 1042
},
"error": null,
"created_at": "2026-11-07T10:00:00-03:00",
"sent_at": "2026-11-07T10:00:01-03:00",
"delivered_at": "2026-11-07T10:00:03-03:00",
"opened_at": null,
"clicked_at": null,
"bounced_at": null,
"complained_at": null,
"suppressed": []
}
}
GET /messages Search transactional emails
Permission: mail.transactional · Success: 200
- status enum(sent|delivered|delayed|bounced|complained|rejected|failed)
- to email
- tag string
- since date-time
- limit integer
- cursor string
{
"data": [
{
"id": "01JXB7R2M4K8Q",
"status": "delivered",
"from": "pedidos@loja.com.br",
"to": [
"cliente@exemplo.com"
],
"subject": "Pedido #1042 confirmado",
"tags": {
"kind": "order_confirmation"
},
"metadata": {
"order_id": 1042
},
"error": null,
"created_at": "2026-11-07T10:00:00-03:00",
"sent_at": "2026-11-07T10:00:01-03:00",
"delivered_at": "2026-11-07T10:00:03-03:00",
"opened_at": null,
"clicked_at": null,
"bounced_at": null,
"complained_at": null
}
]
}
GET /messages/{message} Status and events of a transactional email
Permission: mail.transactional · Success: 200
status shows the most severe state seen (complained, bounced, rejected, delivered, delayed, sent). For each recipient, see events or send one email per recipient. Opens and clicks only show up if tracking is on for sending.
{
"data": {
"id": "01JXB7R2M4K8Q",
"status": "delivered",
"from": "pedidos@loja.com.br",
"to": [
"cliente@exemplo.com"
],
"subject": "Pedido #1042 confirmado",
"tags": {
"kind": "order_confirmation"
},
"metadata": {
"order_id": 1042
},
"error": null,
"created_at": "2026-11-07T10:00:00-03:00",
"sent_at": "2026-11-07T10:00:01-03:00",
"delivered_at": "2026-11-07T10:00:03-03:00",
"opened_at": null,
"clicked_at": null,
"bounced_at": null,
"complained_at": null,
"events": [
{
"type": "delivered",
"recipients": [
"cliente@exemplo.com"
],
"at": "2026-11-07T10:00:03-03:00"
}
]
}
}
GET /mail/accounts Mailboxes the person connected to Webmail
Permission: mail.send · Success: 200
{
"data": [
{
"id": 31,
"address": "ana@empresa.com",
"name": "Ana Lima",
"needs_attention": false
}
]
}
POST /mail/send Send an email
Permission: mail.send · Success: 201 · Idempotency-Key
Use html, text or both. To attach, send multipart with the files[] field (up to 10) or use drive_file_ids. The message goes out from the mailbox in account_id, which must belong to the person.
- account_id integer, required
- to array<email>, required
- cc array<email>
- bcc array<email>
- subject string, required
- html string
- text string
- signature boolean
- drive_file_ids array<integer>
{
"data": {
"sent": true,
"from": "ana@empresa.com"
}
}
GET /mail/domains Company domains
Permission: mail.admin · Success: 200
{
"data": [
{
"domain": "loja.com.br",
"status": "active",
"transactional_ready": true,
"relay": "on",
"relay_status": "verified",
"mailboxes": 3,
"last_error": null,
"dns_checked_at": "2026-11-07T09:00:00-03:00"
}
]
}
POST /mail/domains Add (or adopt) a domain
Permission: mail.admin · Success: 201 · Idempotency-Key
The response carries in dns the ownership TXT (_amati-verify): publish it and call /check. Then MX, SPF, DMARC and the high-deliverability CNAMEs show up. adopt=true is only for partner companies, with a domain the partner itself created on the server: it comes in with the existing mailboxes, no ownership TXT and no DNS change.
- domain string, required
- adopt boolean
{
"data": {
"status": "pending_verification",
"transactional_ready": false,
"relay": null,
"relay_status": null,
"mailboxes": 0,
"domain": "loja.com.br",
"last_error": null,
"dns_checked_at": "2026-11-07T09:00:00-03:00",
"dns": [
{
"key": "verify",
"type": "TXT",
"name": "_amati-verify.loja.com.br",
"value": "amati-verify=3f9c...",
"purpose": "ownership",
"required": true,
"ok": null,
"found": null
}
]
}
}
GET /mail/domains/{domain} Domain data and DNS
Permission: mail.admin · Success: 200
{
"data": {
"domain": "loja.com.br",
"status": "active",
"transactional_ready": true,
"relay": "on",
"relay_status": "verified",
"mailboxes": 3,
"last_error": null,
"dns_checked_at": "2026-11-07T09:00:00-03:00",
"dns": [
{
"key": "spf",
"type": "TXT",
"name": "loja.com.br",
"value": "v=spf1 a:mail.amati.digital include:amazonses.com ~all",
"purpose": "spf",
"required": true,
"ok": true,
"found": "v=spf1 a:mail.amati.digital include:amazonses.com ~all"
}
]
}
}
POST /mail/domains/{domain}/check Check the DNS now
Permission: mail.admin · Success: 200 · Idempotency-Key
{
"data": {
"domain": "loja.com.br",
"status": "active",
"transactional_ready": true,
"relay": "on",
"relay_status": "verified",
"mailboxes": 3,
"last_error": null,
"dns_checked_at": "2026-11-07T09:00:00-03:00",
"dns": [
{
"key": "spf",
"type": "TXT",
"name": "loja.com.br",
"value": "v=spf1 a:mail.amati.digital include:amazonses.com ~all",
"purpose": "spf",
"required": true,
"ok": true,
"found": "v=spf1 a:mail.amati.digital include:amazonses.com ~all"
}
]
}
}
DELETE /mail/domains/{domain} Remove a domain (deletes its mailboxes)
Permission: mail.admin · Success: 204 · Idempotency-Key
Deletes every mailbox of the domain on the server, with the emails. There is no undo.
GET /mail/mailboxes Mailboxes
Permission: mail.admin · Success: 200
- domain string
{
"data": [
{
"id": 88,
"address": "contato@loja.com.br",
"name": "Contato",
"active": true,
"suspended_reason": null,
"quota_mb": 1024,
"used_bytes": 52428800,
"last_login_at": "2026-11-06T18:20:00-03:00"
}
]
}
POST /mail/mailboxes Create a mailbox
Permission: mail.admin · Success: 201 · Idempotency-Key
local is the part before the @. The password needs at least 12 characters, with letters and digits. Amati does not store the password.
- domain string, required
- local string, required
- name string
- password string, required
{
"data": {
"id": 88,
"address": "contato@loja.com.br",
"name": "Contato",
"active": true,
"suspended_reason": null,
"quota_mb": 1024,
"used_bytes": 52428800,
"last_login_at": "2026-11-06T18:20:00-03:00"
}
}
PATCH /mail/mailboxes/{mailbox} Change the password or turn a mailbox on and off
Permission: mail.admin · Success: 200 · Idempotency-Key
- password string
- active boolean
{
"data": {
"id": 88,
"address": "contato@loja.com.br",
"name": "Contato",
"active": true,
"suspended_reason": null,
"quota_mb": 1024,
"used_bytes": 52428800,
"last_login_at": "2026-11-06T18:20:00-03:00"
}
}
DELETE /mail/mailboxes/{mailbox} Delete a mailbox
Permission: mail.admin · Success: 204 · Idempotency-Key
GET /mail/aliases Aliases (forwards)
Permission: mail.admin · Success: 200
{
"data": [
{
"id": 14,
"address": "vendas@loja.com.br",
"goto": [
"contato@loja.com.br"
],
"active": true
}
]
}
POST /mail/aliases Create an alias
Permission: mail.admin · Success: 201 · Idempotency-Key
- domain string, required
- local string, required
- goto array<email>, required
{
"data": {
"id": 14,
"address": "vendas@loja.com.br",
"goto": [
"contato@loja.com.br"
],
"active": true
}
}
DELETE /mail/aliases/{alias} Delete an alias
Permission: mail.admin · Success: 204 · Idempotency-Key
Drive
GET /drive/browse Browse spaces, folders and files
Permission: drive.read · Success: 200
- folder_id integer
- space_id integer
- files boolean
{
"data": {
"current": null,
"space": null,
"can_write": true,
"spaces": [
{
"id": 2,
"name": "Comercial"
}
],
"folders": [],
"files": [
{
"id": 482,
"kind": "file",
"name": "contrato.pdf",
"size": 182044,
"mime": "application/pdf",
"status": "ready",
"scan_status": "clean",
"available": true,
"open_url": "https://amati.digital/drive?folder=120"
}
]
}
}
GET /drive/files/{file} File details
Permission: drive.read · Success: 200
{
"data": {
"id": 482,
"kind": "file",
"name": "contrato.pdf",
"size": 182044,
"mime": "application/pdf",
"status": "ready",
"scan_status": "clean",
"available": true,
"open_url": "https://amati.digital/drive?folder=120"
}
}
POST /drive/folders Create a folder (or a whole path)
Permission: drive.write · Success: 201 · Idempotency-Key
- path string, required
- parent_id integer
- space_id integer
{
"data": {
"id": 120,
"kind": "folder",
"name": "Clientes",
"size": 182044,
"mime": "application/pdf",
"status": "ready",
"scan_status": "clean",
"available": true,
"open_url": "https://amati.digital/drive?folder=120"
}
}
POST /drive/uploads Start a file upload
Permission: drive.write · Success: 201 · Idempotency-Key
The response brings chunk_bytes and chunks. Split the file by that size, send each part and finish. Finishing runs the antivirus: follow it until status is done.
- name string, required
- size integer, required
- parent_id integer
- space_id integer
- path string
{
"data": {
"id": "01JX4Q8Z6M",
"status": "open",
"chunk_bytes": 5242880,
"chunks": 2,
"missing": [
0,
1
],
"error": null,
"file": null
}
}
GET /drive/uploads/{upload} Check an upload
Permission: drive.write · Success: 200
{
"data": {
"id": "01JX4Q8Z6M",
"status": "open",
"chunk_bytes": 5242880,
"chunks": 2,
"missing": [
0,
1
],
"error": null,
"file": null
}
}
PUT /drive/uploads/{upload}/chunks/{index} Send one part of the file
Permission: drive.write · Success: 200
The body is the binary content of the part. The index starts at 0.
{
"data": {
"missing": [
1
]
}
}
POST /drive/uploads/{upload}/complete Finish the upload
Permission: drive.write · Success: 200
{
"data": {
"status": "done",
"missing": [],
"file": {
"id": 482,
"kind": "file",
"name": "contrato.pdf",
"size": 182044,
"mime": "application/pdf",
"status": "ready",
"scan_status": "clean",
"available": true,
"open_url": "https://amati.digital/drive?folder=120"
},
"id": "01JX4Q8Z6M",
"chunk_bytes": 5242880,
"chunks": 2,
"error": null
}
}
POST /drive/files/{file}/links Create a sharing link with an expiry date
Permission: drive.share · Success: 201 · Idempotency-Key
expires_in_days is required: the API does not create links without an expiry date.
- expires_in_days integer, required
- password string
- max_downloads integer
- allow_download boolean
{
"data": {
"id": 55,
"url": "https://amati.digital/d/AbCdEf",
"expires_at": "2026-11-11T12:00:00-03:00"
}
}
Calendar
GET /agenda/calendars Calendars the person can reach
Permission: agenda.read · Success: 200
{
"data": [
{
"id": 12,
"name": "Ana Lima",
"kind": "personal",
"color": "#2563eb",
"is_default": true,
"writable": true
}
]
}
GET /agenda/busy Busy times, without details
Permission: agenda.read · Success: 200
Returns start and end only, with no title or attendees.
- from date-time, required
- to date-time, required
- calendar_ids array<integer>
{
"data": [
{
"start": "2026-11-10T14:00:00-03:00",
"end": "2026-11-10T15:00:00-03:00",
"all_day": false
}
]
}
GET /agenda/events/{event} Event details
Permission: agenda.read · Success: 200
{
"data": {
"id": 913,
"calendar_id": 12,
"title": "Reunião de proposta",
"description": null,
"location": null,
"starts_at": "2026-11-10T14:00:00-03:00",
"ends_at": "2026-11-10T14:30:00-03:00",
"timezone": "America/Sao_Paulo",
"status": "confirmed",
"meeting_url": "https://amati.digital/m/abc-defg-hij",
"meeting_provider": "amati",
"whatsapp_reminders": [],
"attendees": [
{
"email": "cliente@exemplo.com",
"name": "Cliente",
"status": "needs_action"
}
],
"open_url": "https://amati.digital/agenda?date=2026-11-10"
}
}
POST /agenda/events Create an event
Permission: agenda.write · Success: 201 · Idempotency-Key
duration_minutes is the alternative to ends_at. meet creates a Meet room; meeting_url uses an external link; both together return 422. attendees is a list of { email, name }. whatsapp_reminder is { phone, minutes[], channel } and requires WhatsApp to be connected.
- title string, required
- starts_at date-time, required
- calendar_id integer
- description string
- location string
- ends_at date-time
- duration_minutes integer
- timezone string
- attendees array<object>
- notify boolean
- meet boolean
- meeting_url uri
- whatsapp_reminder object
{
"data": {
"id": 913,
"calendar_id": 12,
"title": "Reunião de proposta",
"description": null,
"location": null,
"starts_at": "2026-11-10T14:00:00-03:00",
"ends_at": "2026-11-10T14:30:00-03:00",
"timezone": "America/Sao_Paulo",
"status": "confirmed",
"meeting_url": "https://amati.digital/m/abc-defg-hij",
"meeting_provider": "amati",
"whatsapp_reminders": [],
"attendees": [
{
"email": "cliente@exemplo.com",
"name": "Cliente",
"status": "needs_action"
}
],
"open_url": "https://amati.digital/agenda?date=2026-11-10",
"invites_sent": 1
}
}
PATCH /agenda/events/{event} Change an event
Permission: agenda.write · Success: 200 · Idempotency-Key
Send only the fields that changed. A null meeting_url removes the link. Recurring events can only be changed in Calendar.
- title string
- starts_at date-time
- description string
- location string
- ends_at date-time
- duration_minutes integer
- timezone string
- attendees array<object>
- notify boolean
- meet boolean
- meeting_url uri
- whatsapp_reminder object
{
"data": {
"id": 913,
"calendar_id": 12,
"title": "Reunião de proposta",
"description": null,
"location": null,
"starts_at": "2026-11-10T14:00:00-03:00",
"ends_at": "2026-11-10T14:30:00-03:00",
"timezone": "America/Sao_Paulo",
"status": "confirmed",
"meeting_url": "https://amati.digital/m/abc-defg-hij",
"meeting_provider": "amati",
"whatsapp_reminders": [],
"attendees": [
{
"email": "cliente@exemplo.com",
"name": "Cliente",
"status": "needs_action"
}
],
"open_url": "https://amati.digital/agenda?date=2026-11-10",
"invites_sent": 1
}
}
DELETE /agenda/events/{event} Cancel an event
Permission: agenda.write · Success: 200 · Idempotency-Key
- notify boolean
{
"data": {
"deleted": true,
"invites_sent": 1
}
}
Meet
POST /meet/rooms Create a Meet room
Permission: meet.create · Success: 201 · Idempotency-Key
- title string
- lobby boolean
- allow_guests boolean
{
"data": {
"code": "abc-defg-hij",
"title": "Atendimento",
"url": "https://amati.digital/m/abc-defg-hij",
"lobby": true
}
}
Newsletter
GET /newsletter/lists Contact lists
Permission: newsletter.read · Success: 200
{
"data": [
{
"id": 3,
"name": "Clientes",
"description": null,
"contacts": 1250
}
]
}
POST /newsletter/lists Create a list
Permission: newsletter.write · Success: 201 · Idempotency-Key
- name string, required
- description string
{
"data": {
"id": 4,
"name": "Leads",
"description": null,
"contacts": 0
}
}
GET /newsletter/contacts Search contacts
Permission: newsletter.read · Success: 200
- email email
- status string
- list_id integer
- limit integer
- cursor string
{
"data": [
{
"id": 7741,
"email": "cliente@exemplo.com",
"name": "Cliente",
"status": "subscribed",
"source": "api",
"list_ids": [
3
],
"consent_at": "2026-11-04T12:00:00-03:00",
"unsubscribed_at": null,
"created_at": "2026-11-04T12:00:00-03:00"
}
]
}
POST /newsletter/contacts Add a contact
Permission: newsletter.write · Success: 201 · Idempotency-Key
consent is required: { source, note }. source is customers, event, website or other, and note explains in at least 15 characters how the person agreed to receive messages. People who unsubscribed, bounced or complained cannot come back this way.
- email email, required
- name string
- list_ids array<integer>
- consent object{source*:enum(customers|event|website|other),note*:string}, required
{
"data": {
"id": 7741,
"email": "cliente@exemplo.com",
"name": "Cliente",
"status": "subscribed",
"source": "api",
"list_ids": [
3
],
"consent_at": "2026-11-04T12:00:00-03:00",
"unsubscribed_at": null,
"created_at": "2026-11-04T12:00:00-03:00"
}
}
POST /newsletter/contacts/batch Add up to 500 contacts at once
Permission: newsletter.write · Success: 200 · Idempotency-Key
consent applies to all: { source, note }, as in the single POST. Each row comes back with result created, exists (only gets the new lists; the status does not change) or error. Whoever unsubscribed, bounced or complained does not come back this way.
- contacts array<object{email*:email,name:string,list_ids:array<integer>}>, required
- consent object{source*:enum(customers|event|website|other),note*:string}, required
{
"data": {
"created": 1,
"results": [
{
"email": "nova@exemplo.com",
"result": "created",
"id": 7742,
"status": "subscribed"
},
{
"email": "cliente@exemplo.com",
"result": "exists",
"id": 7741,
"status": "subscribed"
},
{
"email": "x@dominio-que-nao-existe.test",
"result": "error",
"error": "O domínio do e-mail não recebe mensagens."
}
]
}
}
GET /newsletter/contacts/{contact} Contact details
Permission: newsletter.read · Success: 200
{
"data": {
"id": 7741,
"email": "cliente@exemplo.com",
"name": "Cliente",
"status": "subscribed",
"source": "api",
"list_ids": [
3
],
"consent_at": "2026-11-04T12:00:00-03:00",
"unsubscribed_at": null,
"created_at": "2026-11-04T12:00:00-03:00"
}
}
PATCH /newsletter/contacts/{contact} Change a contact's name and lists
Permission: newsletter.write · Success: 200 · Idempotency-Key
The status does not change here. To remove someone, use /unsubscribe.
- name string
- add_list_ids array<integer>
- remove_list_ids array<integer>
{
"data": {
"id": 7741,
"email": "cliente@exemplo.com",
"name": "Cliente",
"status": "subscribed",
"source": "api",
"list_ids": [
3
],
"consent_at": "2026-11-04T12:00:00-03:00",
"unsubscribed_at": null,
"created_at": "2026-11-04T12:00:00-03:00"
}
}
POST /newsletter/contacts/{contact}/unsubscribe Unsubscribe a contact
Permission: newsletter.write · Success: 200 · Idempotency-Key
{
"data": {
"status": "unsubscribed",
"id": 7741,
"email": "cliente@exemplo.com",
"name": "Cliente",
"source": "api",
"list_ids": [
3
],
"consent_at": "2026-11-04T12:00:00-03:00",
"unsubscribed_at": null,
"created_at": "2026-11-04T12:00:00-03:00"
}
}
DELETE /newsletter/contacts/{contact} Delete a contact (data subject request)
Permission: newsletter.write · Success: 204 · Idempotency-Key
The address stays on the suppression list so it does not come back by mistake.
GET /newsletter/campaigns Campaigns
Permission: newsletter.campaigns · Success: 200
- status string
- limit integer
- cursor string
{
"data": [
{
"id": 51,
"name": "Black Friday",
"subject": "Até 40% off só hoje",
"preheader": "Frete grátis acima de R$ 199",
"from_name": "Loja",
"sender": "contato@loja.com.br",
"list_ids": [
3
],
"status": "scheduled",
"review_reasons": [],
"review_note": null,
"paused_reason": null,
"scheduled_at": "2026-11-27T09:00:00-03:00",
"started_at": null,
"finished_at": null,
"stats": {
"recipients": 1250,
"sent": 0,
"delivered": 0,
"opened": 0,
"clicked": 0,
"bounced": 0,
"complained": 0,
"unsubscribed": 0
},
"created_at": "2026-11-07T10:00:00-03:00"
}
]
}
POST /newsletter/campaigns Create a campaign (draft)
Permission: newsletter.campaigns · Success: 201 · Idempotency-Key
sender is the address of an active company mailbox, on an active domain with DMARC published. html is the full email; it is sanitized on sending and gets the footer with unsubscribe and the company address.
- name string, required
- subject string, required
- sender email, required
- html string, required
- list_ids array<integer>, required
- preheader string
- from_name string
- scheduled_at date-time
{
"data": {
"status": "draft",
"id": 51,
"name": "Black Friday",
"subject": "Até 40% off só hoje",
"preheader": "Frete grátis acima de R$ 199",
"from_name": "Loja",
"sender": "contato@loja.com.br",
"list_ids": [
3
],
"review_reasons": [],
"review_note": null,
"paused_reason": null,
"scheduled_at": "2026-11-27T09:00:00-03:00",
"started_at": null,
"finished_at": null,
"stats": {
"recipients": 1250,
"sent": 0,
"delivered": 0,
"opened": 0,
"clicked": 0,
"bounced": 0,
"complained": 0,
"unsubscribed": 0
},
"created_at": "2026-11-07T10:00:00-03:00"
}
}
GET /newsletter/campaigns/{campaign} Campaign data and numbers
Permission: newsletter.campaigns · Success: 200
{
"data": {
"id": 51,
"name": "Black Friday",
"subject": "Até 40% off só hoje",
"preheader": "Frete grátis acima de R$ 199",
"from_name": "Loja",
"sender": "contato@loja.com.br",
"list_ids": [
3
],
"status": "scheduled",
"review_reasons": [],
"review_note": null,
"paused_reason": null,
"scheduled_at": "2026-11-27T09:00:00-03:00",
"started_at": null,
"finished_at": null,
"stats": {
"recipients": 1250,
"sent": 0,
"delivered": 0,
"opened": 0,
"clicked": 0,
"bounced": 0,
"complained": 0,
"unsubscribed": 0
},
"created_at": "2026-11-07T10:00:00-03:00"
}
}
PATCH /newsletter/campaigns/{campaign} Change a draft
Permission: newsletter.campaigns · Success: 200 · Idempotency-Key
- name string
- subject string
- sender email
- html string
- list_ids array<integer>
- preheader string
- from_name string
- scheduled_at date-time
{
"data": {
"status": "draft",
"id": 51,
"name": "Black Friday",
"subject": "Até 40% off só hoje",
"preheader": "Frete grátis acima de R$ 199",
"from_name": "Loja",
"sender": "contato@loja.com.br",
"list_ids": [
3
],
"review_reasons": [],
"review_note": null,
"paused_reason": null,
"scheduled_at": "2026-11-27T09:00:00-03:00",
"started_at": null,
"finished_at": null,
"stats": {
"recipients": 1250,
"sent": 0,
"delivered": 0,
"opened": 0,
"clicked": 0,
"bounced": 0,
"complained": 0,
"unsubscribed": 0
},
"created_at": "2026-11-07T10:00:00-03:00"
}
}
POST /newsletter/campaigns/{campaign}/test Send a test to the team
Permission: newsletter.campaigns · Success: 200 · Idempotency-Key
Only to emails of people in the company, up to 5, no tracking.
- emails array<email>, required
{
"data": {
"sent": 2
}
}
POST /newsletter/campaigns/{campaign}/submit Request sending
Permission: newsletter.campaigns · Success: 200 · Idempotency-Key
Goes through the same checks as the panel. The response gives the result in status: scheduled (goes out at scheduled_at), review (Amati review queue, with reasons in review_reasons) or rejected. The first campaigns of a company always go to review. Follow it through the newsletter.campaign.* webhooks.
{
"data": {
"status": "review",
"review_reasons": [
"first_campaigns"
],
"id": 51,
"name": "Black Friday",
"subject": "Até 40% off só hoje",
"preheader": "Frete grátis acima de R$ 199",
"from_name": "Loja",
"sender": "contato@loja.com.br",
"list_ids": [
3
],
"review_note": null,
"paused_reason": null,
"scheduled_at": "2026-11-27T09:00:00-03:00",
"started_at": null,
"finished_at": null,
"stats": {
"recipients": 1250,
"sent": 0,
"delivered": 0,
"opened": 0,
"clicked": 0,
"bounced": 0,
"complained": 0,
"unsubscribed": 0
},
"created_at": "2026-11-07T10:00:00-03:00"
}
}
POST /newsletter/campaigns/{campaign}/cancel Cancel sending
Permission: newsletter.campaigns · Success: 200 · Idempotency-Key
{
"data": {
"status": "canceled",
"id": 51,
"name": "Black Friday",
"subject": "Até 40% off só hoje",
"preheader": "Frete grátis acima de R$ 199",
"from_name": "Loja",
"sender": "contato@loja.com.br",
"list_ids": [
3
],
"review_reasons": [],
"review_note": null,
"paused_reason": null,
"scheduled_at": "2026-11-27T09:00:00-03:00",
"started_at": null,
"finished_at": null,
"stats": {
"recipients": 1250,
"sent": 0,
"delivered": 0,
"opened": 0,
"clicked": 0,
"bounced": 0,
"complained": 0,
"unsubscribed": 0
},
"created_at": "2026-11-07T10:00:00-03:00"
}
}
Partner
GET /partner/plans Available plans
Permission: partner · Success: 200
{
"data": [
{
"slug": "pro",
"name": "Pro",
"limits": {
"domains": 3,
"mailboxes": 25,
"newsletter_sends_month": 30000
},
"features": {
"newsletter": true,
"api": true
}
}
]
}
GET /partner/workspaces Companies created by the partner
Permission: partner · Success: 200
- external_id string
- limit integer
- cursor string
{
"data": [
{
"id": "01JXB9PQ3T",
"external_id": "90621",
"name": "Nobre Cozinha",
"status": "active",
"suspended_reason": null,
"plan": "pro",
"apps": [
"webmail",
"newsletter"
],
"owner_email": "dono@loja.com.br",
"domains": [
{
"domain": "loja.com.br",
"status": "active"
}
],
"created_at": "2026-11-07T10:00:00-03:00"
}
]
}
POST /partner/workspaces Create a customer company
Permission: partner · Success: 201
Idempotent by external_id: repeating returns the same company with status 200 and no api_key. owner_email becomes the owner (the account is created if missing; the person signs in through "forgot password"). api_key shows up only here: keep it. Default scopes: mail.transactional, mail.admin, newsletter.read, newsletter.write and newsletter.campaigns.
- external_id string, required
- name string, required
- owner_email email, required
- owner_name string
- plan string, required
- locale enum(pt_BR|en|es)
- timezone string
- tax_id string
- apps array<enum(webmail|newsletter|drive|agenda|meet|helpdesk)>
- scopes array<string>
{
"data": {
"id": "01JXB9PQ3T",
"external_id": "90621",
"name": "Nobre Cozinha",
"status": "active",
"suspended_reason": null,
"plan": "pro",
"apps": [
"webmail",
"newsletter"
],
"owner_email": "dono@loja.com.br",
"domains": [
{
"domain": "loja.com.br",
"status": "active"
}
],
"created_at": "2026-11-07T10:00:00-03:00",
"api_key": "amk_..."
}
}
GET /partner/workspaces/{workspace} Company data
Permission: partner · Success: 200
{
"data": {
"id": "01JXB9PQ3T",
"external_id": "90621",
"name": "Nobre Cozinha",
"status": "active",
"suspended_reason": null,
"plan": "pro",
"apps": [
"webmail",
"newsletter"
],
"owner_email": "dono@loja.com.br",
"domains": [
{
"domain": "loja.com.br",
"status": "active"
}
],
"created_at": "2026-11-07T10:00:00-03:00"
}
}
PATCH /partner/workspaces/{workspace} Change plan, apps or status
Permission: partner · Success: 200
status suspended cuts the company access and email; active turns it back on, but only what the partner suspended. apps replaces the whole list of enabled apps.
- name string
- plan string
- status enum(active|suspended)
- reason string
- apps array<string>
{
"data": {
"id": "01JXB9PQ3T",
"external_id": "90621",
"name": "Nobre Cozinha",
"status": "active",
"suspended_reason": null,
"plan": "pro",
"apps": [
"webmail",
"newsletter"
],
"owner_email": "dono@loja.com.br",
"domains": [
{
"domain": "loja.com.br",
"status": "active"
}
],
"created_at": "2026-11-07T10:00:00-03:00"
}
}
POST /partner/workspaces/{workspace}/keys Issue a company key
Permission: partner · Success: 201
revoke_others=true cuts the partner previous keys in this company (secret rotation).
- scopes array<string>
- revoke_others boolean
{
"data": {
"api_key": "amk_...",
"scopes": [
"mail.transactional",
"mail.admin",
"newsletter.read",
"newsletter.write",
"newsletter.campaigns"
]
}
}
POST /partner/workspaces/{workspace}/login-link Create a panel access link
Permission: partner · Success: 201
Returns a single-use link, valid for 5 minutes, that opens the Amati panel as the company owner, with no password and without depending on their email (useful when the owner mailbox lives on the domain still being set up). redirect sends to a panel path (e.g. /mail). Refused when the owner also uses Amati in companies that are not the partner ones; owners with two-factor authentication land on the login page. Accounts created by the partner are born with the email already confirmed.
- redirect string
{
"data": {
"url": "https://amati.digital/entrar/p/Xk3...",
"expires_at": "2026-11-07T10:05:00-03:00"
}
}
GET /partner/workspaces/{workspace}/webhooks Company webhooks
Permission: partner · Success: 200
{
"data": [
{
"id": "01JXBA1C9H",
"url": "https://erp.exemplo.com/amati/webhook",
"events": [
"mail.message.bounced"
],
"active": true,
"disabled_reason": null,
"failures": 0
}
]
}
POST /partner/workspaces/{workspace}/webhooks Register a company webhook
Permission: partner · Success: 201
The signing secret shows up only here.
- url uri, required
- events array<string>, required
{
"data": {
"id": "01JXBA1C9H",
"url": "https://erp.exemplo.com/amati/webhook",
"events": [
"mail.message.bounced"
],
"active": true,
"disabled_reason": null,
"failures": 0,
"secret": "whsec_..."
}
}
DELETE /partner/workspaces/{workspace}/webhooks/{webhook} Delete a company webhook
Permission: partner · Success: 204