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

# Update Provider

> Update a provider's credentials



## OpenAPI

````yaml /latest.yml PATCH /agents/phone-numbers/providers/{id}
openapi: 3.0.1
info:
  title: Cartesia API
  version: 0.0.1
servers:
  - url: https://api.cartesia.ai
    description: Production
security: []
paths:
  /agents/phone-numbers/providers/{id}:
    patch:
      tags:
        - Providers
      summary: Update Provider
      description: Update a provider's credentials
      operationId: providers_update
      parameters:
        - $ref: '#/components/parameters/CartesiaVersionHeader'
        - name: id
          in: path
          description: The provider ID.
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateProviderBody'
      responses:
        '200':
          description: Provider updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProviderAccountResponse'
        '400':
          description: >-
            Invalid credentials, or phone numbers are unreachable with the new
            credentials. The response includes `unreachable_numbers` listing
            affected phone numbers.
        '404':
          description: Provider not found.
      security:
        - APIKeyAuth: []
components:
  parameters:
    CartesiaVersionHeader:
      name: Cartesia-Version
      in: header
      description: API version header.
      required: true
      schema:
        type: string
        format: date
        example: '2026-03-01'
        enum:
          - '2026-03-01'
  schemas:
    UpdateProviderBody:
      title: Update Provider
      description: >-
        Request body for updating a provider's credentials. Discriminated by
        `type`.
      oneOf:
        - $ref: '#/components/schemas/UpdateTwilioProviderBody'
      discriminator:
        propertyName: type
        mapping:
          twilio:
            $ref: '#/components/schemas/UpdateTwilioProviderBody'
    ProviderAccountResponse:
      title: Provider Account
      description: A telephony provider account.
      oneOf:
        - $ref: '#/components/schemas/TwilioProviderResponse'
      discriminator:
        propertyName: type
        mapping:
          twilio:
            $ref: '#/components/schemas/TwilioProviderResponse'
    UpdateTwilioProviderBody:
      title: Twilio
      type: object
      description: >-
        Update Twilio API key credentials and optionally the region. Credentials
        are validated before applying. If phone numbers using this provider
        cannot be verified with the new credentials, the update is rejected.
      properties:
        type:
          type: string
          enum:
            - twilio
          description: Must be `"twilio"`.
        api_key_sid:
          type: string
          description: New Twilio API key SID.
        api_key_secret:
          type: string
          description: New API key secret.
        region:
          $ref: '#/components/schemas/TelephonyRegion'
      required:
        - type
        - api_key_sid
        - api_key_secret
    TwilioProviderResponse:
      title: Twilio
      type: object
      description: >-
        A linked Twilio account. The `api_key_sid` field is partially masked in
        responses.
      properties:
        type:
          type: string
          enum:
            - twilio
          description: Always `"twilio"`.
        id:
          type: string
          description: Unique identifier for the provider.
        account_sid:
          type: string
          description: The Twilio account SID.
        api_key_sid:
          type: string
          description: The Twilio API key SID (partially masked).
        region:
          $ref: '#/components/schemas/TelephonyRegion'
      required:
        - type
        - id
        - account_sid
        - api_key_sid
        - region
    TelephonyRegion:
      title: TelephonyRegion
      type: string
      enum:
        - us1
        - ie1
        - au1
      description: >-
        The Twilio region the phone number and API key are configured for. `us1`
        (US), `ie1` (Ireland), `au1` (Australia). Default is `us1`.
      default: us1
  securitySchemes:
    APIKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Cartesia API key (`sk_car_...`). Get one at
        [play.cartesia.ai/keys](https://play.cartesia.ai/keys).

````