TheWavlyDocs
DocsAPI reference

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

FieldTypeDescription
url requiredstring
eventsarray of string
descriptionstring

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."
}'
Response
{}

List webhook endpoints

GET/v1/webhook_endpointsSecret key · scope webhooks:read

Returns

FieldTypeDescription
object required"list"
data requiredarray of object
has_more requiredboolean

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"
Response
{
  "object": "list",
  "data": [
    {}
  ],
  "has_more": true
}

Delete a webhook endpoint

DELETE/v1/webhook_endpoints/{id}Secret key · scope webhooks:write

Parameters

NameInDescription
id requiredpathEndpoint 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"
Response
{}