Skip to content
Connect an agent

Webhooks

Change an endpoint

Its URL, its events, or whether it is enabled.

PATCH/v1/webhook-endpoints/{id}

TL;DR

QuestionAnswer
What does it do?Change an endpoint.
What does it need?An API key or an OAuth access token.
What does it take?A JSON body with the fields below, and id in the path.
What does it return?Status 200 with a body of type WebhookEndpoint.
In the SDK?flung.webhookEndpoints.update()
What can go wrong?401 Missing, unknown, revoked or expired API key; 404 No such endpoint in this workspace; 422 The request failed validation; 429 Too many requests for this credential; wait for retry-after seconds. Every failure has the same error shape.

What it does

Its URL, its events, or whether it is enabled. The signing secret stays; rotate it separately.

Example

bash
curl -X PATCH 'https://api.flung.dev/v1/webhook-endpoints/whe_aaaaaaaaaaaaaaaaaaaaaaaa' \  --header "Authorization: Bearer $FLUNG_API_KEY" \  --header 'Content-Type: application/json' \  --data '{}'

A successful answer looks like this:

json
{  "id": "whe_aaaaaaaaaaaaaaaaaaaaaaaa",  "url": "string",  "events": [    "string"  ],  "enabled": true,  "createdAt": "2026-11-01T09:00:00.000Z"}

Path parameters

FieldTypeRequiredDescription
idstringyes

Request body

The body has the type an object, with the fields below.

FieldTypeRequiredDescription
urlstringnoat most 2048 characters.
eventsWebhookEvent[]no
enabledbooleannofalse pauses deliveries; events in the meantime are not sent.

Responses

StatusMeaningBody
200The endpoint.WebhookEndpoint
401Missing, unknown, revoked or expired API key.Error
404No such endpoint in this workspace.Error
422The request failed validation.Error
429Too many requests for this credential; wait for retry-after seconds.Error

Response body

A 200 answer has the type WebhookEndpoint.

FieldTypeRequiredDescription
idstringyes
urlstringyes
eventsstring[]yes
enabledbooleanyes
createdAtstringyes

See also

DocWhy
API referenceEvery endpoint
SchemasEvery request and response type
ErrorsEvery error code and what to do about it