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
| Field | Type | Required | Notes |
|---|---|---|---|
message | string | Yes | The notification body. Truncated to 500 characters. |
event | string | No | Event 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. |
channel | string | No | Target channel slug. Defaults to the workspace’s default channel. Truncated to 64 characters. |
title | string | No | Optional headline shown above the message on push, Slack, email, etc. Truncated to 128 characters. |
link | string | No | URL opened when the notification is tapped. Must start with http://, https://, mailto:, or tel:. Max 1000 characters; rejected (not truncated) if longer. |
tags | string[] | No | Up to 10 tags for categorisation and filtering. Each tag truncated to 50 characters; extras silently dropped. |
data | object | No | Arbitrary 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
}
| Field | Type | Description |
|---|---|---|
workspace | string | Name of the workspace the event was sent to. |
channel | string | Channel the event was routed to (the resolved default if you omitted channel). |
eventId | string | Unique identifier for the event. Use this to deep-link to the event in the dashboard. |
remainingQuota | number | Remaining monthly event quota for the workspace. |
errors | string[] | 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
| Status | Description |
|---|---|
| 400 | Missing message or other validation error. |
| 401 | Invalid or missing API key. |
| 413 | Request body exceeds 256 KB. |
| 429 | Monthly event quota exceeded, or per-workspace rate limit hit. |