Skip to main content

API Keys

To use the Courier API, you need an API Key. From here you are ready to get started!

SDKs

Courier provides SDKs for popular programming languages and frameworks to make integration easier.
# https://github.com/trycourier/courier-node
npm install @trycourier/courier

Next Steps


Rate Limiting

The following endpoints have rate limits:
EndpointMethod & OperationLimit
Lists APIPOST to subscriptions20 requests/minute
PUT to lists20 requests/minute
Events APIPUT to events20 requests/minute
Brands APIPUT to brands200 requests/minute
Invitations50 invites/15 minutes
Login Attempts5 attempts/5 minutes
Categories20 creations/minute

Idempotency

Courier lets you send the same POST request again without doing the same action twice. Just add an Idempotency-Key header with a unique value.
cuRL
curl --request POST \
  --url https://api.courier.com/send \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: YOUR_UNIQUE_KEY' \
  --data '{
    "message": {
      "to": {
        "user_id": "example_user"
      },
      "template": "template_id",
      "data": {
        "foo": "bar"
      }
    }
  }'
  • Add an Idempotency-Key header with a random value (like a UUID) to your request.
  • If you send the same request again with the same key, Courier will give you the same answer as before, even if it was an error.
  • Courier keeps idempotency keys for 24 hours.