Set or rotate bearer token
POST
/api/webhooks/subscription/{id}/rotate-bearer-token
Code sample: Shell / cURL
curl --request POST \ --url https://api.ztlpay.io/api/webhooks/subscription/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/rotate-bearer-token \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "bearerToken": "example" }'Already queued deliveries retain the previous bearer token. Allow an overlap period in your receiver while those deliveries finish.
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
bearerToken
required
Non-blank token value without the Bearer prefix. This endpoint cannot remove a configured token.
string
Examplegenerated
{ "bearerToken": "example"}Responses
Section titled “Responses”Updated subscription. The bearer token is not returned.
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" ]}Bearer token must not be blank.
Subscription was not found.