Skip to content

Webhooks

SDK Reference · Resource

Webhooks

Configure customer webhook destinations and delivery behaviour.

method

list()

List customer webhooks

Returns webhook destinations configured by the authenticated account, including delivery timeouts and retry settings.

Signature

Promiseclient.webhooks.list(options: WebhooksListOptions = {}): Promise<WebhooksListResponse>

Parameters

NameTypeRequirementDescription
limitnumberOptionalNumber of results to return per page.
offsetnumberOptionalThe initial index from which to return the results.
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.

Example

const result = await client.webhooks.list();

Returns

PaginatedWebhookListList

The operation completed successfully.

typePaginatedWebhookListList4fields
count
number
Required
—
next
string
Optional
—
previous
string
Optional
—
results
WebhookList[]
Required
—
typeWebhookList8fields
id
string
Optional
—
type
WebhookScopeEnum
Optional
Context in which this webhook operates. Determines which events are delivered. User events scoped to the associated user account Reseller events scoped to the reseller and their sub-accounts System platform-wide system events * `user` - User * `reseller` - Reseller * `system` - System
enumWebhookScopeEnum0fields

* `user` - User * `reseller` - Reseller * `system` - System

No fields.

endpoint
string
Required
HTTPS URL that receives webhook POST requests when events are triggered. https://example.com/webhooks/proxy The endpoint must be publicly accessible and respond within the configured read timeout.
read_timeout
number
Optional
Maximum time to wait for the endpoint to return a response. Requests that exceed this limit are treated as failed and may be retried.
write_timeout
number
Optional
Maximum time to wait while sending the payload to the endpoint. Requests that exceed this limit are treated as failed and may be retried.
retries
number
Optional
Number of additional delivery attempts after an initial failure. Set to 0 to disable retries. 3 → up to 4 total delivery attempts
retry_timeout
number
Optional
How long to wait before each retry attempt after a failed delivery. 10 → retry after 10 seconds
created
string
Required
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.webhooks.listWithResponse(options): Promise<ApiResponse<WebhooksListResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

create()

Create a customer webhook

Registers an HTTPS destination for a supported event type. Private, loopback, and otherwise unsafe destinations are rejected.

Signature

Promiseclient.webhooks.create(options: WebhooksCreateOptions): Promise<WebhooksCreateResponse>

Parameters

NameTypeRequirementDescription
idempotencyKeystringOptionalStable key for one logical mutation. Successful responses are replayable for 24 hours; reusing a key with a different request fails.
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.
bodyWebhookCreateRequestRequired—

Example

const result = await client.webhooks.create({
body: {
"type": "user",
"endpoint": "{endpoint}"
}
});

Returns

WebhookCreated

The resource or action result was created successfully.

typeWebhookCreated9fields
id
string
Optional
—
type
WebhookScopeEnum
Optional
Context in which this webhook operates. Determines which events are delivered. User events scoped to the associated user account Reseller events scoped to the reseller and their sub-accounts System platform-wide system events * `user` - User * `reseller` - Reseller * `system` - System
enumWebhookScopeEnum0fields

* `user` - User * `reseller` - Reseller * `system` - System

No fields.

endpoint
string
Required
HTTPS URL that receives webhook POST requests when events are triggered. https://example.com/webhooks/proxy The endpoint must be publicly accessible and respond within the configured read timeout.
secret
string
Optional
Secret used to sign each webhook payload. The receiving endpoint should verify the signature to confirm the request originated from this platform. Auto-generated if left blank. Store this value securely on the receiving end.
read_timeout
number
Optional
Maximum time to wait for the endpoint to return a response. Requests that exceed this limit are treated as failed and may be retried.
write_timeout
number
Optional
Maximum time to wait while sending the payload to the endpoint. Requests that exceed this limit are treated as failed and may be retried.
retries
number
Optional
Number of additional delivery attempts after an initial failure. Set to 0 to disable retries. 3 → up to 4 total delivery attempts
retry_timeout
number
Optional
How long to wait before each retry attempt after a failed delivery. 10 → retry after 10 seconds
created
string
Required
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "conflict"The operation conflicts with the current resource or idempotency state.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.webhooks.createWithResponse(options): Promise<ApiResponse<WebhooksCreateResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

get()

Get a customer webhook

Returns one webhook destination owned by the authenticated account.

Signature

Promiseclient.webhooks.get(options: WebhooksGetOptions): Promise<WebhooksGetResponse>

Parameters

NameTypeRequirementDescription
idstringRequiredA unique value identifying this Webhook.
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.

Example

const result = await client.webhooks.get({
id: "550e8400-e29b-41d4-a716-446655440000"
});

Returns

WebhookList

The operation completed successfully.

typeWebhookList8fields
id
string
Optional
—
type
WebhookScopeEnum
Optional
Context in which this webhook operates. Determines which events are delivered. User events scoped to the associated user account Reseller events scoped to the reseller and their sub-accounts System platform-wide system events * `user` - User * `reseller` - Reseller * `system` - System
enumWebhookScopeEnum0fields

* `user` - User * `reseller` - Reseller * `system` - System

No fields.

endpoint
string
Required
HTTPS URL that receives webhook POST requests when events are triggered. https://example.com/webhooks/proxy The endpoint must be publicly accessible and respond within the configured read timeout.
read_timeout
number
Optional
Maximum time to wait for the endpoint to return a response. Requests that exceed this limit are treated as failed and may be retried.
write_timeout
number
Optional
Maximum time to wait while sending the payload to the endpoint. Requests that exceed this limit are treated as failed and may be retried.
retries
number
Optional
Number of additional delivery attempts after an initial failure. Set to 0 to disable retries. 3 → up to 4 total delivery attempts
retry_timeout
number
Optional
How long to wait before each retry attempt after a failed delivery. 10 → retry after 10 seconds
created
string
Required
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "not_found"The requested resource does not exist.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.webhooks.getWithResponse(options): Promise<ApiResponse<WebhooksGetResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

delete()

Delete a customer webhook

Stops future event delivery to the selected destination and removes the webhook configuration.

Signature

Promiseclient.webhooks.delete(options: WebhooksDeleteOptions): Promise<WebhooksDeleteResponse>

Parameters

NameTypeRequirementDescription
idstringRequiredA unique value identifying this Webhook.
idempotencyKeystringOptionalStable key for one logical mutation. Successful responses are replayable for 24 hours; reusing a key with a different request fails.
ifMatchstringOptionalStrong ETag from the latest representation of this resource.
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.

Example

const result = await client.webhooks.delete({
id: "550e8400-e29b-41d4-a716-446655440000"
});

Returns

void

No response body

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "not_found"The requested resource does not exist.
  • kind: "conflict"The operation conflicts with the current resource or idempotency state.
  • kind: "precondition"A required resource precondition is no longer satisfied.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.webhooks.deleteWithResponse(options): Promise<ApiResponse<WebhooksDeleteResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.