---
title: "Update an account webhook endpoint"
method: PATCH
path: "/accounts/{account}/webhooks/{webhook}"
tags: ["Account"]
---

# Update an account webhook endpoint

`PATCH /accounts/{account}/webhooks/{webhook}`

## Request

- Base URL: `https://api.factuarea.com/v1`
- URL: `https://api.factuarea.com/v1/accounts/{account}/webhooks/{webhook}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Partially update an account webhook endpoint: `url`, `enabled_events`, `account_relationship`, `description`, `api_version` or `status`.
- Omitted fields keep their value; `description: null` clears it; `status` toggles `active`/`disabled`.
- Requires a live key; 404 `webhook_endpoint_not_found`.

## Path parameters

- `account` string, uuid, required
- `webhook` string, uuid, required

## Headers

- `Idempotency-Key` string
- `Factuarea-Version` string, date

## Request body

- UpdateAccountWebhookV1Request: Partial update of an account webhook endpoint: only the fields present are applied and the omitted ones keep their value. `url`, `enabled_events` (at least one), `account_relationship` and `api_version` cannot be set to `null`; `description: null` clears the description. `status` (`active` or `disabled`) pauses or re-enables the endpoint. The environment is not editable, and the signing secret has its own rotation operation.
  - `url` string: New HTTPS URL that receives the signed events (up to 2048 characters). Cannot be `null`.
  - `enabled_events` string[]: Complete new list of event types (at least one): the company events of the public catalog and the `account.*` events (`AccountEventType`). It replaces the current list and cannot be `null`.
  - `account_relationship` 'own' | 'managed' | 'all': New relationship filter: `own`, `managed` or `all`. Cannot be `null`.
  - `description` string, nullable: New free text (up to 255 characters); `null` clears it.
  - `api_version` string: New payload version (`YYYY-MM-DD`) to pin the endpoint to. Cannot be `null`; an unsupported one returns 422 with its own subcode.
  - `status` 'active' | 'disabled': Optional endpoint status: `active` re-enables the endpoint and `disabled` pauses it; omit it to leave the status unchanged. Cannot be `null`. Re-enabling an endpoint that the engine disabled because its creator lost the capability makes the caller its new creator.

## Response `200`

- object
  - `data` AccountWebhook, required: A webhook endpoint of your ACCOUNT: where the events of the tax IDs your account holds or manages, and the account-level events, are delivered, which ones, with which relationship filter, in which environment and in which state. The signing secret is never part of this representation.
    - `id` string, uuid, required: Opaque identifier (UUID v7) of the account webhook endpoint. It is the `{webhook}` of the endpoint routes.
    - `object` 'account_webhook', required: Always `account_webhook`.
    - `environment` 'live' | 'test', required: Environment of the endpoint: always the one of the credential that created it, and it never changes. A `live` credential never sees a `test` endpoint and the other way round. A `test` endpoint never reaches the network: its deliveries are recorded with their envelope and stay `pending`.
    - `url` string, uri, required: HTTPS callback URL that receives the signed events.
    - `enabled_events` string[], required: Event types this endpoint subscribes to: the company events of the public catalog (`GET /v1/event-catalog`) and the account-level events of `AccountEventType`. Duplicates are collapsed.
    - `account_relationship` 'own' | 'managed' | 'all', required: Whose tax IDs the endpoint hears about: `own` (the tax IDs of your account), `managed` (the accounts your account manages) or `all` (the default).
    - `status` 'active' | 'disabled', required: `active` while the endpoint receives events; `disabled` once it stopped receiving them (the reason is in `disabled_reason`).
    - `disabled_reason` 'creator_lost_capability' | 'null', nullable, required: Why the endpoint was disabled, or `null` while it is active. `creator_lost_capability`: the person or key that created it stopped being an owner or admin of the account, or no longer reaches every tax ID of the account.
    - `api_version` string, nullable, required: Payload version (date-based, `YYYY-MM-DD`) pinned for this endpoint. A new endpoint is pinned to the latest version when created; `null` makes it follow the version in force on every emission.
    - `description` string, nullable, required: Free text you give the endpoint, or `null`.
    - `created_at` string, date-time, required: When the endpoint was created (ISO 8601).
    - `updated_at` string, date-time, required: When the endpoint was last changed (ISO 8601).

## Other responses

- `400`: `parameter_unknown` with `subcode` `retired_active_profile_header`: the retired `X-Active-Profile` header was sent; the company goes in the path. `parameter_invalid_format` on `Factuarea-Version`: the header is not a `YYYY-MM-DD` date. `unsupported_api_version`: the `Factuarea-Version` date is not a supported version.
- `401`: Missing or invalid API key.
- `403`: The request is authenticated but not allowed: the API key lacks the required scope (`insufficient_scope`), the plan does not include the public API or this feature (`addon_not_active`, `feature_not_available_in_plan`), or the module is not available with a test key (`module_not_available_in_sandbox`).
- `404`: The requested resource does not exist or belongs to another company.
- `422`: Validation failed — e.g. the API key plan limit was reached, or an invoice language outside the allowed catalog (`es`, `en`, `ca`). The `error.param` field identifies which input is invalid, if any. `idempotency_key_reused`: the `Idempotency-Key` was already used with a different body; send a new key or the same body. `invalid_param_format` on `Idempotency-Key`: the key must be 1 to 255 printable ASCII characters.
- `429`: Rate limit exceeded. Retry after the duration in `Retry-After`.
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/factuarea/apis/factuarea-public-api.md) · [All operations](https://skmtc.dev/factuarea/apis/factuarea-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/factuarea/apis/factuarea-public-api/revisions/718e77934422?raw)
