API Reference
The full API reference is generated from the same public contract used by the API worker and SDK tooling. Use the API reference to find exact paths, methods, parameters, request schemas, response schemas, operation IDs, and the downloadable OpenAPI document.
OpenAPI Contract
Download the exact schema document that powers this reference and the public worker.
Platform
Version metadata, discovery URLs, capability discovery, and the machine-readable OpenAPI document.
/v1 Get API metadata
Returns the current public API version and discovery links for docs, llms files, the OpenAPI contract, webhook subscriptions, and the authenticated capability endpoint.
Responses
{
"$ref": "#/components/schemas/ApiMetadata"
} /v1/capabilities Get authenticated API capabilities
Returns the current workspace context, discovery URLs, shared request conventions, supported webhook events, and public resource operations available to the authenticated bearer credential.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Capabilities"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/openapi.json Get the OpenAPI document
Returns the machine-readable OpenAPI 3.1 contract for the current public API.
Responses
{
"type": "object"
} Workspace
Read the current authenticated workspace profile and execution context.
/v1/workspace Get the current workspace
Returns the authenticated workspace profile and mailing context used by broadcasts, sequences, automations, forms, and magic links.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Workspace"
}
}
} {
"$ref": "#/components/schemas/Error"
} Analytics
Run bounded aggregate delivery and engagement reports.
/v1/analytics/reports Create or reuse an analytics report
Runs from compact rollups. Ranges through 31 days complete inline; longer ranges are queued. Results expire after 24 hours and never exceed 100 rows.
Parameters
Idempotency-Key header Optional idempotency key to retry the request safely. It must not exceed 256 UTF-8 bytes.
Request Body
{
"$ref": "#/components/schemas/AnalyticsReportCreateRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/AnalyticsReport"
}
}
} {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/AnalyticsReport"
}
}
} /v1/analytics/reports/{report_id} Get an analytics report
Returns one unexpired bounded analytics report by identifier.
Parameters
report_id path
required
Stable analytics report identifier.
limit query Maximum aggregate row count, from 1 to 50.
starting_after query Opaque next_cursor returned by the previous report page.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/AnalyticsReport"
}
}
} Diagnostics
Inspect bounded workflow and delivery diagnostics.
/v1/diagnostics/automations/{automation_id}/runs List Automation run diagnostics
Returns at most 50 recent runs with redacted errors and bounded step execution details.
Parameters
automation_id path
required
Automation identifier.
limit query Maximum run count, from 1 to 50.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/DiagnosticResult"
}
}
} /v1/diagnostics/automations/{automation_id}/runs/{run_id} Get Automation run diagnostics
Returns one Automation run with status, timing, retries, outcomes, and redacted step failures.
Parameters
automation_id path
required
Automation identifier.
run_id path
required
Automation run identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/DiagnosticResult"
}
}
} /v1/diagnostics/broadcasts/{broadcast_id} Get Broadcast diagnostics
Returns selection totals, provider readiness, and the 20 most common structured delivery reasons.
Parameters
broadcast_id path
required
Broadcast identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/DiagnosticResult"
}
}
} /v1/diagnostics/sequences/{sequence_id} Get Sequence diagnostics
Returns bounded Sequence failure, retry, status, and message outcome details.
Parameters
sequence_id path
required
Sequence identifier.
limit query Maximum failure count, from 1 to 50.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/DiagnosticResult"
}
}
} /v1/diagnostics/subscribers/{subscriber_id} Get privacy-conscious Subscriber diagnostics
Returns a 90-day, bounded activity view without exposing the Subscriber email address.
Parameters
subscriber_id path
required
Subscriber identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/DiagnosticResult"
}
}
} Subscribers
Create or upsert subscribers and list subscriber records in a workspace.
/v1/subscribers List subscribers
Returns subscribers in the authenticated workspace, sorted from newest to oldest.
Parameters
search query Filter subscribers by name, email, or status.
email query Filter subscribers by an exact subscriber email address.
status query Filter subscribers by subscriber status.
cold_only query When `true`, return only cold subscribers.
tag_id query Return subscribers that currently have this tag ID. Repeat `tag_id` or use `tag_ids` to match any of several tags.
tag_ids query Comma-separated tag IDs. By default, the API returns subscribers who have any listed tag.
tag_operator query Controls how tag filters are applied. Defaults to `has_any_of`.
sequence_id query Return subscribers that match this sequence ID. Repeat `sequence_id` or use `sequence_ids` to match any of several sequences.
sequence_ids query Comma-separated sequence IDs. By default, the API returns only subscribers who are active in any listed sequence.
sequence_operator query Controls how sequence filters are applied. Defaults to `is_active_in_any_of`.
limit query Maximum number of subscribers to return. Defaults to 25 and is capped at 100.
starting_after query Use the opaque cursor from the previous page to request the next page.
Responses
{
"type": "object",
"required": [
"data",
"pagination"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Subscriber"
}
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/subscribers Create or upsert a subscriber
Creates a new subscriber when the email does not exist in the workspace. If the email already exists, the API updates the existing subscriber unless create_only is true.
Parameters
Idempotency-Key header Optional idempotency key to retry the request safely. It must not exceed 256 UTF-8 bytes.
Request Body
{
"$ref": "#/components/schemas/SubscriberUpsertRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Subscriber"
}
}
} {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Subscriber"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/subscribers/{subscriber_id} Get a subscriber
Returns one Subscriber by its stable identifier from the authenticated workspace.
Parameters
subscriber_id path
required
The Subscriber identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Subscriber"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/subscribers/{subscriber_id} Update a subscriber
Updates profile fields, status, custom fields, tags, or sequence assignments for one subscriber. Fields omitted from the request stay unchanged. Blank optional custom field values also leave saved values unchanged, and filled-in invalid values are rejected.
Parameters
subscriber_id path
required
The subscriber identifier.
Request Body
{
"$ref": "#/components/schemas/SubscriberUpdateRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Subscriber"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/subscribers/{subscriber_id} Delete a subscriber
Permanently removes one Subscriber and their Mailrith activity history from the authenticated workspace.
Parameters
subscriber_id path
required
The Subscriber identifier.
Responses
{
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/subscribers/{subscriber_id}/sequences/{sequence_id} Add a subscriber to a sequence
Adds the selected subscriber to the selected sequence. If the subscriber is already in the sequence, the API returns the subscriber unchanged.
Parameters
subscriber_id path
required
The subscriber identifier.
sequence_id path
required
The sequence identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Subscriber"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/subscribers/{subscriber_id}/sequences/{sequence_id} Remove a subscriber from a sequence
Removes the selected subscriber from the selected sequence. If the subscriber is not in the sequence, the API returns the subscriber unchanged.
Parameters
subscriber_id path
required
The subscriber identifier.
sequence_id path
required
The sequence identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Subscriber"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/subscribers/{subscriber_id}/status Change Subscriber sending eligibility
Changes the delivery status for one Subscriber without changing profile, targeting, or Sequence enrollment fields. Making a Subscriber Active requires consent_evidence; its collected_at value must include the correct UTC offset and must not be later than Mailrith's server time.
Parameters
subscriber_id path
required
The Subscriber identifier.
Request Body
{
"$ref": "#/components/schemas/SubscriberStatusRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Subscriber"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/subscribers/{subscriber_id}/tags/{tag_id} Add a Tag to a Subscriber
Adds the selected Tag to a Subscriber. If the Subscriber already has the Tag, the API returns the Subscriber unchanged.
Parameters
subscriber_id path
required
The Subscriber identifier.
tag_id path
required
The Tag identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Subscriber"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/subscribers/{subscriber_id}/tags/{tag_id} Remove a tag from a subscriber
Removes the selected tag from a subscriber. If the subscriber does not have the tag, the API returns the subscriber unchanged.
Parameters
subscriber_id path
required
The subscriber identifier.
tag_id path
required
The tag identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Subscriber"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} Custom Fields
Read and manage the typed custom-field schema available to the authenticated workspace.
/v1/custom-fields List custom fields
Returns a bounded page of custom fields in the authenticated workspace, including each field's exact ready-to-use email personalization token.
Parameters
search query Filter custom fields by label or type.
limit query Maximum number of custom fields to return.
starting_after query Use the opaque cursor from the previous page to request the next page.
Responses
{
"type": "object",
"required": [
"data",
"pagination"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CustomField"
}
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/custom-fields Create a custom field
Creates a workspace-scoped custom-field definition.
Parameters
Idempotency-Key header Optional idempotency key to retry the request safely. It must not exceed 256 UTF-8 bytes.
Request Body
{
"$ref": "#/components/schemas/CustomFieldUpsertRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/CustomField"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/custom-fields/{custom_field_id} Get a custom field
Returns one custom field from the authenticated workspace, including its exact ready-to-use email personalization token.
Parameters
custom_field_id path
required
The custom field identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/CustomField"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/custom-fields/{custom_field_id} Update a custom field
Updates a custom-field definition for the authenticated workspace.
Parameters
custom_field_id path
required
The identifier of the custom field to update.
Request Body
{
"$ref": "#/components/schemas/CustomFieldUpdateRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/CustomField"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/custom-fields/{custom_field_id} Delete a custom field
Deletes a custom-field definition from the authenticated workspace.
Parameters
custom_field_id path
required
The identifier of the custom field to delete.
Responses
{
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} Sender Identities
Read enabled sender names and email addresses without exposing provider credentials.
/v1/sender-identities List sender identities
Returns a bounded page of enabled sender names, addresses, and provider types that can be selected for Broadcasts and Sequences. Provider credentials and configuration are never returned.
Parameters
limit query Maximum number of sender identities to return.
starting_after query Opaque next_cursor returned by the previous sender identity page.
Responses
{
"type": "object",
"required": [
"data",
"pagination"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SenderIdentity"
}
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/sender-identities/{sender_identity_id} Get a sender identity
Returns one enabled sender name, address, and provider type by stable identifier. Provider credentials and configuration are never returned.
Parameters
sender_identity_id path
required
The sender identity identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/SenderIdentity"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} Email Delivery Connections
Create and manage the selected workspace's email delivery service connection without returning saved credentials.
/v1/email-delivery-connection-setup-sessions Start secure email delivery connection setup
Creates a short-lived browser handoff containing only non-secret defaults. Open setup_url so an authorized Mailrith user can enter provider credentials directly in Mailrith.
Request Body
{
"$ref": "#/components/schemas/EmailDeliveryConnectionSetupRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/EmailDeliveryConnectionSetupSession"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/email-delivery-connection-setup-sessions/{setup_session_id} Get secure setup status
Returns pending or completed status for one short-lived setup session. It never returns the browser token or provider credentials.
Parameters
setup_session_id path
required
The identifier returned when setup started.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/EmailDeliveryConnectionSetupSession"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/email-delivery-connection-setup-sessions/{setup_session_id}/renew Renew secure email delivery setup
Creates a fresh short-lived browser link from the previous session's bounded non-secret defaults. Completed sessions cannot be renewed.
Parameters
setup_session_id path
required
The previous setup session identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/EmailDeliveryConnectionSetupSession"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/email-delivery-connections List email delivery connections
Returns a bounded page of email delivery connections linked to the authenticated workspace. Saved credentials and webhook secrets are never returned.
Parameters
limit query Maximum number of connections to return.
starting_after query Opaque next_cursor returned by the previous connection page.
Responses
{
"type": "object",
"required": [
"data",
"pagination"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/EmailDeliveryConnection"
}
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/email-delivery-connections/{connection_id} Get an email delivery connection
Returns one secret-free email delivery connection linked to the authenticated workspace.
Parameters
connection_id path
required
The identifier of the connection to return.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/EmailDeliveryConnection"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/email-delivery-connections/{connection_id} Update an email delivery connection
Changes non-secret details for one connection linked only to the authenticated workspace. Use a secure setup session to replace provider credentials. Shared connections must be changed in the Mailrith UI.
Parameters
connection_id path
required
The identifier of the connection to update.
Request Body
{
"$ref": "#/components/schemas/EmailDeliveryConnectionUpdateRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/EmailDeliveryConnection"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/email-delivery-connections/{connection_id} Delete an email delivery connection
Deletes one connection linked only to the authenticated workspace. Shared or in-use connections are not deleted.
Parameters
connection_id path
required
The identifier of the connection to delete.
Responses
{
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/email-delivery-connections/{connection_id}/status Enable or disable an email delivery connection
Enables or disables one connection linked only to the authenticated workspace. Shared or in-use connections remain protected.
Parameters
connection_id path
required
The identifier of the connection to change.
Request Body
{
"$ref": "#/components/schemas/EmailDeliveryConnectionStatusRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/EmailDeliveryConnection"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/email-delivery-connections/{connection_id}/test Send an email delivery connection test
Sends one real test email through the saved connection. This is the definitive check when a send-only provider key cannot be inspected.
Parameters
connection_id path
required
The identifier of the connection to test.
Idempotency-Key header
required
Required idempotency key that prevents an automatic retry from repeating the action. It must not exceed 256 UTF-8 bytes.
Request Body
{
"$ref": "#/components/schemas/EmailDeliveryConnectionTestRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"required": [
"connection_id",
"recipient",
"status",
"sent_at"
],
"properties": {
"connection_id": {
"type": "string"
},
"recipient": {
"type": "string",
"format": "email"
},
"status": {
"type": "string",
"enum": [
"sent"
]
},
"sent_at": {
"type": "string",
"format": "date-time"
},
"provider_message_ids": {
"type": "array",
"minItems": 1,
"maxItems": 5,
"items": {
"type": "string",
"nullable": true,
"maxLength": 200
},
"description": "Provider acceptance IDs in sent-message order; null when unavailable. These are not delivery or inbox receipts."
}
}
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/email-delivery-connections/{connection_id}/verify Verify an email delivery connection
Checks the saved provider credential and sender without returning secrets. If the provider key allows sending but not inspection, the response clearly requires a real test email.
Parameters
connection_id path
required
The identifier of the connection to verify.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"required": [
"connection_id",
"verification_status",
"inspection_status",
"message",
"verified_at"
],
"properties": {
"connection_id": {
"type": "string"
},
"verification_status": {
"type": "string",
"enum": [
"verified",
"send_test_required"
]
},
"inspection_status": {
"type": "string",
"enum": [
"available",
"unavailable"
]
},
"message": {
"type": "string"
},
"verified_at": {
"type": "string",
"format": "date-time"
}
}
}
}
} {
"$ref": "#/components/schemas/Error"
} Email Templates
Create and manage reusable email templates for the authenticated workspace.
/v1/email-templates List email templates
Returns reusable email templates linked to the authenticated workspace.
Parameters
search query Filter email templates by name.
limit query Maximum number of items to return.
starting_after query Opaque cursor returned by the previous page.
Responses
{
"type": "object",
"required": [
"data",
"pagination"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/EmailTemplateSummary"
}
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/email-templates Create an email template
Creates a reusable email template scoped to the authenticated workspace.
Parameters
Idempotency-Key header Optional idempotency key to retry the request safely. It must not exceed 256 UTF-8 bytes.
Request Body
{
"$ref": "#/components/schemas/EmailTemplateUpsertRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/EmailTemplate"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/email-templates/{template_id} Get an email template
Returns a reusable email template linked to the authenticated workspace.
Parameters
template_id path
required
The email template identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/EmailTemplate"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/email-templates/{template_id} Update an email template
Updates the content or enabled state of an existing email template.
Parameters
template_id path
required
The email template identifier.
Request Body
{
"$ref": "#/components/schemas/EmailTemplateUpdateRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/EmailTemplate"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/email-templates/{template_id} Delete an email template
Deletes an existing email template linked to the authenticated workspace.
Parameters
template_id path
required
The email template identifier.
Responses
{
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/email-templates/{template_id}/preview Preview an email template for a Subscriber
Renders one template using a saved Subscriber's name, email, and custom fields without sending or saving anything.
Parameters
template_id path
required
The email template identifier.
Request Body
{
"$ref": "#/components/schemas/SubscriberPreviewRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/EmailTemplatePreview"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} Forms
Read and manage embeddable form definitions and presentation settings.
/v1/forms List forms
Returns forms from the authenticated workspace.
Parameters
search query Filter Forms by name or public URL token. Retrieve a known Form ID through the item endpoint.
limit query The maximum number of forms to return.
starting_after query The opaque cursor from the previous page of forms.
Responses
{
"type": "object",
"required": [
"data",
"pagination"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FormSummary"
}
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/forms Create a form
Creates a form in the authenticated workspace.
Parameters
Idempotency-Key header Optional idempotency key to retry the request safely. It must not exceed 256 UTF-8 bytes.
Request Body
{
"$ref": "#/components/schemas/FormUpsertRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Form"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/forms/{form_id} Get a form
Returns a form from the authenticated workspace.
Parameters
form_id path
required
The identifier of the form to return.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Form"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/forms/{form_id} Update a form
Updates an existing form without creating a new form.
Parameters
form_id path
required
The identifier of the form to update.
Request Body
{
"$ref": "#/components/schemas/FormUpdateRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Form"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/forms/{form_id} Delete a form
Deletes a form from the authenticated workspace.
Parameters
form_id path
required
The identifier of the form to delete.
Responses
{
"$ref": "#/components/schemas/Error"
} /v1/forms/{form_id}/double-opt-in-preview Preview a form confirmation email for a Subscriber
Renders the configured double opt-in email for a saved Subscriber without sending or saving anything.
Parameters
form_id path
required
The form identifier.
Request Body
{
"$ref": "#/components/schemas/SubscriberPreviewRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/DoubleOptInEmailPreview"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/forms/{form_id}/submissions List form submissions
Returns a bounded cursor page of retained submissions for one Form, including the Subscriber who submitted it.
Parameters
form_id path
required
The identifier of the form whose submissions you want to list.
limit query The maximum number of submissions to return. Defaults to 25 and is capped at 100.
starting_after query The opaque cursor from the previous page of form submissions.
Responses
{
"type": "object",
"required": [
"data",
"pagination"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FormSubmission"
}
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/forms/{form_id}/submissions/{submission_id} Get a form submission
Returns one retained Form submission by stable identifier.
Parameters
form_id path
required
The Form identifier.
submission_id path
required
The Form submission identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/FormSubmission"
}
}
} {
"$ref": "#/components/schemas/Error"
} Landing Pages
Read and manage hosted landing pages, page definitions, and public URLs.
/v1/landing-pages List landing pages
Returns landing pages from the authenticated workspace.
Parameters
search query Filter Landing Pages by name, slug, custom path, or public URL token. Retrieve a known Landing Page ID through the item endpoint.
limit query The maximum number of landing pages to return.
starting_after query The opaque cursor from the previous page of landing pages.
Responses
{
"type": "object",
"required": [
"data",
"pagination"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LandingPageSummary"
}
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/landing-pages Create a landing page
Creates a hosted landing page in the authenticated workspace.
Parameters
Idempotency-Key header Optional idempotency key to retry the request safely. It must not exceed 256 UTF-8 bytes.
Request Body
{
"$ref": "#/components/schemas/LandingPageUpsertRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/LandingPage"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/landing-pages/{landing_page_id} Get a landing page
Returns a landing page from the authenticated workspace.
Parameters
landing_page_id path
required
The identifier of the landing page to return.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/LandingPage"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/landing-pages/{landing_page_id} Update a landing page
Updates an existing hosted landing page without creating a new landing page.
Parameters
landing_page_id path
required
The identifier of the landing page to update.
Request Body
{
"$ref": "#/components/schemas/LandingPageUpdateRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/LandingPage"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/landing-pages/{landing_page_id} Delete a landing page
Deletes a landing page from the authenticated workspace.
Parameters
landing_page_id path
required
The identifier of the landing page to delete.
Responses
{
"$ref": "#/components/schemas/Error"
} /v1/landing-pages/{landing_page_id}/double-opt-in-preview Preview a landing page confirmation email for a Subscriber
Renders the configured double opt-in email for a saved Subscriber without sending or saving anything.
Parameters
landing_page_id path
required
The landing page identifier.
Request Body
{
"$ref": "#/components/schemas/SubscriberPreviewRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/DoubleOptInEmailPreview"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/landing-pages/{landing_page_id}/submissions List landing page submissions
Returns a bounded cursor page of retained submissions for one Landing Page, including the Subscriber who submitted it.
Parameters
landing_page_id path
required
The identifier of the landing page whose submissions you want to list.
limit query The maximum number of submissions to return. Defaults to 25 and is capped at 100.
starting_after query The opaque cursor from the previous page of landing page submissions.
Responses
{
"type": "object",
"required": [
"data",
"pagination"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LandingPageSubmission"
}
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/landing-pages/{landing_page_id}/submissions/{submission_id} Get a landing page submission
Returns one retained Landing Page submission by stable identifier.
Parameters
landing_page_id path
required
The Landing Page identifier.
submission_id path
required
The Landing Page submission identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/LandingPageSubmission"
}
}
} {
"$ref": "#/components/schemas/Error"
} Sequences
Create and manage email sequences, sequence status, and delivery configuration.
/v1/sequences List sequences
Returns sequences in the authenticated workspace.
Parameters
search query Filter sequences by name, status, or sender details. Retrieve a known Sequence ID through the item endpoint.
limit query Maximum number of sequences to return.
starting_after query Use the opaque cursor from the previous page to request the next page.
Responses
{
"type": "object",
"required": [
"data",
"pagination"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SequenceSummary"
}
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/sequences Create a sequence
Creates a sequence in the authenticated workspace.
Parameters
Idempotency-Key header Optional idempotency key to retry the request safely. It must not exceed 256 UTF-8 bytes.
Request Body
{
"$ref": "#/components/schemas/SequenceUpsertRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Sequence"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/sequences/{sequence_id} Get a sequence
Returns one sequence from the authenticated workspace.
Parameters
sequence_id path
required
The sequence identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Sequence"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/sequences/{sequence_id} Update a sequence
Updates an existing paused Sequence. Before changing a running Sequence, read it by ID, retain its status in the current task only, pause it, apply the update, and use bounded direct item reads until is_updating is false. Run preflight, return it to running only if it was running before and preflight passes, and verify the final status. If the update fails before changing the Sequence, restore its prior running status when preflight passes. If readiness or the prior status cannot be restored, leave it paused and immediately report the failure; never activate a Sequence that was not already running.
Parameters
sequence_id path
required
The sequence identifier.
Request Body
{
"$ref": "#/components/schemas/SequenceUpdateRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Sequence"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/sequences/{sequence_id} Delete a sequence
Deletes an existing sequence from the authenticated workspace.
Parameters
sequence_id path
required
The sequence identifier.
Responses
{
"$ref": "#/components/schemas/Error"
} /v1/sequences/{sequence_id}/journey-preview Preview a sequence journey
Returns the bounded saved email timeline and shows which messages a selected Subscriber is eligible to receive, without enrolling the Subscriber or sending email.
Parameters
sequence_id path
required
The Sequence identifier.
subscriber_id query
required
The saved Subscriber whose personalization and targeting should be previewed.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/SequenceJourneyPreview"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/sequences/{sequence_id}/preflight Check sequence readiness
Checks the saved Sequence, its published emails, and its email delivery connection without changing data or sending email.
Parameters
sequence_id path
required
The Sequence identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/SequencePreflight"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/sequences/{sequence_id}/status Activate or pause a sequence
Starts or pauses one Sequence without changing its content or delivery settings.
Parameters
sequence_id path
required
The Sequence identifier.
Request Body
{
"$ref": "#/components/schemas/SequenceStatusRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Sequence"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/sequences/{sequence_id}/test Send sequence test messages
Sends up to five selected saved Sequence emails to one explicit test address. This does not enroll a Subscriber, start the Sequence, or write delivery activity.
Parameters
sequence_id path
required
The Sequence identifier.
Idempotency-Key header Optional idempotency key to retry the request safely. It must not exceed 256 UTF-8 bytes.
Request Body
{
"$ref": "#/components/schemas/WorkflowTestRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/WorkflowTestResult"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} Automations
Create and manage automation definitions and lifecycle state.
/v1/automations List automations
Returns automations in the authenticated workspace.
Parameters
search query Filter Automations by name or status.
limit query Maximum number of automations to return.
starting_after query Use the opaque cursor from the previous page to request the next page.
Responses
{
"type": "object",
"required": [
"data",
"pagination"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AutomationSummary"
}
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/automations Create an automation
Creates an automation in the authenticated workspace.
Parameters
Idempotency-Key header Optional idempotency key to retry the request safely. It must not exceed 256 UTF-8 bytes.
Request Body
{
"$ref": "#/components/schemas/AutomationUpsertRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Automation"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/automations/{automation_id} Get an automation
Returns one automation from the authenticated workspace.
Parameters
automation_id path
required
The automation identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Automation"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/automations/{automation_id} Update an automation
Updates an existing draft or paused Automation. Before changing a running Automation, read it by ID, retain its status in the current task only, pause it, apply the update, and use bounded direct item reads until is_updating is false. Run preflight, return it to running only if it was running before and preflight passes, and verify the final status. If the update fails before changing the Automation, restore its prior running status when preflight passes. If readiness or the prior status cannot be restored, leave it paused and immediately report the failure; never activate an Automation that was not already running.
Parameters
automation_id path
required
The automation identifier.
Request Body
{
"$ref": "#/components/schemas/AutomationUpdateRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Automation"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/automations/{automation_id} Delete an automation
Deletes an automation from the authenticated workspace.
Parameters
automation_id path
required
The automation identifier.
Responses
{
"$ref": "#/components/schemas/Error"
} /v1/automations/{automation_id}/journey-preview Preview an automation journey
Shows the bounded path a selected Subscriber would take through the current saved conditions without running actions or writing history.
Parameters
automation_id path
required
The Automation identifier.
subscriber_id query
required
The saved Subscriber whose current state should be evaluated.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/AutomationJourneyPreview"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/automations/{automation_id}/preflight Check automation readiness
Checks the saved Automation definition and email delivery prerequisite without running any action.
Parameters
automation_id path
required
The Automation identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/AutomationPreflight"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/automations/{automation_id}/status Change an automation status
Starts, pauses, or returns one Automation to draft without changing its definition.
Parameters
automation_id path
required
The Automation identifier.
Request Body
{
"$ref": "#/components/schemas/AutomationStatusRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Automation"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/automations/{automation_id}/test Send automation test messages
Sends up to five selected saved Automation email steps to one explicit test address. This does not start the Automation or run other actions.
Parameters
automation_id path
required
The Automation identifier.
Idempotency-Key header Optional idempotency key to retry the request safely. It must not exceed 256 UTF-8 bytes.
Request Body
{
"$ref": "#/components/schemas/WorkflowTestRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/WorkflowTestResult"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} Magic Links
Create and manage magic links used in broadcasts, sequences, and automations.
/v1/magic-links List magic links
Returns magic links in the authenticated workspace.
Parameters
search query Filter Magic Links by name, destination, or success message.
limit query Maximum number of magic links to return.
starting_after query Use the opaque cursor from the previous page to request the next page.
Responses
{
"type": "object",
"required": [
"data",
"pagination"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MagicLinkSummary"
}
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/magic-links Create a magic link
Creates a magic link in the authenticated workspace.
Parameters
Idempotency-Key header Optional idempotency key to retry the request safely. It must not exceed 256 UTF-8 bytes.
Request Body
{
"$ref": "#/components/schemas/MagicLinkUpsertRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/MagicLink"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/magic-links/{magic_link_id} Get a magic link
Returns one magic link from the authenticated workspace.
Parameters
magic_link_id path
required
The magic link identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/MagicLink"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/magic-links/{magic_link_id} Update a magic link
Updates an existing magic link.
Parameters
magic_link_id path
required
The magic link identifier.
Request Body
{
"$ref": "#/components/schemas/MagicLinkUpdateRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/MagicLink"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/magic-links/{magic_link_id} Delete a magic link
Deletes a magic link from the authenticated workspace.
Parameters
magic_link_id path
required
The magic link identifier.
Responses
{
"$ref": "#/components/schemas/Error"
} Broadcasts
Create, schedule, test, send, and inspect one-off broadcasts.
/v1/broadcasts List broadcasts
Returns broadcast drafts, scheduled sends, active sends, and completed sends.
Parameters
search query Filter Broadcasts by subject, preview text, status, or sender.
limit query Maximum number of items to return.
starting_after query Opaque cursor returned by the previous page.
Responses
{
"type": "object",
"required": [
"data",
"pagination"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BroadcastSummary"
}
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/broadcasts Create a broadcast
Creates a broadcast draft in the authenticated workspace.
Parameters
Idempotency-Key header Optional idempotency key to retry the request safely. It must not exceed 256 UTF-8 bytes.
Request Body
{
"$ref": "#/components/schemas/BroadcastUpsertRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Broadcast"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/broadcasts/{broadcast_id} Get a broadcast
Returns a broadcast draft, scheduled send, active send, or completed send.
Parameters
broadcast_id path
required
The broadcast identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Broadcast"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/broadcasts/{broadcast_id} Update a broadcast
Updates an existing Broadcast draft. Scheduled, running, completed, and failed Broadcasts cannot be changed here. Before changing a scheduled Broadcast, read it by ID and retain its scheduled_at in the current task only. If the saved time is no longer safely in the future, ask the user for a new time before unscheduling. Otherwise unschedule it, apply the update, reschedule it for the same time, and verify both status and scheduled_at. If the update fails after unscheduling, restore the unchanged Broadcast to the same future time when possible. If the schedule cannot be restored, leave it as a Draft and immediately report that it will not send; never choose a replacement time without the user.
Parameters
broadcast_id path
required
The broadcast identifier.
Request Body
{
"$ref": "#/components/schemas/BroadcastUpdateRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Broadcast"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/broadcasts/{broadcast_id} Delete a broadcast
Deletes a draft, scheduled, or failed broadcast from the authenticated workspace. Broadcasts cannot be deleted after they start sending.
Parameters
broadcast_id path
required
The broadcast identifier.
Responses
{
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/broadcasts/{broadcast_id}/cancel Cancel a broadcast send
Requests cancellation for delivery work that has not reached the provider. Provider-accepted emails cannot be recalled. Repeat the same request with the same idempotency key when the response is lost.
Parameters
broadcast_id path
required
The broadcast identifier.
Idempotency-Key header Optional idempotency key to retry the request safely. It must not exceed 256 UTF-8 bytes.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"required": [
"status",
"run_id",
"changed",
"recovery_pending",
"message"
],
"properties": {
"status": {
"type": "string",
"enum": [
"canceling",
"canceled"
],
"description": "canceling while remaining work is stopping, or canceled when cancellation already finished."
},
"run_id": {
"type": "string"
},
"changed": {
"type": "boolean"
},
"recovery_pending": {
"type": "boolean"
},
"message": {
"type": "string"
}
}
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/broadcasts/{broadcast_id}/delivery-errors List broadcast delivery errors
Returns a cursor-paginated page of permanent failures and unknown delivery results.
Parameters
broadcast_id path
required
The broadcast identifier.
cursor query The last delivery ID returned by the previous page.
limit query The number of errors to return, from 1 to 100.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"required": [
"items",
"next_cursor"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BroadcastDeliveryError"
}
},
"next_cursor": {
"type": "integer",
"nullable": true
}
}
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/broadcasts/{broadcast_id}/preflight Inspect broadcast readiness
Optionally checks the current Subscriber estimate, provider capacity, sender setup, event tracking, and blocking issues. This diagnostic is not required before starting a durable send.
Parameters
broadcast_id path
required
The broadcast identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/BroadcastSendPreflight"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/broadcasts/{broadcast_id}/progress Get broadcast send progress
Returns bounded delivery progress, current rates, timing, outcome counts, and pause state. Poll until terminal is true; use 5 to 10 second intervals while progress changes and back off to 30 seconds when unchanged.
Parameters
broadcast_id path
required
The broadcast identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/BroadcastSendProgress"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/broadcasts/{broadcast_id}/schedule Schedule or reschedule a broadcast
Schedules a draft for future delivery, or changes the delivery time of an existing scheduled Broadcast. This uses Mailrith's durable scheduled-send path and does not start delivery immediately.
Parameters
broadcast_id path
required
The broadcast identifier.
Request Body
{
"$ref": "#/components/schemas/BroadcastScheduleRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Broadcast"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/broadcasts/{broadcast_id}/schedule Unschedule a broadcast
Returns a scheduled Broadcast to draft state before delivery starts.
Parameters
broadcast_id path
required
The broadcast identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Broadcast"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/broadcasts/{broadcast_id}/send Send a broadcast now
Immediately creates durable preparation for a broadcast draft or scheduled send. Mailrith calculates the exact Subscriber total and checks provider readiness in the background before delivery. A 202 response means the durable send was accepted, not that provider delivery is complete. Reuse the same idempotency key if the response is lost.
Parameters
broadcast_id path
required
The broadcast identifier.
Idempotency-Key header Optional idempotency key to retry the request safely. It must not exceed 256 UTF-8 bytes.
Request Body
{
"type": "object",
"properties": {
"preflight_proof": {
"type": "string",
"description": "Optional unchanged short-lived send_proof returned by a recent diagnostic preflight. A valid proof can seed its checked estimate. If it is omitted, expired, or no longer matches, Mailrith still creates the run immediately and calculates the exact total during durable preparation."
}
}
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"required": [
"status",
"run_id",
"resource"
],
"properties": {
"status": {
"type": "string",
"enum": [
"running",
"queued"
],
"description": "Queued means Mailrith accepted the send and will start it automatically when a sending slot is available."
},
"run_id": {
"type": "string"
},
"resource": {
"$ref": "#/components/schemas/Broadcast"
}
}
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/broadcasts/{broadcast_id}/test Send a broadcast test email
Sends a test message from an existing Broadcast that has an email delivery connection. Provide a saved Subscriber ID for personalization; use subscribers_list to find one when needed. The recipient may be any test inbox and does not have to match the saved Subscriber.
Parameters
broadcast_id path
required
The broadcast identifier.
Idempotency-Key header Optional idempotency key to retry the request safely. It must not exceed 256 UTF-8 bytes.
Request Body
{
"$ref": "#/components/schemas/BroadcastTestRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/BroadcastTestResult"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} Segments
Read saved segments and preview dynamic segment definitions.
/v1/segments List segments
Returns saved segments from the authenticated workspace.
Parameters
search query Filter Segments by name or description.
limit query The maximum number of segments to return.
starting_after query The opaque cursor from the previous page of saved segments.
Responses
{
"type": "object",
"required": [
"data",
"pagination"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SegmentSummary"
}
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/segments Create a segment
Creates a saved segment in the authenticated workspace.
Parameters
Idempotency-Key header Optional idempotency key to retry the request safely. It must not exceed 256 UTF-8 bytes.
Request Body
{
"$ref": "#/components/schemas/SegmentUpsertRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Segment"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/segments/{segment_id} Get a segment
Returns one saved segment from the authenticated workspace.
Parameters
segment_id path
required
The identifier of the segment to return.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Segment"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/segments/{segment_id} Update a segment
Updates a saved segment in the authenticated workspace.
Parameters
segment_id path
required
The identifier of the segment to update.
Request Body
{
"$ref": "#/components/schemas/SegmentUpdateRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Segment"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/segments/{segment_id} Delete a segment
Deletes a saved segment from the authenticated workspace.
Parameters
segment_id path
required
The identifier of the segment to delete.
Responses
{
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/segments/preview Preview a segment definition
Returns subscriber counts for an unsaved segment definition. Include `current_segment_id` when previewing edits to an existing segment so circular segment references are rejected before saving.
Request Body
{
"$ref": "#/components/schemas/SegmentPreviewRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/SegmentPreview"
}
}
} {
"$ref": "#/components/schemas/Error"
} Jobs
Create and inspect asynchronous subscriber import and export jobs.
/v1/jobs/subscriber-exports List subscriber export jobs
Returns a bounded cursor page of recent Subscriber export job summaries without loading selection payloads or generating download URLs.
Parameters
limit query Maximum number of jobs to return.
starting_after query Opaque cursor returned by the previous page.
Responses
{
"type": "object",
"required": [
"data",
"pagination"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SubscriberExportJobSummary"
}
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
}
} /v1/jobs/subscriber-exports Create a subscriber export job
Queues an asynchronous Subscriber export for the authenticated workspace. Requires `subscribers:export` because the finished file contains bulk Subscriber data.
Parameters
Idempotency-Key header Optional idempotency key to retry the request safely. It must not exceed 256 UTF-8 bytes.
Request Body
{
"$ref": "#/components/schemas/SubscriberExportJobCreateRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/SubscriberExportJob"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/jobs/subscriber-exports/{job_id} Get a subscriber export job
Returns the current state of a previously created export job. Requires `subscribers:export` because completed jobs include a Subscriber CSV download URL.
Parameters
job_id path
required
The identifier of the export job to return.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/SubscriberExportJob"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/jobs/subscriber-import-uploads Start a subscriber import upload
Creates a short-lived browser handoff where a signed-in user can choose a CSV file. Starting the handoff does not import Subscribers.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/SubscriberImportUpload"
}
}
} /v1/jobs/subscriber-import-uploads/{upload_id} Get a subscriber import upload
Returns upload readiness, bounded column metadata, and the row count without returning CSV contents.
Parameters
upload_id path
required
The short-lived upload identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/SubscriberImportUpload"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/jobs/subscriber-imports List subscriber import jobs
Returns a bounded cursor page of recent Subscriber import job summaries without loading stored CSV data or mapping payloads.
Parameters
limit query Maximum number of jobs to return.
starting_after query Opaque cursor returned by the previous page.
Responses
{
"type": "object",
"required": [
"data",
"pagination"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SubscriberImportJobSummary"
}
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
}
} /v1/jobs/subscriber-imports Create a subscriber import job
Queues an asynchronous import job from a ready short-lived browser upload. CSV contents never pass through the agent request.
Parameters
Idempotency-Key header Optional idempotency key to retry the request safely. It must not exceed 256 UTF-8 bytes.
Request Body
{
"$ref": "#/components/schemas/SubscriberImportJobCreateRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/SubscriberImportJob"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/jobs/subscriber-imports/{job_id} Get a subscriber import job
Returns the current state of a previously created import job.
Parameters
job_id path
required
The identifier of the import job to return.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/SubscriberImportJob"
}
}
} {
"$ref": "#/components/schemas/Error"
} Webhooks
Create and manage outbound webhook subscriptions for Mailrith events and signed event delivery.
/v1/webhook-subscriptions List webhook subscriptions
Returns the outbound webhook subscriptions configured for the authenticated workspace.
Responses
{
"type": "object",
"required": [
"data",
"pagination"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WebhookSubscription"
}
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/webhook-subscriptions Create a webhook subscription
Creates a signed outbound webhook subscription and returns the signing secret once. The caller must also have read scopes for the selected event families. A workspace can have up to 20 webhook subscriptions, including disabled subscriptions.
Parameters
Idempotency-Key header Optional idempotency key to retry the request safely. It must not exceed 256 UTF-8 bytes.
Request Body
{
"$ref": "#/components/schemas/WebhookSubscriptionCreateRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/WebhookSubscriptionCreateResult"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/webhook-subscriptions/{webhook_subscription_id} Get a webhook subscription
Returns one outbound webhook subscription configured for the authenticated workspace.
Parameters
webhook_subscription_id path
required
The webhook subscription identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/WebhookSubscription"
}
}
} {
"$ref": "#/components/schemas/Error"
} /v1/webhook-subscriptions/{webhook_subscription_id} Update a webhook subscription
Updates the destination URL, status, or event pattern set for an existing webhook subscription. The caller must also have read scopes for the subscription's event families.
Parameters
webhook_subscription_id path
required
The webhook subscription identifier.
Request Body
{
"$ref": "#/components/schemas/WebhookSubscriptionUpdateRequest"
} Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/WebhookSubscription"
}
}
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} {
"$ref": "#/components/schemas/Error"
} /v1/webhook-subscriptions/{webhook_subscription_id} Delete a webhook subscription
Deletes an existing outbound webhook subscription from the authenticated workspace.
Parameters
webhook_subscription_id path
required
The webhook subscription identifier.
Responses
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"required": [
"id",
"deleted"
],
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean",
"enum": [
true
]
}
}
}
}
} {
"$ref": "#/components/schemas/Error"
} Need Help Shipping an Integration?
Reach the Mailrith team if you need help planning a sync, validating a webhook flow, or troubleshooting a request.