Skip to content

Event API

The Event API sends lifecycle notifications through three routes:

  • POST /event/create
  • POST /event/update
  • POST /event/close
  • Request body must be JSON.
  • Unknown fields are rejected (strict parsing).
  • Authorization: Bearer <token> is required only when gateway auth is enabled.
FieldTypeRequiredNotes
channel_idstringYesTarget channel ID.
passwordstringYesChannel password, 8-128 chars.
op_idstringNoIdempotency key. If missing, gateway generates one and echoes it in response.
thing_idstringNoOptional thing-scoped context for this dispatch.
RouteHard required business fields
/event/createtitle, status, message, severity, event_time
/event/updateevent_id, status, message, severity, event_time
/event/closeevent_id, status, message, severity, event_time
FieldTypeRequiredRules
event_idstringUpdate/Close onlyMust be omitted on create; generated by gateway on create.
titlestringCreate onlyOptional on update/close.
descriptionstringNoEmpty string is treated as absent.
statusstringCreate/Update/CloseNon-empty, max 24 chars.
messagestringCreate/Update/CloseNon-empty, max 512 chars.
severitystringCreate/Update/Close`critical
event_timenumberYesUnix seconds; used as occurred-at for this event dispatch.
started_atnumberNoAllowed only on create.
ended_atnumberNoAllowed only on close.
tagsstring[]NoMax 32 items, each max 64 chars, deduplicated after trim.
imagesstring[]NoMax 32 items, each max 2048 chars, deduplicated after trim.
attrsobjectNoObject patch; null value means delete key. Arrays are rejected.
metadataobjectNoScalar values only (string/number/bool), key <= 64, value <= 512.
Terminal window
curl -X POST https://gateway.pushgo.dev/event/create \
-H "Content-Type: application/json" \
-d '{
"channel_id": "06J0FZG1Y8XGG14VTQ4Y3G10MR",
"password": "pass-1234",
"title": "Database lag",
"status": "ongoing",
"message": "Replica delay > 30s",
"severity": "high",
"event_time": 1713750000,
"started_at": 1713750000,
"tags": ["db", "replica"]
}'
{
"success": true,
"data": {
"channel_id": "06J0FZG1Y8XGG14VTQ4Y3G10MR",
"op_id": "op-20260422-001",
"event_id": "8a1fc4b3d9f04fd2857f92f66f7cc5d1",
"thing_id": null,
"accepted": true
},
"error": null,
"error_code": null
}