Skip to main content
PATCH
/
v1
/
webhook_endpoints
/
{id}
Error
A valid request URL is required to generate request examples
{
  "object": "webhook_endpoint",
  "id": "obj_2P9K3sample",
  "url": "https://example.com/webhooks/invoice",
  "enabled_events": [
    "string"
  ],
  "enabled": true,
  "connect": true,
  "livemode": false,
  "metadata": {},
  "created_at": "2026-07-10T18:25:43Z",
  "updated_at": "2026-07-10T18:25:43Z"
}
{
"type": "https://errors.invoiceapi.mx/auth_unauthorized",
"title": "Authentication required",
"status": 401,
"code": "auth.unauthorized",
"detail": "Missing or invalid API key.",
"remediation": "Send `Authorization: Bearer sk_test_...` (or sk_live_...) with a valid API key.",
"doc_url": "/docs/errors#auth-unauthorized",
"request_id": "req_2P9K3sample"
}
{
"type": "https://errors.invoiceapi.mx/resource_not_found",
"title": "Resource not found",
"status": 404,
"code": "resource.not_found",
"detail": "No such id in this org + mode.",
"remediation": "Verify the id and that the key mode (test/live) matches the id.",
"doc_url": "/docs/errors#resource-not_found",
"request_id": "req_2P9K3sample"
}
{
"type": "https://errors.invoiceapi.mx/request_validation_failed",
"title": "Request validation failed",
"status": 422,
"code": "request.validation_failed",
"detail": "One or more fields did not satisfy the schema.",
"remediation": "Fix the fields listed in `errors` and resubmit.",
"doc_url": "/docs/errors#request-validation_failed",
"request_id": "req_2P9K3sample"
}
{
"type": "https://errors.invoiceapi.mx/rate_limit_exceeded",
"title": "Rate limit exceeded",
"status": 429,
"code": "rate_limit.exceeded",
"detail": "Too many requests for this key + request class (reads and writes are limited separately).",
"remediation": "Back off and retry after the number of seconds in the Retry-After header; batch work or lower your request rate.",
"doc_url": "/docs/errors#rate_limit-exceeded",
"request_id": "req_2P9K3sample"
}
{
"type": "https://errors.invoiceapi.mx/internal_error",
"title": "Internal server error",
"status": 500,
"code": "internal.error",
"detail": "An unexpected error occurred.",
"remediation": "Retry later; contact support with the request_id if it persists.",
"doc_url": "/docs/errors#internal-error",
"request_id": "req_2P9K3sample"
}

Authorizations

Authorization
string
header
required

API key: Authorization: Bearer sk_test_... or sk_live_....

Headers

Invoice-Version
string

Pin a dated API release (Stripe-style). Omit to use the current version. An unknown value returns 400 request.invalid_version. Echoed back on every response.

Example:

"2026-07-10"

Invoice-Account
string

Connect: act on behalf of one of your connected accounts (its acct_…/org_… id). Omit to act as your own organization. Not honored on /v1/api_keys.

Example:

"org_2P9connectedacct"

Path Parameters

id
string
required

Webhook endpoint id, e.g. "we_2P9K3sample".

Body

application/json
url
string<uri>

New HTTPS delivery URL.

enabled_events
string[]

Replace the subscribed event types ("", "invoice.", or exact types).

Minimum array length: 1
disabled
boolean

true pauses delivery to this endpoint; false re-enables it.

metadata
object

Merge patch: keys with an empty-string value are removed; others are upserted.

Response

Default Response

object
enum<string>
required

Always "webhook_endpoint".

Available options:
webhook_endpoint
id
string
required

Webhook endpoint id, e.g. "we_2P9K3sample".

url
string
required

HTTPS URL events are delivered to.

enabled_events
string[]
required

Subscribed event types ("*", namespace wildcards, or exact types).

enabled
boolean
required

False when the endpoint is paused (disabled).

connect
boolean
required

True when this endpoint also receives connected-account events.

livemode
boolean
required

True if created with a live-mode key.

metadata
object
required

Integrator-owned key-value map echoed back.

created_at
string
required

Creation timestamp, ISO-8601 UTC.

updated_at
string
required

Last-update timestamp, ISO-8601 UTC.