Skip to main content
POST

Create a webhook

Scope:developers:webhooks.write
https://api.holded.com/api/v2/webhooks

Creates a new webhook subscription for the account.

Request body

object
urlstring<uri>required

Callback URL

events[]string[]required

Events to subscribe to

versionstring | nulloptional

API version (defaults to v1)

Enum:v1
descriptionstringoptional

Human-readable description

Request

python
import requests

url = "https://api.holded.com/api/v2/webhooks"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

payload = {
    "url": "https://example.com/webhook",
    "events": [
        "invoice.create",
        "invoice.update"
    ],
    "version": "v1",
    "description": "My webhook"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())

Responses

Response

json
{
  "id": "507f1f77bcf86cd799439011",
  "url": "https://example.com/webhook",
  "events": [
    "invoice.create",
    "invoice.update"
  ],
  "version": "v1",
  "description": "My webhook",
  "enabled": true,
  "created_at": "2026-01-15T10:30:00+00:00",
  "updated_at": "2026-01-15T10:30:00+00:00",
  "secret": "whsec_abc123",
  "disable": {
    "at": "2026-01-15T10:30:00+00:00",
    "reason": "Endpoint returning 5xx errors",
    "by": {
      "id": "507f1f77bcf86cd799439011",
      "type": "user"
    }
  }
}

Success responses

201Webhook createdapplication/json
object
idstring
urlstring<uri>
events[]string[]
versionstring
descriptionstring
enabledboolean
created_atstring<date-time>
updated_atstring<date-time> | null
secretstring
disableobject | null
atstring<date-time>
reasonstring
byobject | null

Error responses

400Bad requestapplication/json
401Invalid or missing API keyapplication/json
403Insufficient permissionsapplication/json
409An event subscription already exists for this account
422The URL is not publicly accessible
429Rate limit exceededapplication/json