Courier
| Schemes | courier:// |
| Cargo feature | service-courier |
| Service | https://www.courier.com/ |
| Body formats | text, html, markdown (first is the default) |
| Attachments | no |
| Title length | 250 characters |
| Body length | 32,768 characters |
| Body lines | unlimited |
| Request throttle | none |
| Vendor URLs accepted | no |
URL formats
courier://{auth_token}/{targets}
URL tokens
| Token | Meaning | Type | Required | Default | Notes |
|---|---|---|---|---|---|
{auth_token} | Auth Token | string | yes | secret | |
{targets} | Recipients | list | yes | separated by /; e-mail, +phone or user id |
Query parameters
| Parameter | Meaning | Type | Default | Notes |
|---|---|---|---|---|
channels | Routing Channels | list | separated by , or space | |
host | API Host | string | api.courier.com | host[:port][/path] or a full http(s):// URL |
template | Template | string | template id or alias; title and body go to data | |
to | Recipients | list | sets {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 fullhttp(s)://URL) overrides the API base (defaulthttps://api.courier.com).?to=a,badds recipients.?template={id|alias}sends a template instead of inline content; the title and body are then only available asdata.title/data.body.?channels=email,smssetsrouting: {"method": "single", "channels": [...]}.:key=valueaddskeytomessage.data;+Header=valueadds 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).