API Reference
API v1CoffeeMail exposes a public REST API for integration via API Key. This reference covers only Product routes (/v1/product/*) consumed by the Node SDK and external clients. Internal routes (Platform and Infrastructure) are not part of this public contract.
Scope of this reference
Base URL
Authentication
All requests require a Bearer Token in the Authorization header. You can create and revoke API Keys in Dashboard → API Keys.
Language
The API detects the language via the Accept-Language header. Supported values: pt-BR (default), en, es. Validation messages and error codes are localized.
Error shape
All error responses follow the same JSON envelope:
Rate limit
X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers are returned on every request. Limits are applied per API key and per IP. See the full table in Error Codes.
API endpoints
Emails
/emails202 AcceptedSend emails
Enqueues a transactional email. Accepts raw HTML, raw text, or a templateId + variables. Supports attachments (base64 string or Uint8Array), custom headers, scheduling (scheduledAt) and idempotency (idempotencyKey).
Request body
| Field | Type | Description |
|---|---|---|
| from* | string | { email, name? } | Sender (must be a verified domain). |
| to* | string | string[] | { email, name? }[] | A recipient or list. |
| subject* | string | Subject. |
| html | string | HTML content. |
| text | string | Plain text fallback. |
| templateId | string | Renders an existing template. |
| variables | Record<string, unknown> | Variables for the template. |
| cc / bcc / replyTo | EmailAddressInput | Cc, Bcc and reply-to. |
| attachments | EmailAttachment[] | Attachments. content accepts base64 string or Uint8Array. |
| scheduledAt | ISO 8601 | Date | Scheduled send. |
| idempotencyKey | string | Prevents duplication on retries. |
| tags | EmailTag[] | Tags for metrics. |
| isSandbox | boolean | Does not actually send (simulation). |
Attachment Rules & Limits
EmailAttachment Object Schema
| Field | Type | Description |
|---|---|---|
| filename* | string (1-255) | Filename with extension (e.g. invoice.pdf). Up to 255 characters. |
| content* | string (Base64) | Base64-encoded binary content. |
| contentType* | string (MIME) | MIME type (e.g. application/pdf, image/png). SDK default: application/octet-stream. |
| disposition* | 'attachment' | 'inline' | Delivery mode: 'attachment' (standard download) or 'inline' (embedded inside the HTML body). |
| cid | string (opcional) | Unique Content-ID used to reference inline images inside the HTML body (e.g. cid:logo referenced in img). |
Request example
Response
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier of the email. |
| status | 'queued' | 'scheduled' | Initial status after sending. |
| queuedAt | string (ISO 8601) | Timestamp of queue entry. |
Response example
/emails200 OKList emails
Lists the organization's emails with cursor-based pagination. Accepts filters by status, recipient, sender, subject, tag, API key and time range.
Request body
| Field | Type | Description |
|---|---|---|
| status | 'queued' | 'processing' | 'sent' | 'delivered' | 'bounced' | 'complained' | 'failed' | 'skipped' | 'scheduled' | 'cancelled' | Filters emails by delivery status. |
| recipient | string | Partial search on recipient across to/cc/bcc. |
| fromEmail | string | Filters emails by sender address. |
| subjectContains | string | Partial search on the email subject. |
| apiKeyId | string (uuid) | Filters emails sent by a specific API key. |
| tag | string | Filters emails that have this tag. |
| from | string (ISO 8601) | Start date/time of the search range. |
| to | string (ISO 8601) | End date/time of the search range. |
| after | string (ISO 8601) | Pagination cursor to fetch the next records. |
| limit | number | Maximum number of emails returned (default 50, max 100). |
Request example
Response
| Field | Type | Description |
|---|---|---|
| emails | EmailResponse[] | List of returned emails. |
| nextCursor | string | null | Cursor to fetch the next page, or null if there are no more records. |
Response example
/emails/batch202 AcceptedSend emails in batch
Sends up to 100 emails in a single call. Each item follows the same format as a single send (from, to, subject/html/text or templateId, etc). Individual item failures do not fail the whole batch.
Request body
| Field | Type | Description |
|---|---|---|
| (array)* | SendEmailRequest[] | Array of 1 to 100 send payloads, in the same format as POST /emails. |
Request example
Response
| Field | Type | Description |
|---|---|---|
| [].ok | boolean | Indicates whether the item was accepted successfully. |
| [].data.id | string | Unique identifier of the created email (when ok is true). |
| [].data.status | 'queued' | 'scheduled' | Initial status of the email after sending (when ok is true). |
| [].data.queuedAt | string (ISO 8601) | Timestamp of queue entry (when ok is true). |
| [].error | string | Error message for the item that failed (when ok is false). |
Response example
/emails/:id200 OKGet email by ID
Returns the full details of an email: status, attempts, lifecycle timestamps, tags, body (html/text) and the API key used to send it.
Request example
Response
| Field | Type | Description |
|---|---|---|
| id | string (uuid) | Unique ID of the email. |
| from | string | Sender address. |
| to | string[] | List of recipients. |
| cc / bcc | string[] | null | List of cc and bcc recipients. |
| subject | string | null | Email subject. |
| status | 'queued' | 'processing' | 'sent' | 'delivered' | 'bounced' | 'failed' | 'skipped' | 'scheduled' | 'cancelled' | Current delivery status. |
| attempts | number | Number of send attempts made. |
| lastError | string | null | Last error message recorded for the send. |
| messageId | string | null | Message ID returned by the sending provider. |
| createdAt / scheduledAt / sentAt | string (ISO 8601) | null | Creation, scheduling and sending date/time of the email. |
| deliveredAt / bouncedAt / failedAt / complainedAt / suppressedAt | string (ISO 8601) | null | Delivery, bounce, failure or spam complaint date/time, if any. |
| openedAt / firstClickedAt | string (ISO 8601) | null | Date/time of the first open and the first link click. |
| openCount / clickCount | number | Number of opens and clicks recorded. |
| tags | { name, value }[] | null | Tags associated with the email. |
| html / text | string | null | Email body in HTML and plain text. |
| apiKey | { id, name } | null | API key used to send the email. |
Response example
/emails/:id/events200 OKEvent timeline
Returns the event history of an email (queued, processing, sent, delivered, opened, clicked, bounced, complained, failed), in chronological order.
Request example
Response
| Field | Type | Description |
|---|---|---|
| id | string (uuid) | Unique ID of the email. |
| events | { type, timestamp, metadata? }[] | Timeline of the email's events, each with type, timestamp and optional metadata. |
Response example
/emails/:id/cancel204 No ContentCancel scheduled email
Cancels an email that is still in scheduled status. Has no effect on emails that already entered processing or were sent. Returns no body.
Request example
/emails/:id/resend202 AcceptedResend email
Re-queues an email that failed or was cancelled, creating a new send cycle.
Request example
Response
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier of the new send. |
| status | 'queued' | 'scheduled' | Initial status of the email after resending. |
| queuedAt | string (ISO 8601) | Timestamp of queue entry. |
Response example
Domains
/domains201 CreatedAdd domain
Registers a domain in the organization and returns the DNS records (SPF, DKIM, DMARC and ownership) that need to be configured in the provider.
Request body
| Field | Type | Description |
|---|---|---|
| name* | string | FQDN to be registered (e.g. company.com). |
Request example
Response
| Field | Type | Description |
|---|---|---|
| id | string | Domain ID. |
| name | string | Domain name. |
| status | 'verified' | 'pending' | 'failed' | Validation status. |
| records | DomainDnsRecord[] | SPF/DKIM/DMARC/ownership. |
/domains/:id/verify202 AcceptedVerify domain
Runs on-demand verification of DNS records. Returns detailed checks (spf, dkim, dmarc, ownership).
Request example
/domains/:id/health200 OKDomain health
Reputation diagnostic, blacklist presence, and improvement recommendations.
Request example
/domains200 OKList domains
Lists all domains registered under the organization, with verification status and DKIM data.
Request example
Response
| Field | Type | Description |
|---|---|---|
| domains | DomainListItem[] | List of domains registered under the organization. |
| domains[].id | string (uuid) | Domain unique identifier. |
| domains[].name | string | Registered domain name. |
| domains[].status | 'pending' | 'verified' | 'failed' | Current verification status of the domain. |
| domains[].dkimSelector | string | Selector used in the domain's DKIM record. |
| domains[].dkimPublicKey | string | null | DKIM public key generated for the domain. |
| domains[].verifiedAt | string (ISO 8601) | null | Date and time the domain was verified. |
| domains[].lastCheckAt | string (ISO 8601) | null | Date and time of the last DNS check performed. |
| domains[].createdAt | string (ISO 8601) | Date and time the domain was registered. |
Response example
/domains/:id200 OKGet domain
Returns the detail of a domain, including the pending DNS records (TXT/CNAME) that still need to be published.
Request example
Response
| Field | Type | Description |
|---|---|---|
| id | string (uuid) | Domain unique identifier. |
| name | string | Registered domain name. |
| status | 'pending' | 'verified' | 'failed' | Current verification status of the domain. |
| dkimSelector | string | Selector used in the domain's DKIM record. |
| dkimPublicKey | string | null | DKIM public key generated for the domain. |
| verifiedAt | string (ISO 8601) | null | Date and time the domain was verified. |
| lastCheckAt | string (ISO 8601) | null | Date and time of the last DNS check performed. |
| createdAt | string (ISO 8601) | Date and time the domain was registered. |
| dnsRecordsToPublish | DnsRecord[] | Pending DNS records the client needs to publish. |
| dnsRecordsToPublish[].type | 'TXT' | 'CNAME' | Type of DNS record to publish (TXT or CNAME). |
| dnsRecordsToPublish[].host | string | Host/subdomain name where the record should be created. |
| dnsRecordsToPublish[].value | string | Value that must be published in the DNS record. |
| dnsRecordsToPublish[].ttl | number | Suggested TTL in seconds for the record. |
Response example
/domains/:id200 OKDelete domain
Soft-deletes a domain from the organization. If the account has reauthentication configured, method + credential must be sent; rate-limited to 5 requests per minute.
Request body
| Field | Type | Description |
|---|---|---|
| method | 'totp' | 'password' | Reauthentication method, 'totp' or 'password'. Required only if the account has reauth configured. |
| credential | string | TOTP code or password used to confirm the deletion. |
Request example
Response
| Field | Type | Description |
|---|---|---|
| ok | boolean | Confirms that the domain was removed. |
Response example
/domains/:id/warmup200 OKWarmup status
Checks the progress of IP/domain warmup. Returns null when the domain has not started warmup yet.
Request example
Response
| Field | Type | Description |
|---|---|---|
| domainId | string (uuid) | Domain unique identifier. |
| currentDay | number | Current day of the warmup period. |
| dailyQuota | number | Daily sending limit allowed for the current day. |
| sentToday | number | Number of emails already sent today. |
| remainingToday | number | Number of sends remaining in the daily quota. |
| quotaUsedPercent | number (0-100) | Percentage of the daily quota already used. |
| lastSendDate | string | null | Date of the last recorded send for the domain. |
Response example
Templates
/templates201 CreatedCreate template
Registers a template. Supports Handlebars HTML (format: handlebars) or React Email TSX (format: react_email).
Request body
| Field | Type | Description |
|---|---|---|
| name* | string | Template name. |
| subject | string | Default subject. |
| html | string | Content (Handlebars). |
| text | string | Plain text version. |
| format | 'handlebars' | 'react_email' | Template engine. |
| variables | { name, defaultValue? }[] | Expected variables. |
Request example
/templates/preview200 OKRender preview
Renders a preview without sending — useful for the playground and variable validation.
Request example
/templates200 OKList templates
Returns every template registered for the organisation, including the full source of each one.
Request example
Response
| Field | Type | Description |
|---|---|---|
| data | TemplateDetail[] | List of registered email templates. |
| data[].id | string (uuid) | Unique identifier of the template. |
| data[].name | string | Template name. |
| data[].subject | string | null | Default email subject. |
| data[].html | string | HTML or JSX source of the template. |
| data[].textPayload | string | null | Plain-text version of the template. |
| data[].variables | { name, description? }[] | Variables available for interpolation in the template. |
| data[].isActive | boolean | Whether the template is active for use. |
| data[].format | 'html' | 'react' | Format of the template source. |
| data[].sourceLocale | string | Source language of the template content. |
| data[].starterSlug | string | null | Slug of the starter template used as a base, if any. |
| data[].createdAt | string (ISO 8601) | Template creation date. |
| data[].updatedAt | string (ISO 8601) | Date of the last template update. |
Response example
/templates/:id200 OKGet template
Returns a single template by id, including the full source and available variables.
Request example
Response
| Field | Type | Description |
|---|---|---|
| id | string (uuid) | Unique identifier of the template. |
| name | string | Template name. |
| subject | string | null | Default email subject. |
| html | string | HTML or JSX source of the template. |
| textPayload | string | null | Plain-text version of the template. |
| variables | { name, description? }[] | Variables available for interpolation in the template. |
| isActive | boolean | Whether the template is active for use. |
| format | 'html' | 'react' | Format of the template source. |
| sourceLocale | string | Source language of the template content. |
| starterSlug | string | null | Slug of the starter template used as a base, if any. |
| createdAt | string (ISO 8601) | Template creation date. |
| updatedAt | string (ISO 8601) | Date of the last template update. |
Response example
/templates/:id200 OKUpdate template
Partially updates an existing template. Send only the fields you want to change.
Request body
| Field | Type | Description |
|---|---|---|
| name | string | New template name. |
| subject | string | null | New default email subject. |
| html | string | New HTML or JSX source. |
| textPayload | string | null | New plain-text version. |
| variables | { name, description? }[] | New list of variables available for interpolation. |
| format | 'html' | 'react' | New format of the source code. |
| isActive | boolean | Enables or disables the template. |
| sourceLocale | string | New source language of the content. |
| starterSlug | string | null | Slug of the starter template used as a base. |
Request example
Response
| Field | Type | Description |
|---|---|---|
| id | string (uuid) | Unique identifier of the template. |
| name | string | Template name. |
| isActive | boolean | Whether the template is active for use. |
| updatedAt | string (ISO 8601) | Date of the last template update. |
Response example
/templates/:id204 No ContentDelete template
Permanently removes a template. This action cannot be undone.
Request example
/templates/format200 OKFormat template
Formats a template's source code (HTML or JSX) via Prettier, without persisting anything.
Request body
| Field | Type | Description |
|---|---|---|
| html* | string | HTML or JSX source to format. |
| format | 'html' | 'react' | Format of the source code. |
Request example
Response
| Field | Type | Description |
|---|---|---|
| html | string | Formatted source code. |
Response example
/templates/test-render200 OKSanitized test render
Renders a template with variables and sanitizes the resulting HTML (strips scripts, iframes, javascript: links and inline event handlers). Unlike /templates/preview, which does not sanitize — use this endpoint to test untrusted content.
Request body
| Field | Type | Description |
|---|---|---|
| html* | string | HTML or JSX source of the template to render. |
| format | 'html' | 'react' | Format of the source template. |
| variables | Record<string, unknown> | Variable values used to populate the template. |
Request example
Response
| Field | Type | Description |
|---|---|---|
| html | string | Final rendered and sanitized HTML. |
| text | string | Plain-text version of the rendered email. |
| sanitizeReport | { scripts, iframes, javascriptHrefs, eventHandlers } | Report with the number of elements removed by sanitization (scripts, iframes, javascript: links and event handlers). |
Response example
Audiences and contacts
/audiences201 CreatedCreate audience
Creates a segmented contact list.
Request example
/audiences/:id/contacts201 CreatedAdd contact
Inserts a contact into an audience. Accepts firstName, lastName and arbitrary metadata.
Request example
/audiences200 OKList audiences
Lists the organization's audiences, with pagination.
Request body
| Field | Type | Description |
|---|---|---|
| limit | number | Maximum number of items per page (default 50, max 200). |
| offset | number | Number of items to skip from the start (default 0). |
Request example
Response
| Field | Type | Description |
|---|---|---|
| audiences | Audience[] | List of audiences found. |
| total | number | Total number of audiences in the organization. |
Response example
/audiences/:id200 OKGet audience
Returns the data for a specific audience.
Request example
Response
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier of the audience. |
| name | string | Audience name. |
| description | string | null | Audience description. |
| active | boolean | Whether the audience is active. |
| contactsCount | number | Number of contacts in the audience. |
| createdAt | string (ISO 8601) | Audience creation date. |
| updatedAt | string (ISO 8601) | Date of the audience's last update. |
Response example
/audiences/:id200 OKUpdate audience
Updates the name, description, and/or status of an audience. At least one field must be sent.
Request body
| Field | Type | Description |
|---|---|---|
| name | string | New audience name. |
| description | string | null | New audience description. Send null to clear it. |
| active | boolean | Whether the audience is active. |
Request example
Response
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier of the updated audience. |
Response example
/audiences/:id204 No ContentDelete audience
Permanently removes an audience and its contacts. Returns no response body.
Request example
/audiences/:id/contacts200 OKList audience contacts
Lists the contacts in an audience, with pagination.
Request body
| Field | Type | Description |
|---|---|---|
| limit | number | Maximum number of items per page (default 100, max 500). |
| offset | number | Number of items to skip from the start (default 0). |
Request example
Response
| Field | Type | Description |
|---|---|---|
| contacts | Contact[] | List of contacts found. |
| total | number | Total number of contacts in the audience. |
Response example
/audiences/:id/contacts/bulk200 OKBulk add contacts
Adds up to 10,000 contacts at once to an audience.
Request body
| Field | Type | Description |
|---|---|---|
| contacts* | { email, firstName?, lastName?, metadata? }[] | List of contacts to add (email required; firstName, lastName, and metadata optional). |
Request example
Response
| Field | Type | Description |
|---|---|---|
| inserted | number | Number of contacts successfully inserted. |
| skipped | number | Number of contacts skipped (e.g. duplicate emails within the audience). |
| errors | { email, reason }[] | List of per-email errors, with the reason for each failure. |
Response example
/audiences/:id/contacts/:contactId200 OKUpdate contact
Updates firstName, lastName, and/or metadata for a contact. At least one field must be sent.
Request body
| Field | Type | Description |
|---|---|---|
| firstName | string | null | New first name for the contact. Send null to clear it. |
| lastName | string | null | New last name for the contact. Send null to clear it. |
| metadata | Record<string, unknown> | Free-form extra data for the contact. |
Request example
Response
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier of the updated contact. |
Response example
/audiences/:id/contacts/:contactId204 No ContentRemove contact
Removes a contact from an audience. Returns no response body.
Request example
Campaigns (broadcasts)
/broadcasts201 CreatedCreate campaign
Creates a campaign for an audience. Can use an existing template (templateId) or own HTML. Accepts scheduling via scheduledAt.
Request example
/broadcasts/:id/send202 AcceptedSend campaign
Sets the campaign to sending state. RFC 8058 headers (List-Unsubscribe and List-Unsubscribe-Post) are injected automatically.
Request example
/broadcasts200 OKList campaigns
Lists the organization's broadcast campaigns. Filters by status and date range, with cursor pagination.
Request body
| Field | Type | Description |
|---|---|---|
| status | 'draft' | 'scheduled' | 'sending' | 'sent' | 'failed' | 'cancelled' | Filters by broadcast status. |
| from | string (ISO 8601) | Start of the search date range. |
| to | string (ISO 8601) | End of the search date range. |
| after | string | Pagination cursor returned by a previous call. |
| limit | number (max 200) | Maximum number of broadcasts returned per page. |
Request example
Response
| Field | Type | Description |
|---|---|---|
| broadcasts | Broadcast[] | List of broadcasts on the current page. |
| nextCursor | string | null | Cursor to fetch the next page, or null if there are no more results. |
Response example
/broadcasts/:id200 OKGet campaign
Returns the full data for a specific campaign, including status and recipient counters.
Request example
Response
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier of the broadcast. |
| audienceId | string | Identifier of the target audience. |
| audienceName | string | null | Name of the target audience. |
| templateId | string | null | Identifier of the template used in the send, if any. |
| subject | string | Email subject. |
| fromEmail | string | Sender email address. |
| replyTo | string | null | Reply-to email address. |
| status | 'draft' | 'scheduled' | 'sending' | 'sent' | 'failed' | 'cancelled' | Current status of the broadcast. |
| scheduledAt | string (ISO 8601) | null | Date and time scheduled for the send. |
| sentAt | string (ISO 8601) | null | Date and time the send completed. |
| cancelledAt | string (ISO 8601) | null | Date and time the broadcast was cancelled. |
| recipientsTotal | number | Total number of recipients for the broadcast. |
| recipientsQueued | number | Number of recipients queued for sending. |
| recipientsFailed | number | Number of recipients that failed to receive the send. |
| createdAt | string (ISO 8601) | Date the broadcast was created. |
| updatedAt | string (ISO 8601) | Date the broadcast was last updated. |
Response example
/broadcasts/:id/cancel200 OKCancel campaign
Cancels a scheduled or in-progress broadcast. Emails already delivered are not affected.
Request example
Response
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier of the broadcast. |
| status | 'cancelled' | Broadcast status after cancellation. |
| cancelledAt | string (ISO 8601) | null | Date and time the broadcast was cancelled. |
Response example
Suppressions
/suppressions200 OKList suppressions
Lists active blocks (bounces, complaints, unsubscribes and manual).
Request example
/suppressions201 CreatedAdd suppression
Manually adds an email to the suppression list.
Request body
| Field | Type | Description |
|---|---|---|
| email* | string (email) | Email address to suppress. |
| reason | 'manual' | 'bounce' | 'complaint' | Reason for the suppression. Only accepts 'manual', 'bounce', or 'complaint'. |
| expiresAt | string (ISO 8601) | Date when the suppression expires and the email can receive sends again. |
Request example
Response
| Field | Type | Description |
|---|---|---|
| id | string (uuid) | Unique identifier of the suppression. |
| string | Suppressed email address. | |
| reason | 'manual' | 'bounce' | 'isp_block' | 'mailbox_not_found' | 'complaint' | 'unsubscribe' | Reason that caused the suppression. |
| source | 'manual' | 'auto' | Suppression origin: manual or automatic. |
| category | string | Classification category of the suppression. |
| status | 'active' | 'expired' | 'inactive' | Current status of the suppression. |
| expiresAt | string (ISO 8601) | null | Date when the suppression expires and the email can receive sends again. |
| createdAt | string (ISO 8601) | Date the suppression was created. |
Response example
/suppressions/:id200 OKGet suppression
Returns the details of a specific suppression by id.
Request example
Response
| Field | Type | Description |
|---|---|---|
| id | string (uuid) | Unique identifier of the suppression. |
| string | Suppressed email address. | |
| reason | 'manual' | 'bounce' | 'isp_block' | 'mailbox_not_found' | 'complaint' | 'unsubscribe' | Reason that caused the suppression. |
| source | 'manual' | 'auto' | Suppression origin: manual or automatic. |
| category | string | Classification category of the suppression. |
| status | 'active' | 'expired' | 'inactive' | Current status of the suppression. |
| expiresAt | string (ISO 8601) | null | Date when the suppression expires and the email can receive sends again. |
| createdAt | string (ISO 8601) | Date the suppression was created. |
Response example
/suppressions/:id204 No ContentRemove suppression
Permanently removes a suppression from the list.
Request example
/suppressions/:id/reactivate204 No ContentReactivate suppression
Undoes a suppression, allowing the email to receive sends again.
Request example
Webhooks
/webhooks201 CreatedRegister webhook
Registers an HTTPS endpoint to receive events. We recommend providing a secret for HMAC SHA-256 validation.
Request body
| Field | Type | Description |
|---|---|---|
| url* | string (HTTPS) | Destination URL. |
| events* | WebhookEventType[] | Events to subscribe to (e.g. email.delivered). |
| secret | string | Secret key for HMAC. |
Request example
/webhooks/:id/test202 AcceptedTest webhook
Triggers a simulated event to validate the endpoint and configuration.
Request example
/webhooks200 OKList webhooks
Lists the webhooks registered for the organization, with an optional status filter.
Request body
| Field | Type | Description |
|---|---|---|
| status | 'active' | 'paused' | 'disabled' | Filters webhooks by their current status (active, paused, or disabled). |
Request example
Response
| Field | Type | Description |
|---|---|---|
| webhooks | WebhookListItem[] | List of webhooks registered for the organization. |
| webhooks[].id | string (uuid) | Webhook identifier. |
| webhooks[].url | string | Destination URL that receives the events. |
| webhooks[].events | string[] | Events the webhook is subscribed to. |
| webhooks[].status | 'active' | 'paused' | 'disabled' | Current status of the webhook. |
| webhooks[].description | string | null | User-provided description for the webhook. |
| webhooks[].hasSecret | boolean | Whether the webhook has a signing secret configured. |
| webhooks[].createdAt | string (ISO 8601) | Date and time the webhook was created. |
Response example
/webhooks/:id200 OKGet webhook
Returns details for a specific webhook, including a truncated preview of the signing secret.
Request example
Response
| Field | Type | Description |
|---|---|---|
| id | string (uuid) | Webhook identifier. |
| url | string | Destination URL that receives the events. |
| events | string[] | Events the webhook is subscribed to. |
| status | 'active' | 'paused' | 'disabled' | Current status of the webhook. |
| description | string | null | User-provided description for the webhook. |
| createdAt | string (ISO 8601) | Date and time the webhook was created. |
| secret | null | Always null on this route — the full secret isn't re-exposed after creation. |
| secretPreview | string | null | Truncated preview of the secret, for safe display. |
Response example
/webhooks/:id200 OKUpdate webhook
Updates url, events, and/or description on an existing webhook. At least one field must be sent.
Request body
| Field | Type | Description |
|---|---|---|
| url | string (URL) | New destination URL that will receive the events. |
| events | WebhookEventType[] | New events the webhook should subscribe to. |
| description | string | null | New description for the webhook (send null to clear it). |
Request example
Response
| Field | Type | Description |
|---|---|---|
| id | string (uuid) | Webhook identifier. |
| url | string | Destination URL that receives the events. |
| events | string[] | Events the webhook is subscribed to. |
| status | 'active' | 'paused' | 'disabled' | Current status of the webhook. |
| description | string | null | User-provided description for the webhook. |
| createdAt | string (ISO 8601) | Date and time the webhook was created. |
| secret | null | Always null on this route — the full secret isn't re-exposed after creation. |
| secretPreview | string | null | Truncated preview of the secret, for safe display. |
Response example
/webhooks/:id200 OKActivate or pause webhook
Changes only the webhook's status (active or paused), without touching url, events, or description.
Request body
| Field | Type | Description |
|---|---|---|
| status* | 'active' | 'paused' | New status for the webhook (active or paused). |
Request example
Response
| Field | Type | Description |
|---|---|---|
| id | string (uuid) | Webhook identifier. |
| status | 'active' | 'paused' | New status applied to the webhook. |
Response example
/webhooks/:id204 No ContentDelete webhook
Permanently removes the webhook from the organization. Returns no response body.
Request example
/webhooks/:id/deliveries200 OKList webhook deliveries
Lists event delivery attempts for a webhook, with filters by event type, status, and time period.
Request body
| Field | Type | Description |
|---|---|---|
| eventType | string | Filters deliveries by event type. |
| status | 'pending' | 'success' | 'failed' | 'exhausted' | Filters deliveries by their current status. |
| from | string (ISO 8601) | Start date of the search period. |
| to | string (ISO 8601) | End date of the search period. |
| limit | number (max 200) | Maximum number of deliveries returned (up to 200). |
Request example
Response
| Field | Type | Description |
|---|---|---|
| deliveries | WebhookDelivery[] | List of delivery attempts for the webhook. |
| deliveries[].id | string (uuid) | Delivery attempt identifier. |
| deliveries[].webhookId | string (uuid) | Identifier of the associated webhook. |
| deliveries[].emailEventId | string (uuid) | null | Email event that triggered the delivery. |
| deliveries[].eventType | string | Type of event fired (e.g. email.delivered). |
| deliveries[].responseStatus | number | null | HTTP status returned by the destination endpoint. |
| deliveries[].responseBody | string | null | Response body returned by the destination endpoint. |
| deliveries[].attempts | number | Number of delivery attempts made so far. |
| deliveries[].lastError | string | null | Message from the last error encountered while sending. |
| deliveries[].status | 'pending' | 'success' | 'failed' | 'exhausted' | Current delivery status. |
| deliveries[].nextRunAt | string (ISO 8601) | Date and time of the next retry attempt. |
| deliveries[].createdAt | string (ISO 8601) | Date and time the delivery was created. |
Response example
/webhooks/:id/rotate-secret200 OKRotate secret
Generates a new HMAC signing secret for the webhook, invalidating the previous one. The full value is returned only in this response.
Request example
Response
| Field | Type | Description |
|---|---|---|
| webhookId | string (uuid) | Webhook identifier. |
| secret | string | New full secret, used to sign outgoing payloads — shown only once. |
Response example
Statistics
/stats200 OKGeneral metrics
Returns aggregated counters (sent, delivered, failed, bounced, complained, opened?, clicked?).
Request example
Senders
/senders201 CreatedCreate sender
Registers a single-email sender identity and triggers a verification email. The response includes a verificationToken, but the identity can't be used for sending until POST /senders/verify confirms the verification.
Request body
| Field | Type | Description |
|---|---|---|
| email* | string (email) | Sender email address to be verified. |
| displayName | string (max 200) | Sender display name. |
Request example
Response
| Field | Type | Description |
|---|---|---|
| id | string (uuid) | Unique sender identifier. |
| string | Sender email address. | |
| displayName | string | null | Sender display name. |
| verificationToken | string | Token sent to the email to confirm verification. |
| verifiedAt | string (ISO 8601) | null | Date/time the sender was verified. |
| active | boolean | Whether the sender is active for sending. |
| createdAt | string (ISO 8601) | Sender creation date/time. |
Response example
/senders200 OKList senders
Lists the single-email sender identities registered for the organisation.
Request example
Response
| Field | Type | Description |
|---|---|---|
| senders | Sender[] | List of the organisation's senders. |
Response example
/senders/verify200 OKVerify sender
Confirms verification of a single-email sender using the token sent by email. Once verified, the address can be used in the "from" field of outgoing emails.
Request body
| Field | Type | Description |
|---|---|---|
| token* | string (uuid) | Verification token received by email. |
Request example
Response
| Field | Type | Description |
|---|---|---|
| id | string (uuid) | Unique sender identifier. |
| string | Sender email address. |
Response example
/senders/:id204 No ContentDelete sender
Removes a single-email sender identity from the organisation. Deletion is permanent and the address must be verified again if re-registered.