> This page is for Server SDKs.

> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# update

> Partially update a cXML webhook resource.

Partially update a cXML webhook resource. Uses PATCH for partial.

### Schema

```yaml
openapi: 3.1.0
info:
  title: API
  version: 1.0.0
paths:
  /api/fabric/resources/cxml_webhooks/{id}:
    patch:
      operationId: subpackageCXmlWebhook_update_cxml_webhook
      summary: Update cXML webhook
      description: >-
        Changes where and how a cXML Webhook requests instructions from your
        server. Use it when the server-backed handler's routing changes; use
        [Update cXML Script](/docs/apis/rest/cxml-scripts/update-cxml-script)
        for cXML stored in SignalWire.


        #### 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).
      tags:
        - subpackage_cXmlWebhook
      parameters:
        - name: id
          in: path
          description: Unique ID of a CXML Webhook.
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CXMLWebhookResponse'
        '401':
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode401'
        '404':
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode404'
        '422':
          description: The request contains invalid parameters. See errors for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CXMLWebhookUpdateStatusCode422'
        '500':
          description: An internal server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode500'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CXMLWebhookUpdateRequest'
tags:
  - name: subpackage_cXmlWebhook
servers:
  - url: https://%7BYour_Space_Name%7D.signalwire.com
    description: SignalWire API
components:
  schemas:
    uuid:
      type: string
      format: uuid
      description: Universal Unique Identifier.
      title: uuid
    UsedForType:
      type: string
      enum:
        - calling
        - messaging
      description: Sets the handler to handle incoming `calls` or `messages`.
      title: UsedForType
    RequestUrlMethodType:
      type: string
      enum:
        - GET
        - POST
      description: The method type to use for the URL
      title: RequestUrlMethodType
    CXMLWebhookUpdateRequest:
      type: object
      properties:
        name:
          type: string
          description: Name of the CXML Webhook.
        used_for:
          $ref: '#/components/schemas/UsedForType'
          default: calling
          description: Used for of the CXML Webhook.
        primary_request_url:
          type: string
          format: uri
          description: Primary request url of the CXML Webhook.
        primary_request_method:
          $ref: '#/components/schemas/RequestUrlMethodType'
          default: POST
          description: Primary request method of the CXML Webhook.
        fallback_request_url:
          type: string
          format: uri
          description: Fallback request url of the CXML Webhook.
        fallback_request_method:
          $ref: '#/components/schemas/RequestUrlMethodType'
          default: POST
          description: Fallback request method of the CXML Webhook.
        status_callback_url:
          type: string
          format: uri
          description: Status callback url of the CXML Webhook.
        status_callback_method:
          $ref: '#/components/schemas/RequestUrlMethodType'
          default: POST
          description: Status callback method of the CXML Webhook.
      title: CXMLWebhookUpdateRequest
    CxmlWebhookResponseType:
      type: string
      enum:
        - cxml_webhook
      description: Type of the Fabric Resource
      title: CxmlWebhookResponseType
    CXMLWebhook:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/uuid'
          description: Unique ID of the CXML Webhook.
        name:
          type: string
          description: Name of the CXML Webhook.
        used_for:
          $ref: '#/components/schemas/UsedForType'
          description: Used for of the CXML Webhook.
        primary_request_url:
          type: string
          format: uri
          description: Primary request url of the CXML Webhook.
        primary_request_method:
          $ref: '#/components/schemas/RequestUrlMethodType'
          description: Primary request method of the CXML Webhook.
        fallback_request_url:
          type:
            - string
            - 'null'
          format: uri
          description: Fallback request url of the CXML Webhook.
        fallback_request_method:
          $ref: '#/components/schemas/RequestUrlMethodType'
          description: Fallback request method of the CXML Webhook.
        status_callback_url:
          type:
            - string
            - 'null'
          format: uri
          description: Status callback url of the CXML Webhook.
        status_callback_method:
          $ref: '#/components/schemas/RequestUrlMethodType'
          description: Status callback method of the CXML Webhook.
      required:
        - id
        - name
        - used_for
        - primary_request_url
        - primary_request_method
        - fallback_request_url
        - fallback_request_method
        - status_callback_url
        - status_callback_method
      title: CXMLWebhook
    CXMLWebhookResponse:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/uuid'
          description: Unique ID of the CXMLWebhook.
        project_id:
          $ref: '#/components/schemas/uuid'
          description: Unique ID of the Project.
        display_name:
          type: string
          description: Display name of the CXMLWebhook Fabric Resource
        type:
          $ref: '#/components/schemas/CxmlWebhookResponseType'
          description: Type of the Fabric Resource
        created_at:
          type: string
          format: date-time
          description: Date and time when the resource was created.
        updated_at:
          type: string
          format: date-time
          description: Date and time when the resource was updated.
        cxml_webhook:
          $ref: '#/components/schemas/CXMLWebhook'
          description: CXMLWebhook data.
      required:
        - id
        - project_id
        - display_name
        - type
        - created_at
        - updated_at
        - cxml_webhook
      title: CXMLWebhookResponse
    TypesStatusCodesStatusCode401Error:
      type: string
      enum:
        - Unauthorized
      title: TypesStatusCodesStatusCode401Error
    Types.StatusCodes.StatusCode401:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/TypesStatusCodesStatusCode401Error'
      required:
        - error
      description: Access is unauthorized.
      title: Types.StatusCodes.StatusCode401
    TypesStatusCodesStatusCode404Error:
      type: string
      enum:
        - Not Found
      title: TypesStatusCodesStatusCode404Error
    Types.StatusCodes.StatusCode404:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/TypesStatusCodesStatusCode404Error'
      required:
        - error
      description: The server cannot find the requested resource.
      title: Types.StatusCodes.StatusCode404
    Types.StatusCodes.RestApiErrorItem:
      type: object
      properties:
        type:
          type: string
          description: The category of error.
        code:
          type: string
          description: A specific error code.
        message:
          type: string
          description: A description of what caused the error.
        attribute:
          type:
            - string
            - 'null'
          description: The request parameter that caused the error, if applicable.
        url:
          type: string
          description: A link to documentation about this error.
      required:
        - type
        - code
        - message
        - url
      description: Details about a specific error.
      title: Types.StatusCodes.RestApiErrorItem
    CXMLWebhookUpdateStatusCode422:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Types.StatusCodes.RestApiErrorItem'
          description: List of validation errors.
      required:
        - errors
      description: The request contains invalid parameters. See errors for details.
      title: CXMLWebhookUpdateStatusCode422
    TypesStatusCodesStatusCode500Error:
      type: string
      enum:
        - Internal Server Error
      title: TypesStatusCodesStatusCode500Error
    Types.StatusCodes.StatusCode500:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/TypesStatusCodesStatusCode500Error'
      required:
        - error
      description: An internal server error occurred.
      title: Types.StatusCodes.StatusCode500

```

## **Response Example**

### Response (200)

```json
{
  "id": "a87db7ed-8ebe-42e4-829f-8ba5a4152f54",
  "project_id": "99151cf8-9548-4860-ba70-a8de824f3312",
  "display_name": "Booking Assistant",
  "type": "cxml_webhook",
  "created_at": "2024-05-06T12:20:00Z",
  "updated_at": "2024-05-06T12:20:00Z",
  "cxml_webhook": {
    "id": "a87db7ed-8ebe-42e4-829f-8ba5a4152f54",
    "name": "My CXML Webhook",
    "used_for": "calling",
    "primary_request_url": "https://primary.com",
    "primary_request_method": "GET",
    "fallback_request_url": "https://fallback.com",
    "fallback_request_method": "GET",
    "status_callback_url": "https://callback.com",
    "status_callback_method": "POST"
  }
}
```

## **Example**

```python {9}
from signalwire.rest import RestClient

client = RestClient(
    project="your-project-id",
    token="your-api-token",
    host="your-space.signalwire.com",
)

updated = client.fabric.cxml_webhooks.update("webhook-id", name="updated-name")
print(f"Updated: {updated['display_name']}")
```