Open Inventory / Docs
EndpointsWebhooksWebhooksId

Update an outgoing webhook endpoint

The API runs on your application instance. Schemas and field names come directly from the OpenAPI specification. Session-authenticated requests require a session on that instance.

PATCH
/webhooks/{id}

Requires webhooks.manage. Submit at least one field. A new target must be supplied in full because stored targets are only returned in redacted form.

Authorization

adminSession
cookieauthjs.session-token<token>

Authenticated Auth.js browser session cookie; each operation declares its required permission. Not restricted to administrators. HTTPS deployments use the secure-prefixed cookie variant.

Path Parameters

id*string
Formatuuid

Header Parameters

X-Organization-ID?string

Organization membership selected for this request. User-bound credentials may select any active membership; standalone tokens may only repeat their pinned organization ID.

Formatuuid

Request Body

application/json
  1. body
Properties1 <= properties
name?string
Length1 <= length <= 120
url?string

Complete replacement HTTPS target; the current stored target cannot be recovered from its redacted response form.

Formaturi
Length1 <= length <= 2048
eventTypes?array<>
Items1 <= items <= 5
enabled?boolean

Response Body

Webhook endpoint updated

application/json
  1. response
webhook*
Example Request
curl -X PATCH 'https://inventory.example.com/api/v1/webhooks/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "webhook": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "name": "string",    "target": "https://hooks.example.com/…",    "eventTypes": [      "inventory.resource.created"    ],    "enabled": true,    "failureCount": 0,    "lastSuccessAt": "2019-08-24T14:15:22Z",    "lastFailureAt": "2019-08-24T14:15:22Z",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }}