Courier

The Courier Developer Hub

Welcome to the Courier developer hub. You'll find comprehensive guides and documentation to help you start working with Courier as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    API Reference

Profile Requirements

To deliver a message to a recipient over SendGrid, Courier must be provided the recipient's email address. This value should be included in the recipient profile as email.

// Recipient Profile
{
  "email": "[email protected]"
}

Email Activity Tracking

For the SendGrid configuration, the toggle, Enable Email Activity Tracking via Polling, will allow Courier to use SendGrid’s Email Activity API to periodically check on the delivery status of sent emails. The API Key must have Read Access to the Email Activity, and the SendGrid account must have the additional email history add-on enabled. See the documentation for API Keys and Email Activity to ensure the SendGrid account is set up correctly.

Enable read access to Email Activity on the API Key.

Upgrade the plan to include extended email activity history.

Override

Overrides can be used to change the request body that Courier uses to send an email. Overrides are useful when a field is not yet supported by Courier or you would like to override the value that Courier generates. You can override any of the fields supported by SendGrid's /mail/send endpoint (see all v3 mail send request body fields here). Below is an example of overriding the subject and adding an attachment:

{
  "event": "<COURIER_NOTIFICATION_ID>",
  "recipient": "katherine_pryde",
  "profile": {
    "email": "[email protected]"
  },
  "data": {
    "name": "Katherine Pryde"
  },
  "override": {
    "sendgrid": {
      "body": {
        "subject": "Requested file - lockheed.json",
        "attachments": [
          {
            "content": "eyJmb28iOiJiYXIifQ==",
            "type": "application/json",
            "filename": "lockheed.json"
          }
        ]
      },
      "config": {
        "apiKey": "<your API Key>"
      }
    },
  }
}

Updated 3 months ago


SendGrid


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.