Skip to main content

Send Logs

The /send-logs endpoint allows you to view the metadata of your past sends.

The shape of a SendLog is as follows:

type SendLog = {
/** The _id of the send log */
_id: string;
/** The _id of the campaign triggered the send */
campaign_id: string;
/** The unresolved template that was sent */
message: string;
/** The type of send, or the reason it was triggered */
triggeredBy: string;
/** The datetime that the send started being delivered */
startDeliveryAt: string;

/** The number of contacts that were sent to
* Or, if you pass the `group_destinations=list` query param, an array of the cell numbers that were sent to
*/
destinations: number | string[];
};

View a single send log

GET /send-logs/:send_id

View a single send log.

  • 🔐 Permissions: ["sendLog.read"]

Request

URL Parameters

FieldTypeRequiredDescription
send_idstringThe _id of the send you want to fetch. You can get a particular send_id from the Sends Report, or by using {{send._id}} in a webhook template
group_destinationscount | listIf you pass group_destinations=count, the destinations field will be the number of contacts that were sent to. If you pass group_destinations=list, the destinations field will be an array of the cell numbers that were sent to.

Response

Success

200
{
ok: true,
data: SendLog
}

Error

404
{
ok: false,
error: {
code: "resource_not_found",
message: string
}
}