Base URL
https://api.paubox.com/v1/marketing
Authorization
Include anAuthorization header with every request:
Authorization: Token token=YOUR_API_KEY
Replace YOUR_API_KEY with your API key. Generate your key on the Paubox Marketing > Settings page (note: each API key is displayed only once upon creation):
Example call
Core concepts
Four resources cover most of what the Marketing API does. Understanding how they relate makes the rest of the reference easier to navigate.
A send ties them together: it takes one campaign mailing, one list (or an explicit set of recipient addresses), and delivers the mailing to that audience. The same mailing can be sent more than once, and each send is tracked separately in analytics.
Subscription lists vs. dynamic lists:Membership in a subscription list is explicit — you add and remove subscribers yourself. Membership in a dynamic list is derived from filters saved on the list, so it changes as your subscriber data changes. Endpoints that act on a list in bulk come in two variants for this reason:
bulk_global_* for subscription lists, dynamic_bulk_* for dynamic lists.Send a campaign
1
Create the campaign mailing
Create a campaign with your subject and content. The response contains the new mailing’s ID, which you will need for every step that follows:An unsubscribe footer is appended to
subject is required and must be unique within your account.html_part automatically, so you do not need to add one yourself.2
Preview it
Send a test email to a single address to check rendering before you send to a list. The subject is prefixed with A successful test send returns
[Test], and test sends are not recorded in analytics.204 No Content with an empty body.3
Revise if needed
Update the campaign to change any field. Only the fields you send are modified.
4
Send or schedule
Send the campaign to go out now, or schedule it for a future time. Both take the campaign mailing ID plus a target — a
subscription_list_id, a dynamic_list_id, or an explicit list of recipient_emails.Sending is asynchronous.A successful response means the send was accepted and queued, not that delivery has finished. Track progress through the campaign analytics endpoints rather than the send response.
5
Measure
Use the analytics endpoints to see how the campaign performed: send totals, per-send results, individual deliveries, and tracking link engagement.
Manage opt-ins and opt-outs
Paubox Marketing records two independent levels of opt-out, and it matters which one you use.
Which one an endpoint applies depends on whether you send
subscription_list_ids:
POST /subscriptions/unsubscribewithsubscription_list_idsrecords a list-level opt-out.- The same endpoint without
subscription_list_idsrecords a global opt-out. POST /subscriptions/subscribealways clears the global opt-out, because a subscriber who is subscribed to any list is by definition not globally unsubscribed.
unsubscribed_at and leaves everything else untouched.
Acting on a whole list
When you want to opt out an entire list rather than a known set of subscribers, use the bulk endpoints. They accept afrom_subscription_list_id and operate on everyone in that list, minus any except_ids you supply — useful for “select all except these” flows.
- Subscription lists: bulk global subscribe and bulk global unsubscribe
- Dynamic lists: bulk subscribe and bulk unsubscribe
API conventions
Identifiers
Records are identified by UUID. Acampaign_mailing_id, subscription_list_id, or subscriber ID in a URL or request body is always the UUID form:
One exception:
POST /subscriptions takes the subscriber’s internal numeric ID rather than the UUID. To add a subscriber to a list using the UUID you already have, create the subscriber with a subscription_list_id instead, or use POST /subscriptions/subscribe.Response shapes
Most read endpoints return resources in JSON:API form — anid, a type, and the fields nested under attributes:
sent_count, delivered_count, and so on) but omits the content; fetching a single one includes html_part, text_part, and form_data but omits the counts. Each reference page documents its own response.
Errors
A failed write looks like this:errors as the failure signal, and fall back to the status code for authentication (401), missing records (404), and server errors (500).
Pagination
List endpoints are paginated by default. Control it with:
Pagination metadata is returned in the response headers. Some endpoints additionally include a
page_info object in the response body.
Background jobs
Operations that can affect a large number of records do not run inline. Instead they queue a job and return its identifier immediately:jid in the response means the work was accepted, not that it has finished. Bulk subscribe and unsubscribe across a whole list behave this way; supplying an explicit subscriber_ids array to those same endpoints processes the change inline and returns the affected subscribers instead.
Dates
Dates are passed as ISO8601 strings with UTC timezone.Finding id parameters for subscription_list_id, campaign_mailing_id, etc.
Finding parameter values in the web dashboard
Community & support
Q&A
Ask usage questions in the Paubox Community.
Ideas
Propose features and improvements.