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

# Release a phone number

> A bought number keeps working until the end of the period already paid for, then goes (`status: releasing`, `release_at`); undo with PATCH. An imported number is detached and removed now. Agent Phone Plan numbers are refused with `number_managed_by_plan`.



## OpenAPI

````yaml /api-reference/openapi.json delete /phone_numbers/{id}
openapi: 3.0.0
info:
  contact: {}
  description: >-
    Public REST API for Brilo. Authenticate by sending your API key as a Bearer
    token in the `Authorization` header.
  title: Brilo API
  version: '2025-03-02'
servers:
  - description: Production
    url: https://api.brilo.ai/v1
security: []
tags: []
paths:
  /phone_numbers/{id}:
    delete:
      tags:
        - Agents (public)
      summary: Release a phone number
      description: >-
        A bought number keeps working until the end of the period already paid
        for, then goes (`status: releasing`, `release_at`); undo with PATCH. An
        imported number is detached and removed now. Agent Phone Plan numbers
        are refused with `number_managed_by_plan`.
      operationId: releasePhoneNumber
      parameters:
        - description: Phone number id (UUID).
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  agent_id:
                    nullable: true
                    type: string
                  created_at:
                    type: string
                  currency:
                    nullable: true
                    type: string
                  failure:
                    additionalProperties: false
                    description: >-
                      Why a failed purchase failed. Null unless status is
                      failed.
                    nullable: true
                    properties:
                      error_code:
                        description: >-
                          carrier_purchase_failed, phone_number_unavailable,
                          provisioning_failed, stripe_error or
                          provisioning_timeout.
                        type: string
                      message:
                        type: string
                    required:
                      - error_code
                      - message
                    type: object
                  id:
                    description: >-
                      Stable from the first response: the purchase id becomes
                      the number id.
                    type: string
                  imported:
                    type: boolean
                  managed_by_plan:
                    description: >-
                      Part of an Agent Phone Plan: give it up by cancelling the
                      plan.
                    type: boolean
                  monthly_price:
                    nullable: true
                    type: number
                  next_action:
                    additionalProperties: false
                    properties:
                      body:
                        additionalProperties: {}
                        type: object
                      method:
                        type: string
                      path:
                        type: string
                      tool:
                        type: string
                    required:
                      - tool
                      - method
                      - path
                    type: object
                  phone_number:
                    type: string
                  refunded:
                    description: A failed purchase whose payment was refunded in full.
                    type: boolean
                  release_at:
                    description: >-
                      When a releasing number goes away. PATCH release_at null
                      to keep it.
                    nullable: true
                    type: string
                  revision:
                    nullable: true
                    type: string
                  status:
                    description: >-
                      released only answers the release of an imported number,
                      which is removed at once.
                    enum:
                      - provisioning
                      - active
                      - releasing
                      - failed
                      - released
                    type: string
                  try_it:
                    additionalProperties: {}
                    description: Ways to hear the agent on this number, as on agent writes.
                    type: object
                  warnings:
                    items:
                      additionalProperties: false
                      properties:
                        code:
                          type: string
                        message:
                          type: string
                      required:
                        - code
                        - message
                      type: object
                    type: array
                required:
                  - id
                  - phone_number
                  - status
                  - agent_id
                  - monthly_price
                  - currency
                  - release_at
                  - managed_by_plan
                  - imported
                  - failure
                  - refunded
                  - revision
                  - created_at
                type: object
          description: ''
        '404':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  details:
                    additionalProperties: {}
                    type: object
                  error_code:
                    type: string
                  errors:
                    items:
                      additionalProperties: false
                      properties:
                        error_code:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      required:
                        - field
                        - error_code
                        - message
                      type: object
                    type: array
                  hint:
                    type: string
                  message:
                    type: string
                  next_action:
                    additionalProperties: false
                    properties:
                      body:
                        additionalProperties: {}
                        type: object
                      method:
                        type: string
                      path:
                        type: string
                      tool:
                        type: string
                    required:
                      - tool
                      - method
                      - path
                    type: object
                  status:
                    maximum: 9007199254740991
                    minimum: -9007199254740991
                    type: integer
                required:
                  - status
                  - error_code
                  - message
                type: object
          description: phone_number_not_found
        '409':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  details:
                    additionalProperties: {}
                    type: object
                  error_code:
                    type: string
                  errors:
                    items:
                      additionalProperties: false
                      properties:
                        error_code:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      required:
                        - field
                        - error_code
                        - message
                      type: object
                    type: array
                  hint:
                    type: string
                  message:
                    type: string
                  next_action:
                    additionalProperties: false
                    properties:
                      body:
                        additionalProperties: {}
                        type: object
                      method:
                        type: string
                      path:
                        type: string
                      tool:
                        type: string
                    required:
                      - tool
                      - method
                      - path
                    type: object
                  status:
                    maximum: 9007199254740991
                    minimum: -9007199254740991
                    type: integer
                required:
                  - status
                  - error_code
                  - message
                type: object
          description: >-
            number_managed_by_plan, phone_number_provisioning,
            subscription_not_found
        '503':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  details:
                    additionalProperties: {}
                    type: object
                  error_code:
                    type: string
                  errors:
                    items:
                      additionalProperties: false
                      properties:
                        error_code:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      required:
                        - field
                        - error_code
                        - message
                      type: object
                    type: array
                  hint:
                    type: string
                  message:
                    type: string
                  next_action:
                    additionalProperties: false
                    properties:
                      body:
                        additionalProperties: {}
                        type: object
                      method:
                        type: string
                      path:
                        type: string
                      tool:
                        type: string
                    required:
                      - tool
                      - method
                      - path
                    type: object
                  status:
                    maximum: 9007199254740991
                    minimum: -9007199254740991
                    type: integer
                required:
                  - status
                  - error_code
                  - message
                type: object
          description: billing_unavailable
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: Enter your API key (Bearer token)
      scheme: bearer
      type: http

````

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