Rotate the signing secret
curl --request POST \
--url https://partners.chargeexpressltd.com/api/public/v1/webhook_endpoints/{endpointId}/rotate_secret \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://partners.chargeexpressltd.com/api/public/v1/webhook_endpoints/{endpointId}/rotate_secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://partners.chargeexpressltd.com/api/public/v1/webhook_endpoints/{endpointId}/rotate_secret"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"object": "webhook_endpoint",
"id": "<string>",
"url": "<string>",
"description": "<string>",
"events": [
"<string>"
],
"status": "enabled",
"disabled_reason": "manual",
"failing_since": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"secret": "<string>"
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}Webhook endpoints
Rotate the signing secret
The previous secret keeps signing alongside the new one for 24 hours.
Requires the webhooks:write scope.
Accepts an Idempotency-Key header.
POST
/
webhook_endpoints
/
{endpointId}
/
rotate_secret
Rotate the signing secret
curl --request POST \
--url https://partners.chargeexpressltd.com/api/public/v1/webhook_endpoints/{endpointId}/rotate_secret \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://partners.chargeexpressltd.com/api/public/v1/webhook_endpoints/{endpointId}/rotate_secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://partners.chargeexpressltd.com/api/public/v1/webhook_endpoints/{endpointId}/rotate_secret"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"object": "webhook_endpoint",
"id": "<string>",
"url": "<string>",
"description": "<string>",
"events": [
"<string>"
],
"status": "enabled",
"disabled_reason": "manual",
"failing_since": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"secret": "<string>"
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}Authorizations
Your fleet API key, e.g. Authorization: Bearer cxk_live_…. Create keys in the fleet portal under Developers.
Headers
Maximum string length:
255Path Parameters
Response
Success
Available options:
webhook_endpoint Available options:
enabled, disabled Available options:
manual, failing Only on create and rotate_secret

