Webhooks

Create a webhook

Register a new webhook subscription to receive event notifications.

post/v1/webhooks

Request

  • Base URL: https://api.frihet.io
  • URL: https://api.frihet.io/v1/webhooks
  • Auth: API key in header X-API-Key

Request body

namestring required

Webhook name

urlstring uri required

Endpoint URL to receive webhook events

secretstring

HMAC secret for verifying webhook signatures. Write-only: echoed once in the create response, never returned by read endpoints (see hasSecret).

eventsstring[] required

List of event types to subscribe to

status'active' | 'inactive'
metadataobject

Arbitrary metadata to attach to the webhook

Example request

{
  "name": "Invoice notifications",
  "url": "https://example.com/webhooks/frihet",
  "events": [
    "invoice.created",
    "invoice.paid",
    "expense.created"
  ]
}

Response

Webhook created

Example response

{
  "data": {
    "name": "Invoice notifications",
    "url": "https://example.com/webhooks/frihet",
    "events": [
      "invoice.created",
      "invoice.paid",
      "expense.created"
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.