TrustWixDocs
API reference

Webhooks

GET
/v1/webhooks

Your endpoints. The signing secret is never returned here, only once at creation. Cursor-paginated, newest first. limit accepts 1 to 100 and defaults to 20. To walk further, set starting_after to the id of the last record on the page you just read. has_more tells you another page exists and next_cursor is the value to pass back; on the last page has_more is false and next_cursor is null. An unknown cursor is ignored and you get the first page. Requires the webhook:manage permission on the calling key.

Authorization

secretKey
AuthorizationBearer <token>

Secret API key, e.g. kyc_live_... (server-side) or kyc_test_... (sandbox).

In: header

Query Parameters

limit?integer

How many records to return. 1 to 100, defaults to 20.

Range1 <= value <= 100
Default20
starting_after?string

A webhook endpoint id; returns the page after it.

Match^whe_

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/webhooks"
{  "object": "list",  "data": [    {      "id": "string",      "object": "webhook_endpoint",      "url": "http://example.com",      "events": [        "string"      ],      "status": "active",      "created_at": "2019-08-24T14:15:22Z"    }  ],  "has_more": true,  "next_cursor": "string"}
POST
/v1/webhooks

Register a URL to receive events. The response carries signing_secret exactly once: store it now, because it is not recoverable afterwards and no later call will return it. Use it to verify the signature on every delivery.

Requires the webhook:manage permission on the calling key.

Authorization

secretKey
AuthorizationBearer <token>

Secret API key, e.g. kyc_live_... (server-side) or kyc_test_... (sandbox).

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/webhooks" \  -H "Content-Type: application/json" \  -d '{    "url": "http://example.com",    "events": [      "string"    ]  }'
{  "id": "string",  "object": "webhook_endpoint",  "url": "http://example.com",  "events": [    "string"  ],  "status": "active",  "created_at": "2019-08-24T14:15:22Z",  "signing_secret": "string"}
DELETE
/v1/webhooks/{id}

Permanently removes the endpoint and stops future deliveries to it. Requires the webhook:manage permission on the calling key.

Authorization

secretKey
AuthorizationBearer <token>

Secret API key, e.g. kyc_live_... (server-side) or kyc_test_... (sandbox).

In: header

Path Parameters

id*string
Match^whe_

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/v1/webhooks/string"
{  "id": "string",  "object": "webhook_endpoint",  "deleted": true}