API · Events
Create Event
Create an event definition (requires full access).
POST
/eventsFull accessRequest parameters
| Parameter | Type | Description |
|---|---|---|
Idempotency-Keyheader · optional | string1–256 characters | Makes the request safe to retry. See Idempotency. |
namebody · required | string | Event name, trimmed to 1–256 characters, excluding the case-insensitive reserved prefix opensend:. |
schemabody · optional | object | null | Up to 50 unique letter, digit, or underscore keys with string, number, boolean, or date types; keys are trimmed, blank keys discarded, and null or omission clears validation. |
Request example
Set OPENSEND_BASE_URL=https://api.example.com and OPENSEND_API_KEY=os_replace_me on your server.
bash
curl -X POST "$OPENSEND_BASE_URL/events" \
-H "Authorization: Bearer $OPENSEND_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"name":"user.signed_up","schema":{"plan":"string"}}'Response
201 · application/json. Example IDs stand for IDs returned by your installation.
json
{
"object": "event",
"id": "YOUR_ID"
}Behavior and errors
Names beginning with opensend: are reserved. This manages custom event definitions, not webhook subscriptions.
Use a full-access credential. Resource IDs belong to your team; an unknown or foreign resource returns 404. See authentication, errors, rate limits, and compatibility for the shared contract.