curl --request POST \
--url https://api.sandbox.paypathiq.com/v1/clients/{clientCode}/webhook-endpoint/rotate-secret \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{
"disabledReason": null,
"secretVersion": 2,
"signingSecret": "whsec_example_issued_once",
"status": "active",
"url": "https://hooks.example.com/paypathiq"
}{
"detail": "Request body is not valid JSON.",
"requestId": "29400000-0000-4000-8000-000000000001",
"status": 400,
"title": "Request body is not valid JSON.",
"type": "https://docs.paypathiq.com/problems/malformed_json"
}{
"detail": "API key is invalid, inactive, revoked, or for another environment.",
"requestId": "29400000-0000-4000-8000-000000000001",
"status": 401,
"title": "API key is invalid, inactive, revoked, or for another environment.",
"type": "https://docs.paypathiq.com/problems/invalid_api_key"
}{
"detail": "The Client code is unknown, the grant lacks the required scope, or the calling address is outside the grant's IP allowlist.",
"requestId": "29400000-0000-4000-8000-000000000001",
"status": 403,
"title": "The Client code is unknown, the grant lacks the required scope, or the calling address is outside the grant's IP allowlist.",
"type": "https://docs.paypathiq.com/problems/client_scope_denied"
}{
"detail": "No webhook endpoint is configured for this Client.",
"requestId": "29400000-0000-4000-8000-000000000001",
"status": 404,
"title": "No webhook endpoint is configured for this Client.",
"type": "https://docs.paypathiq.com/problems/webhook_endpoint_not_found"
}{
"detail": "Request body exceeds the 256 KiB resource limit.",
"requestId": "29400000-0000-4000-8000-000000000001",
"status": 413,
"title": "Request body exceeds the 256 KiB resource limit.",
"type": "https://docs.paypathiq.com/problems/request_too_large"
}{
"detail": "Media type or content encoding is unsupported. Send uncompressed application/json for PUT and POST, and application/merge-patch+json for PATCH.",
"requestId": "29400000-0000-4000-8000-000000000001",
"status": 415,
"title": "Media type or content encoding is unsupported. Send uncompressed application/json for PUT and POST, and application/merge-patch+json for PATCH.",
"type": "https://docs.paypathiq.com/problems/unsupported_media_type"
}{
"detail": "Route parameters or the representation are invalid. Route parameters are checked before authentication. Field errors carry a code such as invalid_format, unrecognized_keys, custom, sensitive_external_id, or sensitive_source_reference.",
"errors": [
{
"code": "invalid_format",
"detail": "Invalid ISO date",
"pointer": "/dueDate"
}
],
"requestId": "29400000-0000-4000-8000-000000000001",
"status": 422,
"title": "Route parameters or the representation are invalid. Route parameters are checked before authentication. Field errors carry a code such as invalid_format, unrecognized_keys, custom, sensitive_external_id, or sensitive_source_reference.",
"type": "https://docs.paypathiq.com/problems/validation_error"
}{
"detail": "Each API key may send 60 requests per minute and run 1 request at a time. In sandbox, the same limits also apply per Client across all of its keys. Every request, including GET, counts.",
"requestId": "29400000-0000-4000-8000-000000000001",
"status": 429,
"title": "Each API key may send 60 requests per minute and run 1 request at a time. In sandbox, the same limits also apply per Client across all of its keys. Every request, including GET, counts.",
"type": "https://docs.paypathiq.com/problems/rate_limit_exceeded"
}{
"detail": "An unexpected error prevented a safe commit, and nothing was saved. Retry with backoff.",
"requestId": "29400000-0000-4000-8000-000000000001",
"status": 503,
"title": "An unexpected error prevented a safe commit, and nothing was saved. Retry with backoff.",
"type": "https://docs.paypathiq.com/problems/projection_unavailable"
}Rotate the webhook signing secret
Requires webhooks:manage. Issues a new signing secret, returned once. For 24 hours each notification carries signatures for both the new and the previous secret, so you can deploy the new secret before the old one stops being signed.
curl --request POST \
--url https://api.sandbox.paypathiq.com/v1/clients/{clientCode}/webhook-endpoint/rotate-secret \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{
"disabledReason": null,
"secretVersion": 2,
"signingSecret": "whsec_example_issued_once",
"status": "active",
"url": "https://hooks.example.com/paypathiq"
}{
"detail": "Request body is not valid JSON.",
"requestId": "29400000-0000-4000-8000-000000000001",
"status": 400,
"title": "Request body is not valid JSON.",
"type": "https://docs.paypathiq.com/problems/malformed_json"
}{
"detail": "API key is invalid, inactive, revoked, or for another environment.",
"requestId": "29400000-0000-4000-8000-000000000001",
"status": 401,
"title": "API key is invalid, inactive, revoked, or for another environment.",
"type": "https://docs.paypathiq.com/problems/invalid_api_key"
}{
"detail": "The Client code is unknown, the grant lacks the required scope, or the calling address is outside the grant's IP allowlist.",
"requestId": "29400000-0000-4000-8000-000000000001",
"status": 403,
"title": "The Client code is unknown, the grant lacks the required scope, or the calling address is outside the grant's IP allowlist.",
"type": "https://docs.paypathiq.com/problems/client_scope_denied"
}{
"detail": "No webhook endpoint is configured for this Client.",
"requestId": "29400000-0000-4000-8000-000000000001",
"status": 404,
"title": "No webhook endpoint is configured for this Client.",
"type": "https://docs.paypathiq.com/problems/webhook_endpoint_not_found"
}{
"detail": "Request body exceeds the 256 KiB resource limit.",
"requestId": "29400000-0000-4000-8000-000000000001",
"status": 413,
"title": "Request body exceeds the 256 KiB resource limit.",
"type": "https://docs.paypathiq.com/problems/request_too_large"
}{
"detail": "Media type or content encoding is unsupported. Send uncompressed application/json for PUT and POST, and application/merge-patch+json for PATCH.",
"requestId": "29400000-0000-4000-8000-000000000001",
"status": 415,
"title": "Media type or content encoding is unsupported. Send uncompressed application/json for PUT and POST, and application/merge-patch+json for PATCH.",
"type": "https://docs.paypathiq.com/problems/unsupported_media_type"
}{
"detail": "Route parameters or the representation are invalid. Route parameters are checked before authentication. Field errors carry a code such as invalid_format, unrecognized_keys, custom, sensitive_external_id, or sensitive_source_reference.",
"errors": [
{
"code": "invalid_format",
"detail": "Invalid ISO date",
"pointer": "/dueDate"
}
],
"requestId": "29400000-0000-4000-8000-000000000001",
"status": 422,
"title": "Route parameters or the representation are invalid. Route parameters are checked before authentication. Field errors carry a code such as invalid_format, unrecognized_keys, custom, sensitive_external_id, or sensitive_source_reference.",
"type": "https://docs.paypathiq.com/problems/validation_error"
}{
"detail": "Each API key may send 60 requests per minute and run 1 request at a time. In sandbox, the same limits also apply per Client across all of its keys. Every request, including GET, counts.",
"requestId": "29400000-0000-4000-8000-000000000001",
"status": 429,
"title": "Each API key may send 60 requests per minute and run 1 request at a time. In sandbox, the same limits also apply per Client across all of its keys. Every request, including GET, counts.",
"type": "https://docs.paypathiq.com/problems/rate_limit_exceeded"
}{
"detail": "An unexpected error prevented a safe commit, and nothing was saved. Retry with backoff.",
"requestId": "29400000-0000-4000-8000-000000000001",
"status": 503,
"title": "An unexpected error prevented a safe commit, and nothing was saved. Retry with backoff.",
"type": "https://docs.paypathiq.com/problems/projection_unavailable"
}Authorizations
Integration-owned environment-specific API key. Never paste a production key into documentation tools.
Path Parameters
Stable non-sensitive Client code authorized by the Integration grant.
^[A-Za-z0-9_-]{1,128}$Body
One uncompressed resource representation, limited to 256 KiB.
The body is of type object.
Response
The new signing secret, shown once.
Why delivery stopped. Null while the endpoint is active. Configure the endpoint again after fixing the cause.
client_disabled, destination_unsafe, grant_revoked Increases each time the signing secret is rotated.
1 <= x <= 9007199254740991active, disabled Signing secret. Returned only when the endpoint is first configured or the secret is rotated; store it immediately.