For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
  • Core
    • Overview
    • Authorization
    • Base URL
    • Data formats
    • Paging
    • Error codes
    • Permissions
  • Calling
  • Datasphere
  • Logs
  • Messaging
  • Phone Number Management
  • Platform
  • Resource Management
      • POSTCreate SWML webhook
      • DELDelete SWML webhook
      • GETGet SWML webhook
      • GETList SWML webhook Addresses
      • GETList SWML webhooks
      • PATCHUpdate SWML webhook
LogoLogoSignalWire Docs
Log inSign up
Support
Resource ManagementSWML Webhook

Update SWML webhook

|View as Markdown|Open in Claude|
PATCH
https://{your_space_name}.signalwire.com/api/fabric/resources/swml_webhooks/:id
PATCH
/api/fabric/resources/swml_webhooks/:id
$curl -X PATCH https://{your_space_name}.signalwire.com/api/fabric/resources/swml_webhooks/id \
> -H "Content-Type: application/json" \
> -u "<project_id>:<api_token>" \
> -d '{}'
1{
2 "id": "a87db7ed-8ebe-42e4-829f-8ba5a4152f54",
3 "project_id": "99151cf8-9548-4860-ba70-a8de824f3312",
4 "display_name": "Booking Assistant",
5 "type": "swml_webhook",
6 "created_at": "2024-05-06T12:20:00Z",
7 "updated_at": "2024-05-06T12:20:00Z",
8 "swml_webhook": {
9 "id": "a87db7ed-8ebe-42e4-829f-8ba5a4152f54",
10 "name": "My SWML Webhook",
11 "used_for": "calling",
12 "primary_request_url": "https://primary.com",
13 "primary_request_method": "GET",
14 "fallback_request_url": "https://fallback.com",
15 "fallback_request_method": "GET",
16 "status_callback_url": "https://callback.com",
17 "status_callback_method": "POST"
18 }
19}
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).
Was this page helpful?
Previous
Built with

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.

Authentication

AuthorizationBasic
SignalWire Basic Authentication using Project ID and API Token. The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password. Example: ``` Authorization: Basic base64(project_id:token) ```

Path parameters

idstringRequiredformat: "uuid"
Unique ID of a SWML Webhook.

Request

This endpoint expects an object.
namestringOptional
Name of the SWML Webhook.
used_forenumOptionalDefaults to calling

Indicates whether this SWML Webhook handles inbound calls or inbound messages. Determines the payload SignalWire POSTs to primary_request_url.

Allowed values:
primary_request_urlstringOptionalformat: "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; for messaging, see the SWML inbound message webhook.

primary_request_methodenumOptionalDefaults to POST
Primary request method of the SWML Webhook.
Allowed values:
fallback_request_urlstringOptionalformat: "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 or SWML inbound message webhook depending on used_for.

fallback_request_methodenumOptionalDefaults to POST
Fallback request method of the SWML Webhook.
Allowed values:
status_callback_urlstringOptionalformat: "uri"

URL to receive message status callback events for outbound messages sent by this webhook (reply or send_sms). See the Message status callback webhook for the payload your URL will receive.

status_callback_methodenumOptionalDefaults to POST
Status callback method of the SWML Webhook.
Allowed values:

Response

The request has succeeded.
idstringformat: "uuid"
Unique ID of the SWML Webhook.
project_idstringformat: "uuid"
Unique ID of the Project.
display_namestring
Display name of the SWML Webhook Fabric Resource
typeenum
Type of the Fabric Resource
Allowed values:
created_atdatetime
Date and time when the resource was created.
updated_atdatetime
Date and time when the resource was updated.
swml_webhookobject
SWML Webhook data.

Errors

401
Unauthorized Error
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error

SignalWire Basic Authentication using Project ID and API Token.

The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password.

Example:

Authorization: Basic base64(project_id:token)