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

# Numarayı güncelle

> Yalnızca gönderilen alanlar değişir. SIP trunk alanlarından biri (`termination_uri`, `transport`, `auth_username`, `auth_password`) gönderilirse trunk yeniden kurulur; bu durumda `termination_uri` ve kimlik bilgileri birlikte gönderilmelidir. `phone_number` değiştirilemez; gerekirse silip yeniden oluşturun.



## OpenAPI

````yaml /api-reference/openapi.json patch /phone-numbers/{id}
openapi: 3.1.0
info:
  title: AI Agent TR Public API
  version: 1.0.0
  description: >-
    Organizasyonunuzun Private API Anahtarı ile çağrılan uçlar. Organizasyon
    anahtardan belirlenir.
servers:
  - url: https://api.aiagenttr.com/api/public/v1
    description: Canlı
security:
  - bearerAuth: []
paths:
  /phone-numbers/{id}:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
    patch:
      summary: Numarayı güncelle
      description: >-
        Yalnızca gönderilen alanlar değişir. SIP trunk alanlarından biri
        (`termination_uri`, `transport`, `auth_username`, `auth_password`)
        gönderilirse trunk yeniden kurulur; bu durumda `termination_uri` ve
        kimlik bilgileri birlikte gönderilmelidir. `phone_number`
        değiştirilemez; gerekirse silip yeniden oluşturun.
      operationId: updatePhoneNumber
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PhoneNumberUpdate'
      responses:
        '200':
          description: Güncel numara
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneNumber'
        '400':
          $ref: '#/components/responses/InvalidArgument'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '404':
          description: Numara ya da agent bulunamadı
components:
  schemas:
    PhoneNumberUpdate:
      type: object
      properties:
        label:
          type: string
          maxLength: 100
        agent:
          type: string
          format: uuid
        termination_uri:
          type: string
        transport:
          type: string
        auth_username:
          type: string
        auth_password:
          type: string
          format: password
    PhoneNumber:
      type: object
      properties:
        id:
          type: string
          format: uuid
        phone_number:
          type: string
          example: santral-teknikdestek
          description: Numara ya da dahili adı; gönderildiği haliyle
        label:
          type: string
          example: pazarlama
        agent:
          type:
            - string
            - 'null'
          format: uuid
          description: Bağlı agent'ın `agent_id`'si
        agent_name:
          type:
            - string
            - 'null'
          example: Satış Asistanı
        provider:
          type:
            - string
            - 'null'
          example: netgsm
          description: Numaranın operatörü
        termination_uri:
          type: string
          example: sip.ornek-santral.com
        transport:
          type: string
          enum:
            - UDP
            - TCP
            - TLS
          example: UDP
        auth_username:
          type:
            - string
            - 'null'
          example: santral-teknikdestek
    Error:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        details: {}
  responses:
    InvalidArgument:
      description: İstek alanları geçersiz
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: invalid_argument
            message: termination_uri is required
            details: null
    Unauthenticated:
      description: Anahtar yok, geçersiz ya da yenilenmiş
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: unauthenticated
            message: invalid api key
            details: null
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Organizasyonun Private API Anahtarı (Organizasyon Ayarları → Private API
        Anahtarı).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.