Skip to main content
GET/email-campaign/:id/logs/

Get single email campaign logs

You can return all delivery logs of the specific email campaign. These results can be filtered by conditions defined as request parameters.

LookupDescriptionAllowed values
statusStatus of the deliveires.Pending = 1
Success = 2
Failure = 3
Retried = 4
Webhook = 5
reasonType of the bounce.
Might be used if Webhook status has been chosen.
Softbounce = 1
Spambounce = 2

Request​

curl -X GET "https://<your_app_subdomain>.user.com/api/public/email-campaign/:id/logs/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2"

Response examples​

{
"count": 1,
"next": null,
"previous": null,
"results": {
"campaign_id": 180,
"campaign_pk": 180,
"campaign_name": "Your weekly summary",
"logs": [
22 fields
]
}
}

Response fields​

Fields returned in the 200 OK response body.

countinteger
Number of results across all pages. It can lag behind recent changes; see Response pagination.
nextstring (URL)nullable
URL of the next page of results. null on the last page.
previousstring (URL)nullable
URL of the previous page of results. null on the first page.
resultsobject
Results on this page.
results.campaign_idinteger
ID of the campaign.
results.campaign_pkinteger
ID of the campaign, the same as campaign_id.
results.campaign_namestring
Name of the campaign.
results.logsarray of objects
One entry per email sent by the campaign.
results.logs[].idinteger
A unique identifier for the campaign which is given by User
results.logs[].delivery_task_idstringnullable
Not used for emails: always null.
results.logs[].statusinteger
An email campaign status.
results.logs[].failure_reasonstring
Why the email failed or bounced, for example hardbounce, softbounce or spambounce; an empty string if it didn't.
results.logs[].sent_atstring (date-time)
When the email was sent, ISO 8601.
results.logs[].opened_atstring (date-time)
When the email was first opened, ISO 8601. null if it wasn't.
results.logs[].clicked_atstring (date-time)nullable
When a link in the email was first clicked, ISO 8601. null if none was.
results.logs[].unsubscribed_atstring (date-time)nullable
When the contact unsubscribed through this email, ISO 8601. null if they didn't.
results.logs[].created_atstring (date-time)
A creation date of email campaign.
results.logs[].campaigninteger
ID of the campaign the email belongs to.
results.logs[].client_userinteger
ID of the contact the email was sent to.
results.logs[].variationinteger
ID of the message variation that was sent.
results.logs[].rendered_emailinteger
ID of the stored copy of the sent email, or null if none was kept.
results.logs[].previewstring (URL)
URL of a preview of the sent email.
results.logs[].subjectstring
Email subject line.
results.logs[].user_idinteger
ID of the contact the email was sent to.
results.logs[].userstring
Display name of the contact the email was sent to.
results.logs[].user_emailstring
Email address the email was sent to.
results.logs[].senderstring
Address the email was sent from.
results.logs[].recipientstring
Email address the email was sent to.
results.logs[].has_previewboolean
Whether a preview of the sent email is available.
results.logs[].tracking_enabledboolean
Whether open and click tracking was on for this email.
note

Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.