> ## Documentation Index
> Fetch the complete documentation index at: https://docs.postsyncer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Webhook

> Change an endpoint or turn it on or off

## Update Webhook

Changes an endpoint. Fields you leave out stay as they are. The signing secret does not change.

### Request

**id** `integer` *required*

The ID of the endpoint

**name** `string`

Display name of the endpoint

**url** `string`

A public `https` address

**events** `array`

Event keys the endpoint gets

**account\_ids** `array`

Only send events about these social accounts. Send `null` or an empty array for all accounts.

**workspace\_ids** `array`

Other workspaces whose events it also gets, or `["*"]`. Send `null` to limit it to its own workspace.

**active** `boolean`

Turn the endpoint on or off. Turning it on clears `failing_since` and `disabled_reason`.

```bash theme={null}
curl -X PUT "https://postsyncer.com/api/v1/webhooks/42" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"events": ["post.failed"], "active": true}'
```

### Response

The updated endpoint object.

**id** `integer`

Unique identifier of the endpoint

**name** `string`

Display name of the endpoint

**url** `string`

The https address that receives the events. An address can carry a token, so it is shown in full only when the key's owner may edit the endpoint (`notifications` edit in its workspace, and in every workspace it covers). Otherwise it is cut to the scheme and host, such as `https://example.com/…`.

**url\_masked** `boolean`

`true` when `url` was cut because the key's owner may not edit the endpoint

**secret\_last4** `string`

The last four characters of the signing secret. The API returns the full secret only when you create the endpoint; the app can show it again.

**events** `array`

Event keys the endpoint gets

**account\_ids** `array`

Social account ids the endpoint is limited to, or `null` for all accounts

**workspace\_ids** `array`

Other workspaces whose events it also gets (`["*"]` for every workspace the creator owns), or `null`

**active** `boolean`

Whether the endpoint is on. PostSyncer turns an endpoint off after it has been failing for 3 days.

**failing\_since** `string`

When the endpoint started failing, or `null`

**disabled\_reason** `string`

Why PostSyncer turned the endpoint off, or `null`

**stats\_7d** `object`

Deliveries over the last 7 days: `sent`, `failed` and `daily`, seven entries with the oldest first

**last\_delivery\_at** `string`

When the latest delivery was made, or `null`

Needs the `webhooks:update` permission. Errors are the same as [Create webhook](https://docs.postsyncer.com/api-reference/webhooks/create.md), plus `404` when the endpoint does not exist or is in a workspace you cannot reach.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.