spicrawlspicrawlDocs
Webhooks

Issue a new signing secret

Generates a new secret, bumps `secret_version` and sets `secret_rotated_at`.

Requires scope: webhooks

POST
/v1/webhooks/{webhookID}/rotate-secret

Generates a new secret, bumps secret_version and sets secret_rotated_at. The new secret is in the response and is not shown again. The previous secret is kept on the server, but deliveries made after this call are signed with the new secret only, and carry kid equal to the new secret_version. Update your receiver before or as you rotate.

Authorization

bearerAuth
AuthorizationBearer <token>

Authorization: Bearer <key>. Read the key from the SPICRAWL_API_KEY environment variable; never hard-code or log it. spicrawl_test_… keys can never spend live credits. Scopes: scrape, batch, sessions (granted by default), browser and read (granted deliberately), and partner (only on a partner account's key). A missing scope is 403 ERR::AUTH::INSUFFICIENT_SCOPE naming the scope.

In: header

Path Parameters

webhookID*string

The endpoint id. An id of another organization answers 404.

Length1 <= length <= 64

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/v1/webhooks/string/rotate-secret"
{  "id": "0190f3a2-7c1e-7d4b-9a2f-3b8e5c6d7e80",  "name": "string",  "url": "http://example.com",  "events": [    "batch.completed"  ],  "format": "json",  "enabled": true,  "disabled_reason": "string",  "consecutive_failures": 0,  "last_success_at": "2019-08-24T14:15:22Z",  "last_failure_at": "2019-08-24T14:15:22Z",  "secret_version": 1,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "secret": "string"}