Platform

Webhooks

Outbound webhook subscriptions - Genaya POSTs signed event payloads to your server as things happen. Supports the REST-hook subscribe / unsubscribe pattern integration platforms use.

GET/webhook-endpoints

List webhook endpoints

Returns every webhook endpoint configured for your organization, newest first. Endpoints are capped at 10 per organization (the cap is shared with endpoints created in the app under Settings > Developer > Webhooks), so the list is never paginated - has_more is always false. The signing secret is MASKED in this response (whsec_...ab12); the full secret is returned only once, in the 201 response that created the endpoint. Requires scope: webhooks:read.

Response 200

No fields.

Errors

401Bad, missing, or revoked key
402The prepaid balance has nothing left for API requests past the included pool, or the trial requests are used up
403Lacks scope, plan without API access, live key on a trial, test key writing, or feature switched off
429Rate limited
500Unexpected server error
POST/webhook-endpoints

Create a webhook endpoint

Subscribes an HTTPS URL to one or more event types (or ["*"] for all events). This is the subscribe half of the REST-hook pattern integration platforms use: POST the target URL plus the events, store the returned id and secret, and DELETE the endpoint to unsubscribe. The 201 response is the ONLY response that carries the endpoint's full signing secret (whsec_...) - store it immediately; every later read returns it masked. Use the secret to verify the X-Genaya-Signature header on deliveries (t=unix,v1=hex HMAC-SHA256 of "t.rawBody"). URLs must be https (plaintext http, private/internal addresses, and embedded credentials are rejected with code invalid_url). Unknown event types are rejected with code unknown_event - fetch the catalog from GET /v1/webhook-endpoints/events. Creating an endpoint past the 10-per-org cap returns 400 with code endpoint_limit. Supports the Idempotency-Key header for safe retries. Requires scope: webhooks:write.

Request body

FieldTypeDescription
urlrequired
string
The HTTPS URL to deliver events to (max 2048 characters). Plaintext http, private/internal network addresses, and URLs with embedded credentials are rejected (code invalid_url).
eventsrequired
array of string
Event types to subscribe to, or ["*"] for all events. Unknown types are rejected (code unknown_event); fetch the catalog from GET /v1/webhook-endpoints/events.
description
string
Optional label for the endpoint (max 200 characters).

Response 201

FieldTypeDescription
idrequired
string
Unique identifier for the webhook endpoint.
objectrequired
string
The object type. Always "webhook_endpoint".
urlrequired
string
The HTTPS URL deliveries are POSTed to.
description
string
Optional label for the endpoint (max 200 characters). Null when not set.nullable
eventsrequired
array of string
The event types this endpoint receives. ["*"] means every event type, including types added in the future.
statusrequired
enumenabled | disabled | auto_disabled
Delivery state. "enabled" delivers events; "disabled" holds them (deliveries created while disabled are not queued); "auto_disabled" means Genaya paused the endpoint after repeated dead deliveries - fix the receiver, then set status back to "enabled" via PATCH (which also resets the failure streak) or in Settings > Developer > Webhooks.
secret
string
The signing secret used to compute the X-Genaya-Signature header on every delivery. Returned IN FULL exactly once - in the 201 create response - and masked (whsec_...ab12) in every other response. It cannot be re-revealed; delete and recreate the endpoint to rotate it.
created_at
string <date-time>
nullable
updated_at
string <date-time>
nullable

Errors

400Malformed or missing parameters
401Bad, missing, or revoked key
402The prepaid balance has nothing left for API requests past the included pool, or the trial requests are used up
403Lacks scope, plan without API access, live key on a trial, test key writing, or feature switched off
409Idempotency-Key reused with a different body
429Rate limited
500Unexpected server error
GET/webhook-endpoints/events

List webhook event types

Returns the machine-readable catalog of event types an endpoint can subscribe to, so an integration can present the list without hardcoding it. New event types may be added over time - treat unrecognized types as ignorable rather than as errors. (The "Send test event" button in Settings > Developer > Webhooks also delivers a synthetic ping event that is not part of this catalog.) Requires scope: webhooks:read.

Response 200

No fields.

Errors

401Bad, missing, or revoked key
402The prepaid balance has nothing left for API requests past the included pool, or the trial requests are used up
403Lacks scope, plan without API access, live key on a trial, test key writing, or feature switched off
429Rate limited
500Unexpected server error
GET/webhook-endpoints/{id}

Retrieve a webhook endpoint

Returns a single webhook endpoint by id. The signing secret is masked - it is returned in full only in the create response. An endpoint belonging to another organization returns 404 rather than 403, so this can never confirm cross-tenant existence. Requires scope: webhooks:read.

Parameters

Path

idrequired
string
The webhook endpoint id.

Response 200

FieldTypeDescription
idrequired
string
Unique identifier for the webhook endpoint.
objectrequired
string
The object type. Always "webhook_endpoint".
urlrequired
string
The HTTPS URL deliveries are POSTed to.
description
string
Optional label for the endpoint (max 200 characters). Null when not set.nullable
eventsrequired
array of string
The event types this endpoint receives. ["*"] means every event type, including types added in the future.
statusrequired
enumenabled | disabled | auto_disabled
Delivery state. "enabled" delivers events; "disabled" holds them (deliveries created while disabled are not queued); "auto_disabled" means Genaya paused the endpoint after repeated dead deliveries - fix the receiver, then set status back to "enabled" via PATCH (which also resets the failure streak) or in Settings > Developer > Webhooks.
secret
string
The signing secret used to compute the X-Genaya-Signature header on every delivery. Returned IN FULL exactly once - in the 201 create response - and masked (whsec_...ab12) in every other response. It cannot be re-revealed; delete and recreate the endpoint to rotate it.
created_at
string <date-time>
nullable
updated_at
string <date-time>
nullable

Errors

401Bad, missing, or revoked key
402The prepaid balance has nothing left for API requests past the included pool, or the trial requests are used up
403Lacks scope, plan without API access, live key on a trial, test key writing, or feature switched off
404No such resource in this organization
429Rate limited
500Unexpected server error
PATCH/webhook-endpoints/{id}

Update a webhook endpoint

Updates the URL, subscribed events, description, or status of an endpoint. Only provided fields are changed. Setting status to "enabled" also resets the endpoint's consecutive-failure streak, which is how you revive an endpoint that was automatically paused (status "auto_disabled") after repeated dead deliveries. The signing secret cannot be changed or re-revealed - delete the endpoint and create a new one to rotate it. Ownership is verified before the write, so an endpoint belonging to another organization returns 404. Requires scope: webhooks:write.

Parameters

Path

idrequired
string
The webhook endpoint id.

Request body

FieldTypeDescription
url
string
Replacement HTTPS delivery URL (same validation as create).
events
array of string
Replacement event type list, or ["*"] for all events.
description
string
Replacement label (max 200 characters).
status
enumenabled | disabled
Set "disabled" to pause deliveries or "enabled" to resume them. Re-enabling also resets the consecutive-failure streak, which revives an auto_disabled endpoint. "auto_disabled" itself cannot be set here - it is only ever applied by Genaya.

Response 200

FieldTypeDescription
idrequired
string
Unique identifier for the webhook endpoint.
objectrequired
string
The object type. Always "webhook_endpoint".
urlrequired
string
The HTTPS URL deliveries are POSTed to.
description
string
Optional label for the endpoint (max 200 characters). Null when not set.nullable
eventsrequired
array of string
The event types this endpoint receives. ["*"] means every event type, including types added in the future.
statusrequired
enumenabled | disabled | auto_disabled
Delivery state. "enabled" delivers events; "disabled" holds them (deliveries created while disabled are not queued); "auto_disabled" means Genaya paused the endpoint after repeated dead deliveries - fix the receiver, then set status back to "enabled" via PATCH (which also resets the failure streak) or in Settings > Developer > Webhooks.
secret
string
The signing secret used to compute the X-Genaya-Signature header on every delivery. Returned IN FULL exactly once - in the 201 create response - and masked (whsec_...ab12) in every other response. It cannot be re-revealed; delete and recreate the endpoint to rotate it.
created_at
string <date-time>
nullable
updated_at
string <date-time>
nullable

Errors

400Malformed or missing parameters
401Bad, missing, or revoked key
402The prepaid balance has nothing left for API requests past the included pool, or the trial requests are used up
403Lacks scope, plan without API access, live key on a trial, test key writing, or feature switched off
404No such resource in this organization
429Rate limited
500Unexpected server error
DELETE/webhook-endpoints/{id}

Delete a webhook endpoint

Deletes a webhook endpoint and stops all future deliveries to it. This is the unsubscribe half of the REST-hook pattern. Requires scope: webhooks:write.

Parameters

Path

idrequired
string
The webhook endpoint id.

Response 200

FieldTypeDescription
idrequired
string
objectrequired
string
deletedrequired
boolean

Errors

401Bad, missing, or revoked key
402The prepaid balance has nothing left for API requests past the included pool, or the trial requests are used up
403Lacks scope, plan without API access, live key on a trial, test key writing, or feature switched off
404No such resource in this organization
429Rate limited
500Unexpected server error