Skip to main content
POST/v1/notifications/dispatch

Dispatch an activation notification

Records an insight-to-action notification and requested Slack, email, webhook, or in-app delivery channels.

Authentication

Requires Authorization: Bearer ${API_KEY}. Create and rotate keys from the TrackLayer dashboard.

Request body schema

{
  "channels": [
    "slack | email | webhook | in_app"
  ],
  "title": "string",
  "body": "string",
  "link_url": "string",
  "metadata": "object"
}

Response schema · 202

{
  "notification": {
    "id": "ntf_123"
  },
  "dispatched": [
    "slack",
    "email",
    "webhook",
    "in_app"
  ]
}

Response example

{
  "notification": {
    "id": "ntf_123"
  },
  "dispatched": [
    "slack",
    "email",
    "webhook",
    "in_app"
  ]
}

Code examples

curl https://api.tracklayer.com/v1/notifications/dispatch \
  -X POST \
  -H "Authorization: Bearer ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"event_name":"purchase","user_id":"u_123","properties":{"order_id":"100045","value":129}}'

Try it out

Use the dashboard to create an API key, then run one of the examples above with TRACKLAYER_API_KEY set in your environment.

Open API key settings

We use essential cookies to keep the site secure and functional. Analytics and third-party tags run only with your consent. See our Cookie Policy.

We use essential cookies to keep the site secure and functional. Analytics and third-party tags run only with your consent. See our Cookie Policy.