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

# Release Phone Number

> Give a number on the carrier account back to the carrier. Admin only.
**Irreversible**: the carrier may sell the number to someone else.
`confirm` must repeat `e164_number` (422 otherwise). A number TurnCall
still binds is refused (409): unbind it first with
`DELETE /v1/phone-numbers/{id}`, which leaves it on the account. On the
platform's shared account (Twilio without an account pair; Telnyx when
the project holds no `telnyx` credential) only a number this project
bought through `POST /v1/phone-numbers/purchase` is released (403
otherwise); the project's own account is not restricted.



## OpenAPI

````yaml /openapi.json post /v1/phone-numbers/release
openapi: 3.1.0
info:
  title: TurnCall
  description: Production voice agent platform API
  version: 2.0.0
servers: []
security: []
paths:
  /v1/phone-numbers/release:
    post:
      tags:
        - phone-numbers
      summary: Release Phone Number
      description: |-
        Give a number on the carrier account back to the carrier. Admin only.
        **Irreversible**: the carrier may sell the number to someone else.
        `confirm` must repeat `e164_number` (422 otherwise). A number TurnCall
        still binds is refused (409): unbind it first with
        `DELETE /v1/phone-numbers/{id}`, which leaves it on the account. On the
        platform's shared account (Twilio without an account pair; Telnyx when
        the project holds no `telnyx` credential) only a number this project
        bought through `POST /v1/phone-numbers/purchase` is released (403
        otherwise); the project's own account is not restricted.
      operationId: release_phone_number_v1_phone_numbers_release_post
      parameters:
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReleasePhoneNumberRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Release Phone Number V1 Phone Numbers Release Post
          headers:
            X-TurnCall-Audit-Id:
              description: >-
                The id of the audit log entry for this request's primary
                resource. Every entry the request wrote (a publish also archives
                versions and re-points numbers) carries it as `request_id`: `GET
                /v1/audit-log?request_id=<this id>` returns them all.
              schema:
                type: string
                format: uuid
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ReleasePhoneNumberRequest:
      properties:
        twilio_account_sid:
          anyOf:
            - type: string
              pattern: ^AC[0-9a-fA-F]{32}$
            - type: 'null'
          title: Twilio Account Sid
        twilio_auth_token:
          anyOf:
            - type: string
              maxLength: 256
              minLength: 1
            - type: 'null'
          title: Twilio Auth Token
        carrier:
          type: string
          enum:
            - twilio
            - telnyx
          title: Carrier
          description: The carrier whose account the number is released from.
          default: twilio
        e164_number:
          type: string
          pattern: ^\+[1-9]\d{1,14}$
          title: E164 Number
        confirm:
          anyOf:
            - type: string
            - type: 'null'
          title: Confirm
          description: >-
            The number being released, repeated (it must equal `e164_number`).
            Releasing is irreversible: the carrier may sell the number to
            someone else.
      type: object
      required:
        - e164_number
      title: ReleasePhoneNumberRequest
      description: |-
        Give a number on the carrier account back to the carrier. Irreversible:
        `confirm` must repeat `e164_number` exactly, so a release is never a
        default, a copied body or a stray `true`. On Twilio, the account it is
        released from is the pair given here, else the platform's TWILIO_*
        account, as on a purchase.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````

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