Browse Docs

Submit Event

POST /event

Submit an event notification to your workspace. Every property except message is optional.

Minimal request

The smallest valid request is just a message. The event goes to the workspace’s default channel.

curl -X POST https://api.apialerts.com/event \
  -H "Authorization: Bearer YOUR-API-KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Deploy complete"
  }'

Full request

Every supported property:

curl -X POST https://api.apialerts.com/event \
  -H "Authorization: Bearer YOUR-API-KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "event": "user.signup",
    "channel": "signups",
    "title": "New paid signup",
    "message": "Alex Smith subscribed to the Team plan",
    "link": "https://dashboard.example.com/users/123",
    "tags": ["signup", "team-plan", "organic"],
    "data": {
      "userId": "123",
      "plan": "team",
      "mrr": 90
    }
  }'

Request body

FieldTypeRequiredNotes
messagestringYesThe notification body. Truncated to 500 characters.
eventstringNoEvent key used by routers to forward to Slack, webhooks, Discord, etc. Conventionally domain.action (e.g. user.signup, app.error.crash). Truncated to 128 characters.
channelstringNoTarget channel slug. Defaults to the workspace’s default channel. Truncated to 64 characters.
titlestringNoOptional headline shown above the message on push, Slack, email, etc. Truncated to 128 characters.
linkstringNoURL opened when the notification is tapped. Must start with http://, https://, mailto:, or tel:. Max 1000 characters; rejected (not truncated) if longer.
tagsstring[]NoUp to 10 tags for categorisation and filtering. Each tag truncated to 50 characters; extras silently dropped.
dataobjectNoArbitrary JSON metadata. Available to router templates as {{data.fieldName}} (e.g. {{data.userId}}). Bound by the overall 256 KB request limit.

Total request body size is capped at 256 KB. Larger payloads return 413 Payload Too Large.

Event routing

The optional event key is what routers match against. A router with the pattern user.* will forward user.signup, user.churn, and any other user.something event to its configured destinations (Slack, Discord, webhook, Twilio, etc.). Use * to match everything, or an exact string for a single event type.

Push notifications fire for every event regardless of routing - they always go to members of the event’s channel.

Response

200 OK

{
  "workspace": "My Workspace",
  "channel": "signups",
  "eventId": "abc123def",
  "remainingQuota": 4832
}
FieldTypeDescription
workspacestringName of the workspace the event was sent to.
channelstringChannel the event was routed to (the resolved default if you omitted channel).
eventIdstringUnique identifier for the event. Use this to deep-link to the event in the dashboard.
remainingQuotanumberRemaining monthly event quota for the workspace.
errorsstring[]Present only when the event was accepted but some properties were dropped (e.g. an over-length tag). Each entry describes what was dropped and why.

Errors

StatusDescription
400Missing message or other validation error.
401Invalid or missing API key.
413Request body exceeds 256 KB.
429Monthly event quota exceeded, or per-workspace rate limit hit.