---
title: "Edit a specified Webhook"
method: POST
path: "/webhook/edit"
tags: ["WEBHOOKS"]
---

# Edit a specified Webhook

`POST /webhook/edit`

Make changes to a specific webhook using its unique ID.

## Request body

- object
  - `id` integer, required — The ID of an existing webhook you want to edit
  - `url` string — The URL of the webhook.
  - `events` string[] — A list of events the webhook will receive, from this list [<code>delivered</code>,<code>unsubscribe</code>,<code>spam</code>,<code>bounce</code>,<code>processed</code>,<code>reject</code>,<code>click</code>,<code>open</code>].
  - `sms_events` string[] — A list of SMS events the webhook will receive, from this list [<code>delivered</code>,<code>failed</code>,<code>rejected</code>,<code>sending</code>,<code>submitted</code>].
  - `headers` string[] — Custom headers you would specifically like sent in the event data. The headers must already exist in the emails. Subject and Message-id headers are sent by default.
  - `usernames` string[] — Usernames to be included in this webhook. All usernames will be included if none are specified.
  - `output_format` string — The format of the webhook data. Either <code>form</code> or <code>json</code>
  - `subaccount_id` string — If you wish to make this API call on behalf of a subaccount then include its unique ID here.
  - `auth_header_type` string — The type of authentiction header, Either <code>bearer</code> or <code>basic</code> or empty for no authentication.
  - `auth_header_value` string — The value of authentiction header, Either <code>base64(user:pass)</code> or <code>a custom token</code>.

## Response `200`

Webhook updated

- object
  - `data` object, required
    - `url` string — The URL of the webhook.
    - `id` integer — The ID of the webhook.
    - `events` string[] — A list of events the webhook will receive, from this list [<code>delivered</code>,<code>unsubscribe</code>,<code>spam</code>,<code>bounce</code>,<code>processed</code>,<code>reject</code>,<code>click</code>,<code>open</code>].
    - `sms_events` string[] — A list of SMS events the webhook will receive, from this list [<code>delivered</code>,<code>failed</code>,<code>rejected</code>,<code>sending</code>,<code>submitted</code>].
    - `headers` string[] — Custom headers you would specifically like sent in the event data. The headers must already exist in the emails. Subject and Message-id headers are sent by default.
    - `usernames` string[] — Usernames to be included in this webhook. All usernames will be included if none are specified.
    - `output_format` string — The format of the webhook data. Either <code>form</code> or <code>json</code>.
    - `auth_header_type` string — The type of authentiction header, Either <code>bearer</code> or <code>basic</code>.
    - `auth_header_value` string — The value of authentiction header, Either <code>base64(user:pass)</code> or <code>a custom token</code>.
  - `request_id` string, required

## Other responses

- `400` — 400

---

[API](https://skmtc.net/smtp2go/apis/smtp2go-api-v3-0-4.md) · [All operations](https://skmtc.net/smtp2go/apis/smtp2go-api-v3-0-4/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/smtp2go/smtp2go-api-v3-0-4/versions/1ba6b25eebb9/schema)
