Webhooks

Update a webhook

Change the URL, the headers, the event types, or several at once. Only the member who created the webhook can change it. The secret stays the same. Pending deliveries go out with the new URL and headers.

PATCH

/api/v1/webhooks/{webhookId}

Path parameters

webhookId

required

string · uuid

Webhook id

Request bodyrequired

urloptional

string · uri

The new URL. A different URL removes all saved headers first.

headersoptional

object

Changes only the headers named here: a value sets or replaces that header, null removes it. Headers not named stay, except when url changes: then only the headers sent here are kept.

eventTypesoptional

string | string[]

The new event types: "all" or a list. Pending deliveries of types no longer in the list are dropped; added types only get events from now on.

enabledoptional

boolean

Turns on a webhook that was turned off. Events from while it was off are not sent. Any other change turns it on too.

Response

200Webhook updated.

webhook

object

id

string · uuid

url

string

headerNames

string[]

Names of the extra headers sent with every request.

eventTypes

string | string[]

The [event types](https://needle.app/docs/webhooks#event-types) this webhook gets. "all" means every type, also types added later. A list stays as it is: types added later are not sent until you add them.

lastAttemptAt

string · date-time | null

lastError

string | null

Why the last failed delivery failed, for example 401. Null once a delivery succeeds.

disabledAt

string · date-time | null

When the webhook was turned off because your URL gave no 2xx answer for 3 days. Nothing is sent while it is off; turn it on with enabled: true. Null while it is on.

createdAt

string · date-time

createdBy

string · uuid

The member who created the webhook. It receives the events they can see, and is deleted when they leave the workspace.

requestId

string · uuid

Id of this request, for support and troubleshooting

Errors

  • 400: Bad request
  • 401: Unauthorized: missing or invalid API key
  • 403: Forbidden
  • 404: Not found
  • 422: Invalid request payload

Search docs

Search documentation, API reference, and MCP tools

We use cookies to enhance your experience on Needle and keep your data secure. Privacy Policy