---
title: "Update a webhook endpoint"
method: POST
path: "/v1/webhook_endpoints/{id}"
tags: ["Webhook endpoints"]
---

# Update a webhook endpoint

`POST /v1/webhook_endpoints/{id}`

## Request

- Base URL: `https://api.affiliaterail.com`
- URL: `https://api.affiliaterail.com/v1/webhook_endpoints/{id}`
- Auth: HTTP bearer

**Scope:** `webhooks:write` (or `write`)

## Path parameters

- `id` string, required: Prefixed id (`whe_…`)

## Request body

- WebhookEndpointUpdate
  - `url` string, uri
  - `event_types` string[]
  - `enabled` boolean

## Response `200`

The updated endpoint

- WebhookEndpoint
  - `id` string, required: Prefixed id (`whe_…`)
  - `object` 'webhook_endpoint', required
  - `program_id` string, required: Prefixed id (`prg_…`)
  - `partner_id` string, nullable, required: Prefixed id (`part_…`)
  - `url` string, required
  - `event_types` string[], required
  - `enabled` boolean, required
  - `secret` string: Shown once, on creation
  - `created_at` string, date-time, required: ISO-8601, UTC
  - `updated_at` string, date-time, required: ISO-8601, UTC

## Other responses

- `400`: Invalid request
- `401`: Missing or unknown API key
- `403`: Key lacks the required scope
- `404`: No such object in your organization
- `422`: The request was understood and refused
- `429`: Rate limited: see Retry-After

---

[API](https://skmtc.dev/affiliaterail/apis/affiliaterail-api.md) · [All operations](https://skmtc.dev/affiliaterail/apis/affiliaterail-api/llms.txt) · [OpenAPI document](https://skmtc.dev/affiliaterail/apis/affiliaterail-api/revisions/ea41f345c092?raw)
