API referenceWebhooks

Issue a new signing secret

Issue a new signing secret, shown once — E11-1 AC2. By default the outgoing secret keeps signing for a day, so this can be done before the receiver is updated rather than in lockstep with it. A rotation that has to be coordinated is a rotation that does not happen.

POST
/api/b/v1/webhooks/{endpoint_id}/rotate-secret

Issue a new signing secret, shown once — E11-1 AC2.

By default the outgoing secret keeps signing for a day, so this can be done before the receiver is updated rather than in lockstep with it. A rotation that has to be coordinated is a rotation that does not happen.

Path Parameters

endpoint_id*Endpoint Id
Formatuuid

Query Parameters

overlap_hours?Overlap Hours

How long the outgoing secret keeps signing. Both secrets sign during the window, so deliveries verify whether or not the receiver has been updated yet. Pass 0 to retire the old secret immediately — the right choice if it leaked.

Range0 <= value <= 168
Default24

Response Body

application/json

application/json

curl -X POST "https://example.com/api/b/v1/webhooks/497f6eca-6276-4993-bfeb-53cbbbba6f08/rotate-secret"
{  "endpoint": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "url": "string",    "description": "string",    "event_types": [      "string"    ],    "is_active": true,    "failure_streak": 0,    "last_delivered_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z"  },  "secret": "string",  "signature_header": "X-InversePay-Signature",  "verification_hint": "Sign the raw request body, not a re-serialised copy: two JSON documents can mean the same thing and differ byte for byte."}