Skip to Content
zued

Events and webhooks

What happened in a project, and webhooks that announce it.

GET
/events

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Query Parameters

after?|

Only the events that came after this one.

limit?Limit
Range1 <= value <= 200
Default50

Header Parameters

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.

Response Body

Successful Response

application/json
  1. response
events*array<>

Oldest first.

has_more*Has More
next_after*|

The id to pass as after on the next call: the last event returned, or the after you sent when none followed.

Example Request
curl -X GET 'https://api.zued.ai/v1/events'
Example Response
{  "events": [    {      "id": "string",      "type": "string",      "created_at": "string",      "data": {}    }  ],  "has_more": true,  "next_after": "string"}
GET
/webhooks

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Header Parameters

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.

Response Body

Successful Response

application/json
  1. response
webhooks*array<>
Example Request
curl -X GET 'https://api.zued.ai/v1/webhooks'
Example Response
{  "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"      }    }  ]}
POST
/webhooks

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Header Parameters

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.

Request Body

application/json
  1. body
url*Url

A public https or http address. It receives a signed POST per event.

Lengthlength <= 2000
types?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.

Response Body

Successful Response

application/json
  1. response
id*Id
url*Url

The 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 At
status*Status

creator_left: the member who added it no longer owns the project, and it receives nothing.

Value in"active""creator_left"
delivered*Delivered
pending*Pending
retrying*Retrying

Pending deliveries tried at least once, waiting for their next attempt.

failed*Failed

Deliveries 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*Secret

Signs every delivery as the Standard Webhooks spec says. Shown in this answer only: keep it.

Example Request
curl -X POST 'https://api.zued.ai/v1/webhooks' \  -H 'Content-Type: application/json' \  -d '{  "url": "string"}'
Example Response
{  "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"}
DELETE
/webhooks/{webhook_id}

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

webhook_id*Webhook Id
Formatuuid

Header Parameters

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.

Response Body

Successful Response

application/json
  1. response
[key: string]?string
Example Request
curl -X DELETE 'https://api.zued.ai/v1/webhooks/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "property1": "string",  "property2": "string"}