ZapAPI Docs
Get StartedConceptsAI GatewayGuidesPayment GatewaySDKAPI ReferenceResources
ApiWebhooks

Create a new webhook endpoint

POST
/api/v1/webhooks

Creates a new webhook. The secret is only shown ONCE - save it securely! Requires webhooks:write scope when using an API key.

Authorization

bearer

Header Parameters

X-API-Version?string

API version for header-based versioning

Default"1"
Value in"1""2"

Request Body

application/json
  1. body
url*string

Webhook endpoint URL (http/https)

events*array<string>

Events to subscribe to

projectId*string

Associated project ID

Response Body

Webhook created successfully. Secret is returned only once.

Example Request
curl -X POST 'http://localhost:3001/api/v1/webhooks' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://api.yourapp.com/webhooks/zapapi",  "events": [    "invoice.paid",    "invoice.expired"  ],  "projectId": "uuid-of-project"}'
Example Response201
Empty