Skip to content

Sends and events

Every email the project sent, what happened to it, and the event stream by type.

View as Markdown

List sends

GET/projects/{project_id}/sends

Every email the project sent, newest first, from every source. Filter by one of email, contact_id, campaign_id, broadcast_id (a broadcast’s recipients) or status=failed at a time.

Parameters

NameInTypeNotes
project_idpathstringRequired
emailquerystring | nullOptional
contact_idquerystring | nullOptional
campaign_idquerystring | nullOptional
broadcast_idquerystring | nullOptional
statusquery"failed" | nullOptional
cursorquerystring | nullOptional
limitqueryintegerOptional, default 50
Request
curl "https://sendocado.com/api/v1/projects/$PROJECT_ID/sends?campaign_id=h5dnsipzz5fk2z9ri19r0wyojfljooa5" \
  -H "Authorization: Bearer $SENDOCADO_API_KEY"
Response 200
{
  "sends": [
    {
      "id": "thjxjqi3ogz5kok16zv0mwufxbv932by",
      "project_id": "ujzde8gxd6ncf10epf91dhodzdoc9is0",
      "contact_id": "j8ht9lgmxg9edn581u33xtplpft75v2s",
      "to": "maya@example.com",
      "subject": "Welcome to Acme, Maya",
      "source": {
        "type": "campaign_step",
        "campaign_id": "h5dnsipzz5fk2z9ri19r0wyojfljooa5",
        "step_id": "j8gxbenyjqwx4hh5344tfjgvq4k7bn7x",
        "enrollment_id": "j3j4wj99ibag7i1mnbqns6puq80idw37"
      },
      "status": "delivered",
      "has_opened": true,
      "has_clicked": true,
      "has_replied": false,
      "accepted_at": 1790000120000,
      "failed_at": null,
      "ext_provider_message_id": "4ef9a1c2-7d3b-4f0e-9a51-2c8e6b1d0f73",
      "created_at": 1790000120000
    }
  ],
  "next_cursor": null
}

Errors

StatusTypeExample message
400invalid_datalimit: Too big: expected number to be <=200
401unauthorizedSend a valid API key as "Authorization: Bearer sc_…", or sign in.
404project_not_foundProject not found.
422invalid_referenceNo template with that id in this project.
429rate_limitedToo many requests. Try again in 12 seconds.

Get a send

GET/sends/{send_id}

One email to one address and what happened to it: events oldest first (up to 15 of each type) and every provider attempt that failed. An erased address reads as null to, subject and contact_id.

Parameters

NameInTypeNotes
send_idpathstringRequired
Request
curl "https://sendocado.com/api/v1/sends/$SEND_ID" \
  -H "Authorization: Bearer $SENDOCADO_API_KEY"
Response 200
{
  "id": "thjxjqi3ogz5kok16zv0mwufxbv932by",
  "project_id": "ujzde8gxd6ncf10epf91dhodzdoc9is0",
  "contact_id": "j8ht9lgmxg9edn581u33xtplpft75v2s",
  "to": "maya@example.com",
  "subject": "Welcome to Acme, Maya",
  "source": {
    "type": "campaign_step",
    "campaign_id": "h5dnsipzz5fk2z9ri19r0wyojfljooa5",
    "step_id": "j8gxbenyjqwx4hh5344tfjgvq4k7bn7x",
    "enrollment_id": "j3j4wj99ibag7i1mnbqns6puq80idw37"
  },
  "status": "delivered",
  "has_opened": true,
  "has_clicked": true,
  "has_replied": false,
  "accepted_at": 1790000120000,
  "failed_at": null,
  "ext_provider_message_id": "4ef9a1c2-7d3b-4f0e-9a51-2c8e6b1d0f73",
  "created_at": 1790000120000,
  "events": [
    {
      "type": "delivered",
      "url": null,
      "detail": null,
      "created_at": 1790000180000
    },
    {
      "type": "opened",
      "url": null,
      "detail": null,
      "created_at": 1790005700000
    },
    {
      "type": "clicked",
      "url": "https://acme.example/setup",
      "detail": null,
      "created_at": 1790005760000
    }
  ],
  "failures": []
}

Errors

StatusTypeExample message
401unauthorizedSend a valid API key as "Authorization: Bearer sc_…", or sign in.
404send_not_foundSend not found.
429rate_limitedToo many requests. Try again in 12 seconds.

List email events of one type

GET/projects/{project_id}/email-events

One type per request, newest first. For everything that happened to one email, get its send instead.

Parameters

NameInTypeNotes
project_idpathstringRequired
typequery"delivered" | "delivery_delayed" | "soft_bounced" | "opened" | "clicked" | "bounced" | "complained" | "unsubscribed" | "failed"Required
cursorquerystring | nullOptional
limitqueryintegerOptional, default 50
Request
curl "https://sendocado.com/api/v1/projects/$PROJECT_ID/email-events?type=clicked" \
  -H "Authorization: Bearer $SENDOCADO_API_KEY"
Response 200
{
  "email_events": [
    {
      "id": "qm2plppjsmuezqp67og3cga4o2xcsohd",
      "type": "clicked",
      "send_id": "thjxjqi3ogz5kok16zv0mwufxbv932by",
      "contact_id": "j8ht9lgmxg9edn581u33xtplpft75v2s",
      "url": "https://acme.example/setup",
      "detail": null,
      "created_at": 1790005760000
    }
  ],
  "next_cursor": null
}

Errors

StatusTypeExample message
400invalid_datalimit: Too big: expected number to be <=200
401unauthorizedSend a valid API key as "Authorization: Bearer sc_…", or sign in.
404project_not_foundProject not found.
429rate_limitedToo many requests. Try again in 12 seconds.