Skip to content

Recipients and browsers / Recipients

Recipients

A recipient is a named destination, usually a person or a team. You send to the name, never to a device.

A recipient is a named destination inside a project, like me, ops or sara. Your code sends to the name; Push works out which browsers are connected to it. People and devices can come and go without any change to your code.

Names#

  • Lowercase letters, digits, - and _, starting with a letter or digit, from 1 to 40 characters.
  • Unique within a project. Two projects can each have a recipient called ops.
  • Use stable names. A user id from your own system works well, such as user-4821.

⫻

pattern

^[a-z0-9][a-z0-9_-]{0,39}$

Browsers and attempts#

A recipient can have several connected browsers, such as a laptop and a phone. Each send creates one attempt per connected browser, and each attempt has its own status. A send to a recipient with three browsers is three attempts, and counts as three.

Browsers join a recipient only when a person allows it, from the dashboard or a connect link. See Connecting browsers.

Limits#

  • Up to 50 recipients per project.
  • Up to 20 connected browsers per recipient.
  • Up to 100 connected browsers per account, across all projects.
  • Only connected browsers count. A browser that was disconnected frees its place.

Sending to a recipient#

Put the recipient's name in the recipient field of POST /v1/notifications. If the name does not exist in the key's project, or the recipient has no connected browsers, the request fails and nothing is stored or charged:

⫻

422 Unprocessable Entity

HTTP/1.1 422 Unprocessable EntityContent-Type: application/jsonX-Request-Id: req_0199b1c27a4e7c3d9f1e2b6a8d4c5e11
{  "error": {    "code": "INVALID_RECIPIENT",    "message": "Recipient \"ops\" has no connected browsers",    "requestId": "req_0199b1c27a4e7c3d9f1e2b6a8d4c5e11"  }}
CodeHTTPWhen
INVALID_RECIPIENT422No recipient with that name in the key's project, or it has no connected browsers.
VALIDATION_ERROR400The recipient value does not match the name pattern.

Deleting a recipient#

WarningDeleting a recipient in the dashboard also deletes its connected browsers, its connect links and its notification history. It cannot be undone. Those browsers stop receiving notifications from this project.
NoteDeleting a recipient does not give back attempts already counted this month or credits already charged.