---
title: "Update a webhook"
method: POST
path: "/webhooks/{id}"
tags: ["Webhooks"]
---

# Update a webhook

`POST /webhooks/{id}`

## Request body

- WebhookEntry
  - `name` string, required — A text identifier for the webhook. More than one webhook cannot have the same name.
  - `url` string, required — The location of the webhook. In addition to being a [valid URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Syntax), the url must also start with `http` or `https`.
  - `contactEmailAddress` string — The email address to which emails will be sent if there are problem with invoking the webhook. The value must be a valid email address. If this value is `null`, no email will be sent. It is `null` by default.
  - `triggerScope` 'SENT' | 'RECEIVED', required — Specifies when the webhook will be triggered. Please note the values are case sensitive. If the value is `SENT`, the webhook will be called when a status update becomes available for a message you sent (i.e. a mobile terminating (MT) message). If the value is `RECEIVED`, the webhook will be called when a message is received (i.e. a mobile originating (MO) message). Note that this field forces you to create two separate webhook entries if you want to collect all messages. However, you can use the same `url` for both webhooks if you want.
  - `invokeOption` 'ONE' | 'MANY' — Specifies how to invoke your webhook. If the value is `ONE` the array POSTed to your webhook will contain no more than a single message. Use this option if your webhook logic is unable to handle more than one messages at a time. If the value is `MANY` the array POSTed to your webhook can contain up to 10 messages. This is the recommended option. The number of calls made to your webhook would be less and this will speed up your total processing time. If your webhook fails for an invoke that has more than one message, each message in the array will automatically be retried one at a time. This value defaults to `ONE` - but it is recommended that you set this property to `MANY`.
  - `active` boolean — Indicates whether you want the webhook activated. If the value is `true`, the webhook at the given `url` will be invoked with an empty array (`[]`) as part of the validation process. If the webhook responds with a `2xx` status code, the submission is accepted; if not the webhook is not created (or updated). If the value is `false` the webhook will be inactive, and it will not be invoked when messages are `SENT` or `RECEIVED`. The default value is `true`.
  - `onWebApp` boolean — Indicates whether you want to show this webhook on the Web App. Webhooks shown there can be updated by the user that use the public Web site. The default value is `true`.

## Response `200`

The properties of the updated webhook

- Webhook
  - `id` number
  - `name` string
  - `url` string
  - `contactEmailAddress` string
  - `triggerScope` string
  - `active` boolean
  - `onWebApp` boolean

## Other responses

- `404` — A webhook with the given id does not exit

---

[API](https://skmtc.net/bulksms/apis/bulksms-json-rest-api.md) · [All operations](https://skmtc.net/bulksms/apis/bulksms-json-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bulksms/bulksms-json-rest-api/versions/f923d2ecca43/schema)
