Skip to main content

One direct send - an email or a LinkedIn action sent to a contact outside any sequence - read by its reference.

reference
string
required

The reference the send route answered with, email-<id>, linkedin-<id> or linkedin-scheduled-<id>. Treat it as opaque.

Example:

"email-48213"

channel
enum<string>
required

The channel a direct send goes out on.

Available options:
email,
linkedIn
contactId
integer
required

ID of the contact the send is addressed to.

state
enum<string>
required

Where a direct send stands.

Available options:
queued,
waitingForSchedule,
sending,
sent,
failed,
cancelled
sendAfter
string<date-time> | null
required

UTC moment after which the send is attempted - the requested sendAfter, when the send was accepted, or the schedule opening it was queued for. Null while the send waits for its schedule; estimatedSendAt is set then. A send cancelled while waiting, or failed because its schedule or the contact's time zone was gone, reads the requested sendAfter when it was given one, and null when it was made with a schedule and no sendAfter - it was never given a moment. This holds for email and LinkedIn alike.

estimatedSendAt
string<date-time> | null

When the schedule the send waits for next opens, as read now; the send goes out within about 10 minutes of it. A schedule open at acceptance or opening within the next ten minutes queued the send for that moment at once, so it reads queued with sendAfter and this null. Set in the waitingForSchedule state only, and null there when the schedule does not open within 30 days of the moment the send waits from (the requested sendAfter, or now once that has passed).

sentAt
string<date-time> | null

UTC moment the send went out. Set in the sent state only.

messageId
string | null

Message-ID of the email once it has gone out. Always null for LinkedIn.

failureCode
string | null

What the failure was, as the code the send route answers that failure with. Set in the failed state when the failure has a code of its own; null otherwise, and then failureReason tells it.

A LinkedIn send for later that is due is checked again before it goes to the account's queue; a refusal found then, for example a LinkedIn account no longer connected, fails it with the directLinkedIn.* code the send route answers that refusal with. Nothing went out. A failure with no code of its own, such as an unexpected error, has failureCode null and says what happened in failureReason.

Example:

"directSend.dispatchWindowMissed"

failureReason
string | null

Why the send failed, as a sentence for people to read. Set in the failed state only. Use failureCode to act on the failure.

Example:

"The send was never attempted: its dispatch window passed before anything picked it up."

missingVariables
string[] | null

The variables the email's template uses that have no value for the contact, by name without braces. Set with failureCode contact.missingVariables only.

renderedSubject
string | null

The subject as sent, its template rendered for the contact. Email, sent state only; null when the sent message can no longer be read.

renderedBody
string | null

The body as sent, with the signature and the tracking - its template rendered for the contact, the sending account's signature added, and the links and open pixel of the tracking when it is on. HTML, or text for an email with no HTML part. Email, sent state only; null when the sent message can no longer be read.

cancelledAt
string<date-time> | null

UTC moment the send was cancelled. Set in the cancelled state only.