Campaign Mailings


Fetch campaign mailings

Return json data about Marketing Campaign Emails

URL

/campaign_mailings

Method

GET

Data parameters

Optional:

search=[string] Regex string to search on. Compares against subject.

order_by[attribute] Attribute to sort on. Default value is created_at.

order=[asc | desc] Direction to sort. Default value is descending.

Success Response

Code: 200
Content:

{
"data": [
{
"id": "string",
"type": "campaign_mailing",
"attributes": {
"subject": "string",
"created_at": "string",
"updated_at": "string",
"sent_count": "integer",
"delivered_count": "integer",
"viewed_count": "integer",
"clicked_count": "integer",
"bounced_count": "integer",
"unsubscribed_count": "integer"
}
}
]
}

Send campaign mailings

Send campaign email to recipients. The email message must be created within the Paubox Marketing web interface in order to use this to trigger a send.

URL

/campaign_mailing_sends

Method

POST

Data parameters

{
"campaign_mailing_id": "uuid string", //required, can be retrieved from the id= part of the url when editing a marketing email. Example: g79da293-4a84-4b50-b0d9-76a16af167fe
"campaign_mailing_send": {
"sender_email": "string", //required - this should be an email for a Paubox Marketing user to track who sent it. This is NOT the "From email" that will be used to send the message.
"subscription_list_id": "uuid string", //required, can be retrieved from the listId= part of the url of any Contact List page. Example: 1a55ec71-0b08-457a-b183-51ac7791f1fe
"recipient_emails": ["string", "string", "string"], //optional - will send preview message equivalent (no smart text replacements)
"customer_name": "string", //optional for footer. Leave empty to use default information.
"from_email": "string", //optional -- the email the user will see the email is sent from. Leave empty to use default information.
"from_name": "string", //optional -- the name the user will see the email is from. Leav eempty to use default information.
"subject": "string" //optional -- the subject of the email. Will use the marketing email unique ID if not specified.
}
}

How to find your campaign_mailing_id and subscription_list_id in your Dashboard

Success Response

Code: 200
Content:

{}

Schedule a new campaign mailing

Schedules a new email campaign mailing with specified details for delivery at a future time.

URL

/campaign_mailing_schedules

Method

POST

Data Parameters

Required parameters must be included in the request body as JSON:

{
"send_at": "2023-05-01T15:00:00Z",
"from_email": "no-reply@yourdomain.com",
"from_name": "Your Company Name",
"sender_email": "marketing@yourdomain.com",
"subscription_list_id": "123e4567-e89b-12d3-a456-426614174000",
"subject": "Your Campaign Subject Line",
"dynamic_list_id": "optional-uuid-for-dynamic-list",
"recipient_emails": [
"test1@example.com",
"test2@example.com"
]
}
  • send_at: The time at which to send the campaign, in RFC3339 format.
  • from_email: The email address from which the campaign will be sent. It should be from a verified domain from your Paubox Marketing settings page.
  • from_name: The name to appear as the sender of the campaign.
  • sender_email: The email address of the person/entity sending this email. Should be a Paubox user email address and is NOT going to appear as the From email.
  • subscription_list_id: The uuid of the subscription list to which the campaign will be sent.
  • subject: The subject line of the campaign mailing.

Optional:

  • dynamic_list_id: The uuid of the dynamic list to which the campaign will be sent (optional).
  • recipient_emails: A list of extra recipient email addresses for the campaign to be sent to. These are not tracked for analytics purposes and are usually just for verification and/or testing.

Success Response

Code: 200
Content:

{
"data": {
"send_at": "2023-05-01T15:00:00Z",
"send_at_timestamp": "1651425600",
"jid": "job-id-string"
}
}

Error Response

Code: 400
Content:

{
"errors": "Invalid time format provided, please use RFC3339 format."
}