Webhooks
Endpoints that receive signed events. See Webhooks for verifying signatures and how retries work.
Add a webhook endpoint
POST/v1/webhook_endpointsSecret key · scope webhooks:write
Request body
| Field | Type | Description |
|---|---|---|
url required | string | |
events | array of string | |
description | string |
Returns
Includes the signing secret, shown once
Errors
Errors return {"error": {"code", "message", "field", "request_id"}} with a 4xx or 5xx status. See Errors.
curl -X POST https://thewavly.com/v1/webhook_endpoints \
-H "Authorization: Bearer $WAVLY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.in/webhooks/wavly",
"description": "The order arrived with a substituted item."
}'import { Wavly } from "@thewavly/sdk";
const wavly = new Wavly(process.env.WAVLY_API_KEY);
const result = await wavly.request("POST", "/v1/webhook_endpoints", {
"url": "https://example.in/webhooks/wavly",
"description": "The order arrived with a substituted item."
});from thewavly import Wavly
wavly = Wavly(os.environ["WAVLY_API_KEY"])
result = wavly.request("POST", "/v1/webhook_endpoints", {
"url": "https://example.in/webhooks/wavly",
"description": "The order arrived with a substituted item."
})Response
{}List webhook endpoints
GET/v1/webhook_endpointsSecret key · scope webhooks:read
Returns
| Field | Type | Description |
|---|---|---|
object required | "list" | |
data required | array of object | |
has_more required | boolean |
Errors
Errors return {"error": {"code", "message", "field", "request_id"}} with a 4xx or 5xx status. See Errors.
curl https://thewavly.com/v1/webhook_endpoints \
-H "Authorization: Bearer $WAVLY_API_KEY"import { Wavly } from "@thewavly/sdk";
const wavly = new Wavly(process.env.WAVLY_API_KEY);
const result = await wavly.request("GET", "/v1/webhook_endpoints");from thewavly import Wavly
wavly = Wavly(os.environ["WAVLY_API_KEY"])
result = wavly.request("GET", "/v1/webhook_endpoints")Response
{
"object": "list",
"data": [
{}
],
"has_more": true
}Delete a webhook endpoint
DELETE/v1/webhook_endpoints/{id}Secret key · scope webhooks:write
Parameters
| Name | In | Description |
|---|---|---|
id required | path | Endpoint idpattern ^we_[\w-]{6,40}$ |
Returns
A JSON object.
Errors
Errors return {"error": {"code", "message", "field", "request_id"}} with a 4xx or 5xx status. See Errors.
curl -X DELETE https://thewavly.com/v1/webhook_endpoints/chk_P1iENx01EDRJ \
-H "Authorization: Bearer $WAVLY_API_KEY"import { Wavly } from "@thewavly/sdk";
const wavly = new Wavly(process.env.WAVLY_API_KEY);
const result = await wavly.request("DELETE", "/v1/webhook_endpoints/chk_P1iENx01EDRJ");from thewavly import Wavly
wavly = Wavly(os.environ["WAVLY_API_KEY"])
result = wavly.request("DELETE", "/v1/webhook_endpoints/chk_P1iENx01EDRJ")Response
{}