Update webhook subscription
PATCH
/api/webhooks/subscription/{id}
Code sample: Shell / cURL
curl --request PATCH \ --url https://api.ztlpay.io/api/webhooks/subscription/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "targetUrl": "https://partner.example/webhooks/ztl", "eventTypes": [ "PAYMENT_STATUS" ] }'Replace the endpoint and event types. Both fields are required. Use the bearer-token endpoint to set or rotate authentication. Already queued deliveries retain their original endpoint and credentials.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
targetUrl
required
Public HTTPS endpoint with a host and no embedded username or password. Requires a valid publicly trusted TLS certificate. Use the test endpoint to verify reachability.
string format: uri
Example
https://partner.example/webhooks/ztleventTypes
required
Array<string>
Responses
Section titled “Responses”Updated subscription.
Media typeapplication/json
object
id
required
string format: uuid
targetUrl
required
string format: uri
enabled
required
boolean
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
eventTypes
required
Array<string>
hasBearerToken
required
boolean
Example
{ "eventTypes": [ "PAYMENT_STATUS" ]}Invalid target URL or event type.
Subscription was not found.