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"
Media typeapplication/json
object
url
required
null | string
description
required
null | string

Created

Media typeapplication/json
object
webhookId
required
string format: uuid
url
required
string
description
required
null | string
signingSecret
required
string
createdAt
required
string format: date-time

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

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

null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
code

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

string
traceId

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

string

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

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

null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
code

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

string
traceId

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

string

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

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

null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
code

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

string
traceId

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

string