Server API: Server events
What people did, as your servers saw it, and the events your app defines.
| What it does | Route |
|---|---|
| Declare your events | PUT /server/v1/event-definitions |
| Send events | POST /server/v1/events |
Declare your events
Section titled “Declare your events”PUT /server/v1/event-definitions
Adds the events your app sends, and their props, so the list lives with your code. It only adds: nothing is deleted or changed, and the same declaration again changes nothing.
Needs: a server key (Authorization: Bearer crm_sk_…). See Connect your backend.
Body (application/json): EventDefinitions
| Field | Type | Description |
|---|---|---|
definitions (always) | array of Definition |
Answers
| Status | Body | Meaning |
|---|---|---|
| 200 | DeclaredEvents | OK |
| 400 | problem | The request could not be read: the problem names the field. |
| 401 | problem | No credential, or one that is not right. |
| 429 | problem | Too many requests: wait for Retry-After. |
Send events
Section titled “Send events”POST /server/v1/events
Up to 500 events a request, each kept or refused on its own. An event’s id is your idempotency key: the same id sent again is kept once.
Needs: a server key (Authorization: Bearer crm_sk_…). See Connect your backend.
Body (application/json): ServerEvents
| Field | Type | Description |
|---|---|---|
events (always) | array of ServerEvent |
Answers
| Status | Body | Meaning |
|---|---|---|
| 202 | ServerAccepted | Accepted |
| 400 | problem | The request could not be read: the problem names the field. |
| 401 | problem | No credential, or one that is not right. |
| 409 | problem | Refused as things stand: the problem says why. |
| 413 | problem | Too large. |
| 429 | problem | Too many requests: wait for Retry-After. |