Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Courier

Schemescourier://
Cargo featureservice-courier
Servicehttps://www.courier.com/
Body formatstext, html, markdown (first is the default)
Attachmentsno
Title length250 characters
Body length32,768 characters
Body linesunlimited
Request throttlenone
Vendor URLs acceptedno

URL formats

courier://{auth_token}/{targets}

URL tokens

TokenMeaningTypeRequiredDefaultNotes
{auth_token}Auth Tokenstringyessecret
{targets}Recipientslistyesseparated by /; e-mail, +phone or user id

Query parameters

ParameterMeaningTypeDefaultNotes
channelsRouting Channelslistseparated by , or space
hostAPI Hoststringapi.courier.comhost[:port][/path] or a full http(s):// URL
templateTemplatestringtemplate id or alias; title and body go to data
toRecipientslistsets {targets}

Prefixed parameters:

  • :name=value: Message Data
  • +name=value: HTTP Header

The common URL parameters (format, overflow, verify, redirect, cto, rto, retry, wait, store, tag, tz, user, password, port, optional, emojis) apply as well.

Examples

Accepted URLs (tokens are fake):

courier://pk_prod_abc/example_user
courier://pk_prod_abc/ben@example.com
courier://pk_prod_abc/ben@example.com/+15551234567/user42
courier://pk_prod_abc/example_user?template=nt_01abc&channels=email,sms&:name=Ben
courier://pk_prod_abc?to=u1,u2&host=courier.internal:8443&+Idempotency-Key=abc123

Rejected URLs:

courier://
courier://pk_prod_abc
courier://pk_prod_abc/u1?host=bad_host!

Send one from the command line:

mercurio -t 'Backup' -b 'Finished in 42s' 'courier://pk_prod_abc/example_user'

Notes

Courier (courier://): notifications through the Courier send API, written from the API reference (https://www.courier.com/docs/reference/send/message).

courier://{auth_token}/{recipient}[/{recipient}...]

Options:

  • ?host=api.example.com[:port][/path] (or a full http(s):// URL) overrides the API base (default https://api.courier.com).
  • ?to=a,b adds recipients.
  • ?template={id|alias} sends a template instead of inline content; the title and body are then only available as data.title/data.body.
  • ?channels=email,sms sets routing: {"method": "single", "channels": [...]}.
  • :key=value adds key to message.data; +Header=value adds an HTTP header.

Each recipient is an e-mail ({"email": ..}), +<phone> ({"phone_number": ..}) or a user id ({"user_id": ..}). One POST /send carries all recipients (message.to is an object for one, an array for several), with Authorization: Bearer {auth_token} and {"message": {"to", "content": {"title", "body"}, "data": {"type", ...}}}. Any 2xx (Courier answers 202) is success.

Differences with Apprise

  • Not in Apprise; written from the vendor documentation (hand-written fixtures).