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

# update

> Update an application.

Update an application's configuration. Uses POST (Twilio convention).

### Schema

```yaml
openapi: 3.1.0
info:
  title: API
  version: 1.0.0
paths:
  /Accounts/{AccountSid}/Applications/{Sid}:
    post:
      operationId: update_application
      summary: Update an Application
      description: >-
        Update an Application.


        #### Permissions


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


        [Learn more about API scopes](/docs/platform/your-signalwire-api-space).
      tags:
        - subpackage_applications
      parameters:
        - name: AccountSid
          in: path
          description: The Account ID that has the Application.
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
        - name: Sid
          in: path
          description: The Application ID that uniquely identifies the Application.
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationResponse'
        '400':
          description: >-
            The request was invalid or cannot be processed. Check the error
            details for more information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompatibilityErrorResponse'
        '401':
          description: Authentication failed. Please verify your credentials and try again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompatibilityErrorResponse'
        '404':
          description: >-
            The requested resource was not found. Please verify the resource
            identifier.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompatibilityErrorResponse'
        '422':
          description: >-
            The request could not be processed due to validation errors. Check
            the error details for more information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompatibilityErrorResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateApplicationRequest'
servers:
  - url: https://YOUR_SPACE.signalwire.com/api/laml/2010-04-01
    description: SignalWire Compatibility API
components:
  schemas:
    uuid:
      type: string
      format: uuid
      description: Universal Unique Identifier.
      title: uuid
    UpdateApplicationRequestVoiceMethod:
      type: string
      enum:
        - GET
        - POST
      default: POST
      description: >-
        Whether the request to `VoiceUrl` is a `GET` or a `POST`. Default is
        `POST`.
      title: UpdateApplicationRequestVoiceMethod
    UpdateApplicationRequestVoiceFallbackMethod:
      type: string
      enum:
        - GET
        - POST
      default: POST
      description: >-
        Whether the request to `VoiceFallbackUrl` is a `GET` or a `POST`.
        Default is `POST`.
      title: UpdateApplicationRequestVoiceFallbackMethod
    UpdateApplicationRequestStatusCallbackMethod:
      type: string
      enum:
        - GET
        - POST
      default: POST
      description: >-
        Whether the request to the `StatusCallback` URL is a `GET` or a `POST`.
        Default is `POST`.
      title: UpdateApplicationRequestStatusCallbackMethod
    UpdateApplicationRequestSmsMethod:
      type: string
      enum:
        - GET
        - POST
      default: POST
      description: >-
        Whether the request to `SmsUrl` is a `GET` or a `POST`. Default is
        `POST`.
      title: UpdateApplicationRequestSmsMethod
    UpdateApplicationRequestSmsFallbackMethod:
      type: string
      enum:
        - GET
        - POST
      default: POST
      description: >-
        Whether the request to `SmsFallbackUrl` is a `GET` or a `POST`. Default
        is `POST`.
      title: UpdateApplicationRequestSmsFallbackMethod
    UpdateApplicationRequestSmsStatusCallbackMethod:
      type: string
      enum:
        - GET
        - POST
      default: POST
      description: >-
        Whether the request to `SmsStatusCallback` is a `GET` or a `POST`.
        Default is `POST`.
      title: UpdateApplicationRequestSmsStatusCallbackMethod
    UpdateApplicationRequest:
      type: object
      properties:
        FriendlyName:
          type: string
          description: A named unique identifier for the resource.
        VoiceUrl:
          type: string
          format: uri
          description: The URL to request when a phone number receives a call or fax.
        VoiceMethod:
          $ref: '#/components/schemas/UpdateApplicationRequestVoiceMethod'
          default: POST
          description: >-
            Whether the request to `VoiceUrl` is a `GET` or a `POST`. Default is
            `POST`.
        VoiceFallbackUrl:
          type: string
          format: uri
          description: >-
            The URL SignalWire will request if errors occur when fetching the
            `VoiceUrl`.
        VoiceFallbackMethod:
          $ref: '#/components/schemas/UpdateApplicationRequestVoiceFallbackMethod'
          default: POST
          description: >-
            Whether the request to `VoiceFallbackUrl` is a `GET` or a `POST`.
            Default is `POST`.
        StatusCallback:
          type: string
          format: uri
          description: The URL to pass status updates to the Application.
        StatusCallbackMethod:
          $ref: '#/components/schemas/UpdateApplicationRequestStatusCallbackMethod'
          default: POST
          description: >-
            Whether the request to the `StatusCallback` URL is a `GET` or a
            `POST`. Default is `POST`.
        SmsUrl:
          type: string
          format: uri
          description: The URL to request when an SMS is received.
        SmsMethod:
          $ref: '#/components/schemas/UpdateApplicationRequestSmsMethod'
          default: POST
          description: >-
            Whether the request to `SmsUrl` is a `GET` or a `POST`. Default is
            `POST`.
        SmsFallbackUrl:
          type: string
          format: uri
          description: >-
            The URL SignalWire will request if errors occur when fetching the
            `SmsUrl`.
        SmsFallbackMethod:
          $ref: '#/components/schemas/UpdateApplicationRequestSmsFallbackMethod'
          default: POST
          description: >-
            Whether the request to `SmsFallbackUrl` is a `GET` or a `POST`.
            Default is `POST`.
        SmsStatusCallback:
          type: string
          format: uri
          description: >-
            The URL to receive status updates for messages sent via this
            Application.
        SmsStatusCallbackMethod:
          $ref: '#/components/schemas/UpdateApplicationRequestSmsStatusCallbackMethod'
          default: POST
          description: >-
            Whether the request to `SmsStatusCallback` is a `GET` or a `POST`.
            Default is `POST`.
      required:
        - FriendlyName
      description: Request body for updating an application.
      title: UpdateApplicationRequest
    ApplicationResponse:
      type: object
      properties:
        sid:
          $ref: '#/components/schemas/uuid'
          description: The unique identifier for the Application.
        account_sid:
          $ref: '#/components/schemas/uuid'
          description: The unique identifier for the Account that created this Application.
        api_version:
          type: string
          description: The version of the SignalWire API.
        date_created:
          type: string
          description: The date, in RFC 2822 GMT format, this Application was created.
        date_updated:
          type: string
          description: The date, in RFC 2822 GMT format, this Application was updated.
        friendly_name:
          type: string
          description: A named unique identifier for the resource.
        uri:
          type: string
          description: The URI for this Application.
        voice_url:
          type:
            - string
            - 'null'
          description: The URL to request when a phone number receives a call or fax.
        voice_method:
          type:
            - string
            - 'null'
          description: >-
            Whether the request to `VoiceUrl` is a `GET` or a `POST`. Default is
            `POST`.
        voice_fallback_url:
          type:
            - string
            - 'null'
          description: >-
            The URL SignalWire will request if errors occur when fetching the
            `VoiceUrl`.
        voice_fallback_method:
          type:
            - string
            - 'null'
          description: >-
            Whether the request to `VoiceFallbackUrl` is a `GET` or a `POST`.
            Default is `POST`.
        status_callback:
          type:
            - string
            - 'null'
          description: The URL to pass status updates to the Application.
        status_callback_method:
          type:
            - string
            - 'null'
          description: >-
            Whether the request to the `StatusCallback` URL is a `GET` or a
            `POST`. Default is `POST`.
        voice_caller_id_lookup:
          type:
            - boolean
            - 'null'
          description: >-
            Whether or not to look up a caller's ID from the database. Always
            null.
        sms_url:
          type:
            - string
            - 'null'
          description: The URL to request when an SMS is received.
        sms_method:
          type:
            - string
            - 'null'
          description: >-
            Whether the request to `SmsUrl` is a `GET` or a `POST`. Default is
            `POST`.
        sms_fallback_url:
          type:
            - string
            - 'null'
          description: >-
            The URL SignalWire will request if errors occur when fetching the
            `SmsUrl`.
        sms_fallback_method:
          type:
            - string
            - 'null'
          description: >-
            Whether the request to `SmsFallbackUrl` is a `GET` or a `POST`.
            Default is `POST`.
        sms_status_callback:
          type:
            - string
            - 'null'
          description: >-
            The URL to receive status updates for messages sent via this
            Application.
        sms_status_callback_method:
          type:
            - string
            - 'null'
          description: >-
            Whether the request to `SmsStatusCallback` is a `GET` or a `POST`.
            Default is `POST`.
        message_status_callback:
          type:
            - string
            - 'null'
          description: >-
            The URL to receive status updates for messages sent via this
            Application.
      required:
        - sid
        - account_sid
        - api_version
        - date_created
        - date_updated
        - friendly_name
        - uri
        - voice_url
        - voice_method
        - voice_fallback_url
        - voice_fallback_method
        - status_callback
        - status_callback_method
        - voice_caller_id_lookup
        - sms_url
        - sms_method
        - sms_fallback_url
        - sms_fallback_method
        - sms_status_callback
        - sms_status_callback_method
        - message_status_callback
      description: Response containing a single application.
      title: ApplicationResponse
    CompatibilityErrorResponse:
      type: object
      properties:
        code:
          type: integer
          description: Error code.
        message:
          type: string
          description: Error message.
        more_info:
          type: string
          description: URL for more information about the error.
        status:
          type: integer
          description: HTTP status code.
      required:
        - code
        - message
        - more_info
        - status
      description: Error response model.
      title: CompatibilityErrorResponse

```

## **Response Example**

### Response (200)

```json
{
  "sid": "b3877c40-da60-4998-90ad-b792e98472af",
  "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
  "api_version": "2010-04-01",
  "date_created": "Sat, 15 Sept 2018 10:00:00 +0000",
  "date_updated": "Sat, 16 Sept 2018 10:00:00 +0000",
  "friendly_name": "My Friendly Name",
  "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications/b3877c40-da60-4998-90ad-b792e98472af.json",
  "voice_url": "http://example.com",
  "voice_method": "POST",
  "voice_fallback_url": "http://example.com",
  "voice_fallback_method": "POST",
  "status_callback": "http://example.com",
  "status_callback_method": "POST",
  "voice_caller_id_lookup": null,
  "sms_url": "http://example.com",
  "sms_method": "POST",
  "sms_fallback_url": "http://www.example.com/sms-fallback",
  "sms_fallback_method": "POST",
  "sms_status_callback": "http://www.example.com/sms-status-callback",
  "sms_status_callback_method": "POST",
  "message_status_callback": "http://www.example.com/sms-status-callback"
}
```

## **Example**

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

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

client.compat.applications.update(
    "AP...",
    VoiceUrl="https://example.com/new-voice"
)
```