Version
GET

Poll recent webhook events

/v1/webhook-events in the Webhook Events API.

curl "https://api.example.test/v1/webhook-events?type=team.member_joined&limit=3" \  -H "Authorization: Bearer $TOKEN"

The most recent deliveries of one event type, newest first, as the envelopes the endpoints received. limit defaults to 3 and is capped at 10; project_id restricts to deliveries whose endpoint is confined to that project.

api_version is the payload-envelope stamp the dispatcher wrote at delivery time; see versioning. Only deliveries against endpoints owned by the token's team are returned; other tenants' events are never surfaced.

data is empty when no endpoint in your team is subscribed to the requested event type yet, or when no delivery has fired for that type since the relevant endpoint was created.

GET
/v1/webhook-events

The token must hold this ability, or the call is refused with 403.

Authorization

bearerToken
AuthorizationBearer <token>

A personal access token minted in the app under Account Settings, then API Tokens, sent as Authorization: Bearer zg_live_…. The token carries the abilities each endpoint lists under Requires ability and is frozen to one team, and optionally to one project, at mint time.

In: header

Query Parameters

type*string

The event name to sample, such as project.created; must be a case from the outbound webhook event catalogue. An unknown name is refused.

limit?integer

How many recent deliveries to return, 1 to 10.

Default3
project_id?string

Restrict to deliveries whose endpoint is confined to this project.

Formatuuid

Responses

200OK

Array of WebhookEventResource

401Unauthorized

The request carries no bearer token, or one that is revoked, malformed, or minted for another environment (a zg_test_ token on production).

403Forbidden

The token is valid but does not carry the ability this endpoint requires; error.context.required_ability names the one to grant. An endpoint that also checks who registered a row answers FORBIDDEN with the same status, and says so in its own description.

404Not found

With reason: missing_team_scope when the token carries no team scope.

422Validation failed

The payload broke a rule, and error.fields maps each offending key to its messages. A refusal from the domain, such as a role code already taken or a team the caller does not own, uses the same code with error.message saying why and no fields. On this endpoint: VALIDATION_FAILED: when type is missing or not an event name from the catalogue, limit is outside 1 to 10, or project_id is not a UUID.

429Too many requests

The token has spent its 300 requests a minute or 10,000 an hour; Retry-After says when the next one is accepted.

How is this guide?

Last updated on