---
title: "Update SWML webhook"
method: PATCH
path: "/api/fabric/resources/swml_webhooks/{id}"
tags: ["SWML Webhook"]
---

# Update SWML webhook

`PATCH /api/fabric/resources/swml_webhooks/{id}`

Updates an SWML Webhook by ID

#### Permissions

The API token used to authenticate must have the following scope(s) enabled to make a successful request: _Voice_, _Messaging_, _Fax_, or _Video_.

[Learn more about API scopes](/docs/platform/your-signalwire-api-space).

## Path parameters

- `id` string, uuid, required — Universal Unique Identifier.

## Request body

- SWMLWebhookUpdateRequest
  - `name` string — Name of the SWML Webhook.
  - `used_for` 'calling' | 'messaging' — Indicates whether this SWML Webhook handles inbound calls or inbound messages. Determines the payload SignalWire POSTs to `primary_request_url`.
  - `primary_request_url` string, uri — Primary URL SignalWire fetches the SWML document from when the webhook fires. The webhook payload depends on `used_for`: for `calling`, see the [SWML inbound call webhook](/docs/apis/rest/swml-webhook/webhooks/inbound-call-webhook); for `messaging`, see the [SWML inbound message webhook](/docs/apis/rest/swml-webhook/webhooks/inbound-message-webhook).
  - `primary_request_method` 'GET' | 'POST' — The method type to use for the URL
  - `fallback_request_url` string, uri — Fallback URL SignalWire fetches the SWML document from if the primary URL fails. Receives the same payload as `primary_request_url` — see the [SWML inbound call webhook](/docs/apis/rest/swml-webhook/webhooks/inbound-call-webhook) or [SWML inbound message webhook](/docs/apis/rest/swml-webhook/webhooks/inbound-message-webhook) depending on `used_for`.
  - `fallback_request_method` 'GET' | 'POST' — The method type to use for the URL
  - `status_callback_url` string, uri — URL to receive message status callback events for outbound messages sent by this webhook (`reply` or `send_sms`). See the [Message status callback](/docs/apis/rest/messages/webhooks/message-status-callback) webhook for the payload your URL will receive.
  - `status_callback_method` 'GET' | 'POST' — The method type to use for the URL

## Response `200`

The request has succeeded.

- SWMLWebhookResponse
  - `id` string, uuid, required — Universal Unique Identifier.
  - `project_id` string, uuid, required — Universal Unique Identifier.
  - `display_name` string, required — Display name of the SWML Webhook Fabric Resource
  - `type` 'swml_webhook', required — Type of the Fabric Resource
  - `created_at` string, date-time, required — Date and time when the resource was created.
  - `updated_at` string, date-time, required — Date and time when the resource was updated.
  - `swml_webhook` SWMLWebhook, required
    - `id` string, uuid, required — Universal Unique Identifier.
    - `name` string, required — Name of the SWML Webhook.
    - `used_for` 'calling' | 'messaging', required — Indicates whether this SWML Webhook handles inbound calls or inbound messages. Determines the payload SignalWire POSTs to `primary_request_url`.
    - `primary_request_url` string, uri, required — Primary URL SignalWire fetches the SWML document from when the webhook fires. The webhook payload depends on `used_for`: for `calling`, see the [SWML inbound call webhook](/docs/apis/rest/swml-webhook/webhooks/inbound-call-webhook); for `messaging`, see the [SWML inbound message webhook](/docs/apis/rest/swml-webhook/webhooks/inbound-message-webhook).
    - `primary_request_method` 'GET' | 'POST', required — The method type to use for the URL
    - `fallback_request_url` string, uri, nullable, required — Fallback URL SignalWire fetches the SWML document from if the primary URL fails. Receives the same payload as `primary_request_url` — see the [SWML inbound call webhook](/docs/apis/rest/swml-webhook/webhooks/inbound-call-webhook) or [SWML inbound message webhook](/docs/apis/rest/swml-webhook/webhooks/inbound-message-webhook) depending on `used_for`.
    - `fallback_request_method` 'GET' | 'POST', required — The method type to use for the URL
    - `status_callback_url` string, uri, nullable, required — URL to receive message status callback events for outbound messages sent by this webhook (`reply` or `send_sms`). See the [Message status callback](/docs/apis/rest/messages/webhooks/message-status-callback) webhook for the payload your URL will receive.
    - `status_callback_method` 'GET' | 'POST', required — The method type to use for the URL

## Other responses

- `401` — Access is unauthorized.
- `404` — The server cannot find the requested resource.
- `422` — The request contains invalid parameters. See errors for details.
- `500` — An internal server error occurred.

---

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