Menu

Async & webhooks options

Reference for the async & webhooks options of the shotkit screenshot API, with an example request for each.

Return 202 Accepted immediately and render in the background. The result is POSTed to webhook_url. See Async & webhooks.

async

Return 202 immediately and render in the background. Requires webhook_url. Allows timeout up to 600 seconds.

Type: boolean · Default: false

curl -X POST "https://shotkit.net/api/take" \
  -H "X-Access-Key: YOUR_ACCESS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","async":true,"webhook_url":"https://your.app/hooks/shot"}' \
  --fail-with-body -o shot.jpg

webhook_url

POST the result here when done.

Type: string

curl -X POST "https://shotkit.net/api/take" \
  -H "X-Access-Key: YOUR_ACCESS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","async":true,"webhook_url":"https://your.app/hooks/shot"}' \
  --fail-with-body -o shot.jpg

webhook_sign

Sign webhook body with your secret key. Adds X-Signature: the hex HMAC-SHA256 of the raw body, keyed with your secret key. See verifying webhooks.

Type: boolean · Default: true

curl -X POST "https://shotkit.net/api/take" \
  -H "X-Access-Key: YOUR_ACCESS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","async":true,"webhook_url":"https://your.app/hooks/shot","webhook_sign":false}' \
  --fail-with-body -o shot.jpg

webhook_errors

Also send errors to the webhook.

Type: boolean · Default: false

curl -X POST "https://shotkit.net/api/take" \
  -H "X-Access-Key: YOUR_ACCESS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","async":true,"webhook_url":"https://your.app/hooks/shot","webhook_errors":true}' \
  --fail-with-body -o shot.jpg