> ## Documentation Index
> Fetch the complete documentation index at: https://blackbox.dasha.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Twilio provider

> Updates an existing Twilio provider configuration. Only provided fields are updated.
Credentials (Account SID, Auth Token) cannot be updated through this endpoint for security reasons.
Create a new provider if you need to change credentials.

## Updatable Fields

The following fields can be updated:

| Field                    | Description                                            |
| ------------------------ | ------------------------------------------------------ |
| **name**                 | Display name for the provider                          |
| **region**               | Twilio region for SIP trunk (us1, us2, ie1, de1, etc.) |
| **supportsCallTransfer** | Enable/disable call transfer support                   |

## Credential Updates

For security reasons, Account SID and Auth Token cannot be updated. If you need to change credentials:

1. Create a new provider with the new credentials
2. Import phone numbers to the new provider
3. Delete the old provider

## Partial Updates

This endpoint supports partial updates. Only include the fields you want to change in the request body.


## OpenAPI

````yaml https://blackbox.dasha.ai/swagger/v1/swagger.json put /api/v1/providers/twilio/{id}
openapi: 3.0.4
info:
  title: Dasha BlackBox Agent API
  description: API for managing AI agents and calls
  contact:
    name: DashaAI Team
    email: support@dasha.ai
  version: v1
servers:
  - url: https://blackbox.dasha.ai
    description: Dasha BlackBox Agent API
security:
  - ApiKey: []
  - OAuth: []
tags:
  - name: ActivityLogs
  - name: Agents
  - name: AgentTestCases
  - name: CallResults
  - name: Calls
  - name: Chats
  - name: Copilot
  - name: CustomerData
  - name: Mcp
  - name: Media
  - name: Misc
  - name: PronunciationDictionaries
  - name: Providers
  - name: SipAliases
  - name: SipCredentials
  - name: SipPhoneNumbers
  - name: TextChat
  - name: TwilioProvider
  - name: Voice
  - name: WebhookTest
  - name: WebIntegrations
  - name: WebSocket
    description: WebSocket endpoints for real-time communication
paths:
  /api/v1/providers/twilio/{id}:
    put:
      tags:
        - TwilioProvider
      summary: Update Twilio provider
      description: >-
        Updates an existing Twilio provider configuration. Only provided fields
        are updated.

        Credentials (Account SID, Auth Token) cannot be updated through this
        endpoint for security reasons.

        Create a new provider if you need to change credentials.
      parameters:
        - name: id
          in: path
          description: Provider identifier
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Fields to update (only provided fields are modified)
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/UpdateTwilioProviderRequestDto'
              description: >-
                Request DTO for updating an existing Twilio provider
                integration. All fields are optional and only

                provided fields will be updated. Credentials (AccountSid,
                AuthToken) cannot be updated through this endpoint

                for security reasons - create a new provider integration if
                credentials need to be changed.
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/UpdateTwilioProviderRequestDto'
              description: >-
                Request DTO for updating an existing Twilio provider
                integration. All fields are optional and only

                provided fields will be updated. Credentials (AccountSid,
                AuthToken) cannot be updated through this endpoint

                for security reasons - create a new provider integration if
                credentials need to be changed.
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/UpdateTwilioProviderRequestDto'
              description: >-
                Request DTO for updating an existing Twilio provider
                integration. All fields are optional and only

                provided fields will be updated. Credentials (AccountSid,
                AuthToken) cannot be updated through this endpoint

                for security reasons - create a new provider integration if
                credentials need to be changed.
      responses:
        '200':
          description: Twilio provider updated successfully
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/TwilioProviderResponseDto'
                description: >-
                  Response DTO for Twilio provider integrations. Contains
                  Twilio-specific configuration details

                  including account identifier, SIP trunk configuration, and
                  regional settings. AuthToken is

                  intentionally excluded from responses for security.
        '400':
          description: Invalid configuration or validation errors
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Authentication failed or API key is missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Access denied to the requested resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Provider with specified ID does not exist in your organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Server error occurred during provider update
components:
  schemas:
    UpdateTwilioProviderRequestDto:
      type: object
      properties:
        name:
          maxLength: 100
          type: string
          description: >-
            Display name for the provider integration. Used to identify the
            provider in the UI and API responses.
          nullable: true
        region:
          type: string
          description: >-
            Twilio region for SIP trunk configuration. Affects call routing
            latency and regional compliance.

            Common values: us1, us2, ie1, de1, au1, jp1, br1, sg1.
          nullable: true
        supportsCallTransfer:
          type: boolean
          description: >-
            Whether to enable call transfer support. When enabled, allows warm
            and cold transfers during calls.

            Requires proper Twilio account configuration and sufficient
            permissions.
          nullable: true
      additionalProperties: false
      description: >-
        Request DTO for updating an existing Twilio provider integration. All
        fields are optional and only

        provided fields will be updated. Credentials (AccountSid, AuthToken)
        cannot be updated through this endpoint

        for security reasons - create a new provider integration if credentials
        need to be changed.
    TwilioProviderResponseDto:
      allOf:
        - $ref: '#/components/schemas/ProviderResponseDto'
        - required:
            - accountSid
            - providerType
          type: object
          properties:
            providerType:
              enum:
                - twilio
              type: string
              description: Type of VoIP provider. Always returns Twilio for this DTO.
              readOnly: true
            accountSid:
              minLength: 1
              type: string
              description: >-
                Twilio Account SID. A unique identifier for the Twilio account
                associated with this provider.

                Format: AC[a-f0-9]{32} (e.g.,
                ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx).
            trunkSid:
              type: string
              description: >-
                Twilio SIP Trunk SID. The unique identifier for the SIP trunk
                created in Twilio for this provider.

                Format: TK[a-f0-9]{32} (e.g.,
                TKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx).
              nullable: true
            terminationUri:
              type: string
              description: >-
                SIP trunk termination URI configured for this provider. Used for
                routing outbound calls through Twilio.

                Format: sip:<trunk-name>.pstn.twilio.com
              nullable: true
            region:
              type: string
              description: >-
                Twilio region where the SIP trunk is configured. Affects call
                routing latency and regional compliance.

                Common values: us1, us2, ie1, de1, au1, jp1, br1, sg1.
              nullable: true
            supportsCallTransfer:
              type: boolean
              description: >-
                Whether the provider supports call transfers. When enabled,
                allows warm and cold transfers during calls.

                Requires proper Twilio account configuration and sufficient
                permissions.
          additionalProperties: false
      description: >-
        Response DTO for Twilio provider integrations. Contains Twilio-specific
        configuration details

        including account identifier, SIP trunk configuration, and regional
        settings. AuthToken is

        intentionally excluded from responses for security.
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    ProviderResponseDto:
      required:
        - name
        - providerType
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the provider integration.
          format: uuid
        name:
          type: string
          description: >-
            Display name for the provider integration. Used to identify the
            provider in the UI and API responses.
          nullable: true
        providerType:
          allOf:
            - $ref: '#/components/schemas/ProviderType'
          description: >-
            Type of VoIP provider. Determines the specific provider
            implementation and available features.

            Supported values: twilio, vonage, telnyx.
          readOnly: true
        verificationStatus:
          allOf:
            - $ref: '#/components/schemas/VerificationStatus'
          description: >-
            Current verification status of the provider credentials. Indicates
            the health and validity of the integration.

            Supported values: pending, verified, warning, failed.
        lastVerifiedAt:
          type: string
          description: >-
            Timestamp when the provider credentials were last verified. Null if
            verification has never been performed.
          format: date-time
          nullable: true
        phoneNumberCount:
          type: integer
          description: >-
            Total number of phone numbers currently imported and managed through
            this provider integration.
          format: int32
        verificationDetails:
          type: array
          items:
            $ref: '#/components/schemas/VerificationCheckDto'
          description: >-
            Detailed results of the last verification. Contains individual check
            results with status, messages, and timestamps.

            Null if verification has never been performed.
          nullable: true
      additionalProperties: false
      description: >-
        Base response DTO for VoIP provider integrations. Contains common
        provider information

        shared across all provider types including identification, verification
        status, and phone number counts.

        Uses polymorphic serialization with providerType discriminator to
        support different provider implementations.
    ProviderType:
      enum:
        - twilio
        - vonage
        - telnyx
      type: string
      description: >-
        Type of VoIP provider integration. Determines the specific provider
        implementation and API interactions.
    VerificationStatus:
      enum:
        - pending
        - verified
        - warning
        - failed
      type: string
      description: >-
        Status of provider credential verification. Indicates the current health
        and validity of the provider integration.
    VerificationCheckDto:
      required:
        - checkName
        - message
      type: object
      properties:
        checkName:
          type: string
          description: >-
            Name of the verification check that was performed.

            Common values: credentials, api_connectivity, sip_trunk,
            phone_numbers.
          nullable: true
        status:
          allOf:
            - $ref: '#/components/schemas/CheckStatus'
          description: >-
            Status indicating whether the check passed, failed, or raised a
            warning.

            Supported values: passed, failed, warning.
        message:
          type: string
          description: >-
            Human-readable message describing the check result. Provides context
            about

            what was verified and any issues encountered.
          nullable: true
        timestamp:
          type: string
          description: Timestamp when the check was performed. Recorded in UTC.
          format: date-time
        details:
          type: object
          additionalProperties:
            type: string
          description: >-
            Additional details about the check result as key-value pairs.

            Can contain provider-specific information such as error codes or
            configuration details.
          nullable: true
      additionalProperties: false
      description: >-
        DTO representing the result of an individual verification check for a
        provider.

        Contains details about what was checked, the outcome, and any additional
        context.
    CheckStatus:
      enum:
        - passed
        - failed
        - warning
      type: string
      description: >-
        Status of an individual verification check. Indicates whether a specific
        verification check passed, failed, or raised a warning.
  securitySchemes:
    ApiKey:
      type: http
      description: API Key Authentication (Bearer {key})
      scheme: Bearer
    OAuth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://auth.dasha.ai/connect/authorize
          scopes:
            platform_api: Platform API

````