v3

latestOpenAPI 3.1.02026-07-3178343213.9 KB
webhooks

Create a webhook event schema

Creates a custom GraphQL schema for one webhook event namespace. For supported business events, the schema is a root-level Business selection set such as "{ id name runs { id agent } }".

post/v1/webhooks/{webhook_id}/event_schemas

Path parameters

webhook_idstring required

Webhook ID

Headers

Authorizationstring required

Bearer authentication

Request body

namespacestring required

Event namespace for the schema override. Currently supported business event namespaces are business.created and business.updated.

schemastring required

GraphQL selection set rooted at the event object for the namespace. For business.updated, write fields directly against the Business object, for example "{ id name runs { id agent } }". Use snake_case field names; do not wrap the query in "object { ... }".

Response

webhook event schema created

object'webhook_event_schema' required
idstring uuid required

Unique identifier for this webhook event schema.

namespacestring required

Event namespace for the schema override. Currently supported business event namespaces are business.created and business.updated.

schemastring required

GraphQL selection set rooted at the event object for the namespace. For business.updated, write fields directly against the Business object, for example "{ id name runs { id agent } }". The selected object replaces only data.object in delivered webhook payloads.

created_atstring date-time required
updated_atstring date-time required