E-mail records
An e-mail record stores information about an e-mail which was sent.
Warning
This API is not finalized yet.
Fields
- class EmailRecord
- body_text: string
Text-only body of the e-mail.
- campaign: integer
The campaign the job belongs to.
- from_email: string
The e-mail address of the sender.
- id: integer
The e-mail record’s unique ID.
- job: integer
The job for which the e-mail was sent.
- opened_at: datetime
The date and time the e-mail was first opened.
- portal: integer
The portal for which a unique link was included in the e-mail.
- reference: string
Your reference for this job (e.g. customer ID), which must be unique within the campaign.
- state: integer
The e-mail’s delivery state.
0 = sent
1 = delivered
2 = failed
3 = rejected
- subject: string
The subject of the e-mail.
- team: integer
The e-mail record’s team.
- timestamp: datetime
The e-mail record’s date and time.
- to_email: string
The e-mail address of the recipient.
API
- GET /j/email_records
Retrieves the list of e-mail records.
You must specify a start date and an end date.
Example request:
GET /j/email_records?start=2015-01-06T00:00:00Z&end=2015-01-07T00:00:00Z&team=1 HTTP/1.1 Authorization: Bearer 0a1b2c3d4e5f
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ { "campaign": 1, "from_email": "sender1@example.com", "id": 1, "job": 1, "opened_at": null, "portal": null, "reference": "123456", "state": 0, "subject": "Test Mail 1", "team": 1, "timestamp": "2013-02-25T09:21:14Z", "to_email": "test.job1@example.com" } ]
- Request Headers:
Authorization – OAuth token to authenticate
- Query Parameters:
end (datetime) – An end date and time.
start (datetime) – A start date and time.
team (integer) – An optional team ID.
- Response JSON Array of Objects:
body_text (string) – Text-only body of the e-mail.
campaign (integer) – The campaign the job belongs to.
from_email (string) – The e-mail address of the sender.
id (integer) – The e-mail record’s unique ID.
job (integer) – The job for which the e-mail was sent.
opened_at (datetime) – The date and time the e-mail was first opened.
portal (integer) – The portal for which a unique link was included in the e-mail.
reference (string) – Your reference for this job (e.g. customer ID), which must be unique within the campaign.
state (integer) – The e-mail’s delivery state.
subject (string) – The subject of the e-mail.
team (integer) – The e-mail record’s team.
timestamp (datetime) – The e-mail record’s date and time.
to_email (string) – The e-mail address of the recipient.
- Status Codes:
200 OK – no error
400 Bad Request – for instance a required field is missing
403 Forbidden – you tried to access a forbidden resource, check you provided a valid OAuth token