Events and webhooks
What happened in a project, and webhooks that announce it.
HTTPBearerAuthorizationBearer <token>after?|Only the events that came after this one.
limit?Limit1 <= value <= 20050Zued-Project?|The project this request reads, by id. Needed with an account key (from sign-in by link); a project key reads its own project and ignores it. GET /v1/projects lists the ids.
Successful Response
application/json- response
events*array<>Oldest first.
has_more*Has Morenext_after*|The id to pass as after on the next call: the last event returned, or the after you sent when none followed.
curl -X GET 'https://api.zued.ai/v1/events'{ "events": [ { "id": "string", "type": "string", "created_at": "string", "data": {} } ], "has_more": true, "next_after": "string"}HTTPBearerAuthorizationBearer <token>Zued-Project?|The project this request reads, by id. Needed with an account key (from sign-in by link); a project key reads its own project and ignores it. GET /v1/projects lists the ids.
Successful Response
application/json- response
webhooks*array<>curl -X GET 'https://api.zued.ai/v1/webhooks'{ "webhooks": [ { "id": "string", "url": "string", "types": [ "string" ], "created_at": "string", "status": "active", "delivered": 0, "pending": 0, "retrying": 0, "failed": 0, "last_error": "string", "header": { "name": "string" } } ]}HTTPBearerAuthorizationBearer <token>Zued-Project?|The project this request reads, by id. Needed with an account key (from sign-in by link); a project key reads its own project and ignores it. GET /v1/projects lists the ids.
application/json- body
url*UrlA public https or http address. It receives a signed POST per event.
length <= 2000types?array<>The event types it receives. Empty means every type. snapshot.completed: a week's measurement is ready. analysis.completed: a project's first measurement is ready, once per project.
header?|A header every delivery carries next to the signature headers, for a receiver that starts only on its own key: name Authorization and value Bearer followed by that key, for example. The signature does not cover it. Content-Type, Content-Length, Host, Transfer-Encoding, Connection and names starting with webhook- are refused.
Successful Response
application/json- response
id*Idurl*UrlThe address it receives at. A key without the write permission sees its scheme and host followed by /…, since an address such as a chat app's incoming webhook works as a key on its own.
types*array<string>created_at*Created Atstatus*Statuscreator_left: the member who added it no longer owns the project, and it receives nothing.
"active""creator_left"delivered*Deliveredpending*Pendingretrying*RetryingPending deliveries tried at least once, waiting for their next attempt.
failed*FailedDeliveries that failed every attempt.
last_error*|The newest error, of a delivery still retried or given up.
header*|The header every delivery carries, with its value.
secret*SecretSigns every delivery as the Standard Webhooks spec says. Shown in this answer only: keep it.
curl -X POST 'https://api.zued.ai/v1/webhooks' \ -H 'Content-Type: application/json' \ -d '{ "url": "string"}'{ "id": "string", "url": "string", "types": [ "string" ], "created_at": "string", "status": "active", "delivered": 0, "pending": 0, "retrying": 0, "failed": 0, "last_error": "string", "header": { "name": "string", "value": "string" }, "secret": "string"}HTTPBearerAuthorizationBearer <token>webhook_id*Webhook IduuidZued-Project?|The project this request reads, by id. Needed with an account key (from sign-in by link); a project key reads its own project and ignores it. GET /v1/projects lists the ids.
Successful Response
application/json- response
[key: string]?stringcurl -X DELETE 'https://api.zued.ai/v1/webhooks/497f6eca-6276-4993-bfeb-53cbbbba6f08'{ "property1": "string", "property2": "string"}