Webhooks

/webhooks

Register a new webhook endpoint.

The url must be HTTPS and respond 2xx within 10 seconds. After creation, set the list of CVRs to monitor with PUT /v1/webhooks/{webhook_id}/cvr-filter to start receiving events.

The secret field in the response is only returned here. Store it now — it is used to verify the HMAC signature on every incoming delivery and cannot be retrieved later. A new secret can only be obtained by deleting and re-creating the webhook.

Returns 403 if you have reached your subscription tier's webhook limit.

post/v1/webhooks

Request

  • Base URL: https://api.companydata.dk (the document declares no server; this is the origin it was published from)
  • URL: https://api.companydata.dk/v1/webhooks
  • Auth: HTTP bearer

Request body

namestring required

Human-readable label shown in your account. Not sent to the webhook URL.

urlstring required

HTTPS URL that will receive POST requests when matching events occur. Must respond with a 2xx status code within 10 seconds.

event_typesEventType[]

Event types this webhook should receive. Defaults to all event types. See GET /v1/webhooks/event-types for the catalog.

headersobject

Custom HTTP headers added to every delivery. Useful for routing or additional authentication on your endpoint.

Example request

{
  "name": "Production CRM sync",
  "url": "https://api.example.com/companydata-webhook",
  "headers": {
    "X-My-Service-Token": "abc123"
  }
}

Response

Successful Response

webhook_idstring required

Unique identifier for this webhook.

namestring required

Human-readable label.

urlstring required

HTTPS endpoint that receives deliveries.

activeboolean required

Whether this webhook is currently delivering events.

event_typesEventType[] required

Event types this webhook receives.

headersobject required

Custom headers added to every delivery.

last_success_atstring date-time nullable

Timestamp of the most recent successful (2xx) delivery.

last_failure_atstring date-time nullable

Timestamp of the most recent failed delivery attempt.

consecutive_failuresinteger

Number of consecutive failed deliveries. Reset to 0 on the next 2xx response. Reaching 10 auto-disables the webhook.

disabled_reasonstring nullable

Set when the webhook is auto-disabled. null otherwise.

created_atstring date-time required

When the webhook was created.

secretstring required

HMAC-SHA256 signing secret. Used to verify the X-Companydata-Signature header on every incoming delivery. Store this immediately — it is never returned again.

Changes

No recorded changes to this operation across all 2 revisions of this API.