Skip to content

Send a notification to one user, a group, or everyone

POST
/v1/notifications

Send to one of your users with user_id; to a group with any mix of user_ids, emails, contact_ids and contacts (the same filters as GET /v1/contacts, such as { "stage": "customer" }); or to everyone with audience: "all". A bell is found by your own user id, so an email or a contact reaches someone only when Launch knows their user id: from identify() with a user id and an email, feedback sent with both, or a paying customer’s metadata. meta.audience says how many were reached and up to 20 who were not; when nobody can be reached the answer is NO_REACHABLE_RECIPIENTS (422), and a group is at most 10,000 people (TOO_MANY_RECIPIENTS). send_at schedules it up to 60 days ahead. A broadcast shows in a bell for 30 days. Every notification, a group or a broadcast included, counts once against the monthly cap per project (Free 1,000, Indie 20,000, Builder 200,000, per calendar month in UTC); past it the answer is PLAN_LIMIT_REACHED (403). meta.usage has the month so far.

Auth: Secret key only. The dashboard has the same operation under /v1/dashboard/notifications.

object
user_id

One user. Leave out for a group or a broadcast.

string
<= 256 characters
audience

Worked out when left out: users when any group field is sent, else user.

string
Allowed values: user users all
user_ids
Array<string>
<= 1000 items
emails
Array<string>
<= 1000 items
contact_ids
Array<string>
<= 1000 items
contacts

A Contacts filter: stage, consent, detail (name or name=value), paying, has_feedback, status, source, q. Values as strings, like the query parameters of GET /v1/contacts.

object
key
additional properties
string
title
required
string
<= 200 characters
body
required
string
<= 2000 characters
action_url

An http(s) URL, or a path on your own site such as /billing.

string | null
<= 2048 characters
icon
string
default: info
Allowed values: check warning info error
category

A short name the bell can show as a tab, such as billing.

string | null
/^[a-z][a-z0-9_-]{0,23}$/
actions

Up to two buttons. Each url is an http(s) URL or a path on your own site.

Array<object>
<= 2 items
object
label
required
string
<= 40 characters
url
required
string
<= 2048 characters
data

Anything your page needs with the item (at most 2,048 bytes as JSON). Never shown; the bell widget passes it in its events.

object | null
send_at

Show it from this time, at most 60 days ahead. A time in the past means now.

string | null format: date-time
reactions
One of:
boolean
pinned

Keep it at the top of the bell until each person archives it (a maintenance notice). A pinned broadcast is not dropped after 30 days; retention of 90 days still applies.

boolean

Sent

object
data
object
id
string
Example
ntf_01J...
project_id
string
user_id

Set on a direct notification only.

string | null
audience

user: one user id. users: a group. all: everyone.

string
Allowed values: user users all
broadcast
boolean
title
string
body
string
action_url
string | null
icon
string
Allowed values: check warning info error
category

A short name the bell can show as a tab, such as billing.

string | null
/^[a-z][a-z0-9_-]{0,23}$/
actions

Up to two buttons. Each url is an http(s) URL or a path on your own site.

Array<object>
<= 2 items
object
label
required
string
<= 40 characters
url
required
string
<= 2048 characters
data

Anything your page needs with the item (at most 2,048 bytes as JSON). Never shown; the bell widget passes it in its events.

object | null
read_at

Direct notifications only; null on a group or a broadcast, which are read per person.

string | null
created_at
string format: date-time
visible_at

When it shows in bells: created_at, or the scheduled time.

string format: date-time
scheduled

Waiting for visible_at. Delete it to cancel; the month’s count is given back.

boolean
recipient_count

1 for a direct notification, the group’s size for a group, null for a broadcast.

integer | null
pinned
boolean
reactions

The reaction names people can pick in the bell; empty for none.

Array<string>
source
string
Allowed values: api changelog
changelog_entry_id
string | null
error
null
meta
object

Error envelope. See error.code for the discriminator.

object
data
required
null
error
required
object
code
required
string
message
required
string
remediation
required
string
doc_url
string format: uri
param
string
request_id
string
meta
object
key
additional properties

Error envelope. See error.code for the discriminator.

object
data
required
null
error
required
object
code
required
string
message
required
string
remediation
required
string
doc_url
string format: uri
param
string
request_id
string
meta
object
key
additional properties

Error envelope. See error.code for the discriminator.

object
data
required
null
error
required
object
code
required
string
message
required
string
remediation
required
string
doc_url
string format: uri
param
string
request_id
string
meta
object
key
additional properties