> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# update

> Replace a Relay application resource.

Replace a Relay application resource. Uses PUT for full replacement.

### Schema

```yaml
openapi: 3.1.0
info:
  title: API
  version: 1.0.0
paths:
  /api/fabric/resources/relay_applications/{id}:
    put:
      operationId: update_relay_application
      summary: Update Relay application
      description: >-
        Updates a Relay Application 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).
      tags:
        - subpackage_relayApplication
      parameters:
        - name: id
          in: path
          description: Unique ID of a Relay Application.
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RelayApplicationResponse'
        '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/RelayApplicationUpdateStatusCode422'
        '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/RelayApplicationUpdateRequest'
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
    RelayApplicationUpdateRequest:
      type: object
      properties:
        name:
          type: string
          description: Name of the Relay Application
        topic:
          type: string
          description: Topic of the Relay Application
        call_status_callback_url:
          type: string
          description: Call status callback URL
      title: RelayApplicationUpdateRequest
    RelayApplicationResponseType:
      type: string
      enum:
        - relay_application
      description: Type of the Fabric Resource
      title: RelayApplicationResponseType
    RelayApplication:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/uuid'
          description: Unique ID of a Relay Application.
        name:
          type: string
          description: Name of the Relay Application
        topic:
          type: string
          description: Topic of the Relay Application
        call_status_callback_url:
          type:
            - string
            - 'null'
          format: uri
          description: Call status callback URL
      required:
        - id
        - name
        - topic
        - call_status_callback_url
      title: RelayApplication
    RelayApplicationResponse:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/uuid'
          description: Unique ID of the Relay Application.
        project_id:
          $ref: '#/components/schemas/uuid'
          description: Unique ID of the Project.
        display_name:
          type: string
          description: Display name of the Relay Application Fabric Resource
        type:
          $ref: '#/components/schemas/RelayApplicationResponseType'
          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.
        relay_application:
          $ref: '#/components/schemas/RelayApplication'
          description: Relay Application data.
      required:
        - id
        - project_id
        - display_name
        - type
        - created_at
        - updated_at
        - relay_application
      title: RelayApplicationResponse
    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
    RelayApplicationUpdateStatusCode422:
      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: RelayApplicationUpdateStatusCode422
    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": "993ed018-9e79-4e50-b97b-984bd5534095",
  "project_id": "1313fe58-5e14-4c11-bbe7-6fdfa11fe780",
  "display_name": "Customer Service Bot",
  "type": "relay_application",
  "created_at": "2024-05-06T12:20:00Z",
  "updated_at": "2024-05-06T12:20:00Z",
  "relay_application": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "name": "Booking Assistant",
    "topic": "booking",
    "call_status_callback_url": "https://example.com/callbacks"
  }
}
```

## **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.relay_applications.update("resource-id", name="updated-name")
print(f"Updated: {updated['display_name']}")
```