Skip to main content
POST
/
test
/
notifications
curl --request POST \
  --url https://{host}/test/notifications \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "templateId": "transactional_order_settled",
  "users": [
    "64f0c51e7fb3fc001234abcd"
  ]
}
'
{
  "dispatch": "single",
  "notificationIds": [
    "674a1b2c3d4e5f6789012345"
  ]
}
These test endpoints are only available in development and staging environments. They are disabled in production.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
templateId
string
required

App notification event id (for example transactional_order_settled or learning_guide_created).

Example:

"transactional_order_settled"

users
string[]
required

MongoDB ObjectIds of users to notify. Must be unique. Length 1 uses single send; length ≥ 2 uses bulk send.

Minimum array length: 1
Pattern: ^[a-f0-9]{24}$
Example:
["64f0c51e7fb3fc001234abcd"]
customData
object

Optional key/value map sent to partner.

Example:
{ "amount": "50.00" }

Response

Notifications created and dispatch attempted (see product rules for skipped sends).

dispatch
enum<string>
required

Which code path was used for sending.

Available options:
single,
bulk
notificationIds
string[]
required

MongoDB ids of the created notification document(s).