Skip to content
API console (try a request with your own key)Get early access

Add a webhook endpoint

POST
/v1/webhooks
#!/usr/bin/env bash
set -euo pipefail
API=https://api.speccapture.com
AUTH="Authorization: Bearer $SPECCAPTURE_API_KEY"
webhook=$(curl -sS --fail-with-body "$API/v1/webhooks" \
-H "$AUTH" \
-H "Content-Type: application/json" \
-d '{"url":"https://erp.example.com/hooks/speccapture","description":"ERP import"}') || { echo "$webhook" >&2; exit 1; }
jq -r '"Endpoint \(.webhookId)"' <<<"$webhook"
jq -r '"Signing secret, shown this once: \(.signingSecret)"' <<<"$webhook"

Body: url, an absolute https URL on the public internet, and optionally description, up to 200 characters to tell endpoints apart. Answers 201 with the endpoint and its signingSecret - shown this once, so store it with the code that receives events: every delivery is signed with it, following the Standard Webhooks specification. From then on the endpoint receives every event: extraction.completed and extraction.failed when a job finishes, extraction.reviewed when a person has checked every value of a sheet that waited for one, extraction.updated when a finished job’s values were recorded again - its template was changed after it was read, or fields of the workspace’s own that could not be read with a sheet were read again - and export.ready when a large export is ready - each signed and retried the same way, so read type first. A URL that is not https, or points at a private network, is 400 invalid_webhook_url; a workspace has at most 10 endpoints (409 too_many_webhooks). A live key acting as the workspace’s owner or an admin.

Media typeapplication/json

The body of POST /v1/webhooks: where to send events, and a note to tell the endpoint apart.

object
url
required

Where to deliver events: an absolute https URL on the public internet.

null | string
description

A note to tell endpoints apart (“ERP import”); up to 200 characters. It may be left out.

null | string

Examples

Exampleendpoint

An endpoint for an ERP import, named to tell it apart

{
"url": "https://erp.example.com/hooks/speccapture",
"description": "ERP import"
}

Created

Media typeapplication/json

A new webhook endpoint: the answer of POST /v1/webhooks. The only time the signing secret is shown; store it with the code that receives the events.

object
webhookId
required

The endpoint’s id: what deleting it, turning it back on and reading its deliveries name.

string format: uuid
url
required

Where events are delivered.

string
description
required

The note that tells it apart; null when none was given.

null | string
signingSecret
required

The secret every delivery to this endpoint is signed with (whsec_ and 44 more characters), following the Standard Webhooks specification: check each delivery’s webhook-signature header with it. Shown this once.

string
createdAt
required

When it was added.

string format: date-time

Examples

Exampleadded

The new endpoint, with its signing secret shown this once

{
"webhookId": "0f8fad5b-d9cb-469f-a165-70867728950e",
"url": "https://erp.example.com/hooks/speccapture",
"description": "ERP import",
"signingSecret": "whsec_2m+yUZeZ0CcLnF63f3UvXg2Wk93q9rw6dNPiyq8AMzc=",
"createdAt": "2026-10-01T08:12:40+00:00"
}

Bad Request: a problem with a stable code. See Errors for every code and what to do about it.

Media typeapplication/problem+json

Every error: a problem with a stable code. https://speccapture.com/docs/api/errors lists every code.

object
type
required

A link to the code’s entry in the docs.

string
title
required

What went wrong, in a few words for a person: the same for every problem with this code.

string
status
required

The HTTP status of the answer.

integer format: int32
detail

What went wrong with this request and what to do about it, in a sentence or two for a person. Present on nearly every problem.

string
instance
required

The path of the request that was refused.

string
code
required

What went wrong, as a stable code to branch on: a published code never changes meaning.

string
traceId
required

This request’s trace: quote it when asking for help.

string

Examples

Exampleinvalid_webhook_url

The webhook URL cannot be used.

{
"type": "https://speccapture.com/docs/api/errors#invalid_webhook_url",
"title": "The webhook URL cannot be used.",
"status": 400,
"detail": "Webhooks are delivered over https only.",
"instance": "/v1/webhooks",
"code": "invalid_webhook_url",
"traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
}

Forbidden: a problem with a stable code. See Errors for every code and what to do about it.

Media typeapplication/problem+json

Every error: a problem with a stable code. https://speccapture.com/docs/api/errors lists every code.

object
type
required

A link to the code’s entry in the docs.

string
title
required

What went wrong, in a few words for a person: the same for every problem with this code.

string
status
required

The HTTP status of the answer.

integer format: int32
detail

What went wrong with this request and what to do about it, in a sentence or two for a person. Present on nearly every problem.

string
instance
required

The path of the request that was refused.

string
code
required

What went wrong, as a stable code to branch on: a published code never changes meaning.

string
traceId
required

This request’s trace: quote it when asking for help.

string

Examples

Examplerole_not_allowed

This key's role does not allow this.

{
"type": "https://speccapture.com/docs/api/errors#role_not_allowed",
"title": "This key's role does not allow this.",
"status": 403,
"detail": "This key acts with the member role of the person who created it, which cannot do this. Use a key created by the workspace's owner or an admin.",
"instance": "/v1/webhooks",
"code": "role_not_allowed",
"traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
"keyRole": "member"
}

Conflict: a problem with a stable code. See Errors for every code and what to do about it.

Media typeapplication/problem+json

Every error: a problem with a stable code. https://speccapture.com/docs/api/errors lists every code.

object
type
required

A link to the code’s entry in the docs.

string
title
required

What went wrong, in a few words for a person: the same for every problem with this code.

string
status
required

The HTTP status of the answer.

integer format: int32
detail

What went wrong with this request and what to do about it, in a sentence or two for a person. Present on nearly every problem.

string
instance
required

The path of the request that was refused.

string
code
required

What went wrong, as a stable code to branch on: a published code never changes meaning.

string
traceId
required

This request’s trace: quote it when asking for help.

string

Examples

Exampletoo_many_webhooks

The workspace has as many webhooks as it may.

{
"type": "https://speccapture.com/docs/api/errors#too_many_webhooks",
"title": "The workspace has as many webhooks as it may.",
"status": 409,
"detail": "A workspace can have up to 10 webhook endpoints. Delete one you no longer use first.",
"instance": "/v1/webhooks",
"code": "too_many_webhooks",
"traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
}