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

# Buy Phone Number

> This will buy a phone number. In the POST request you can either provide the phone number you want to buy, or leave it empty. If the specified `number` is still available, it will be bought or the API will return a failure. Alternatively, if you skipped the `number` field, a random phone number from California (CA) will be bought.



## OpenAPI

````yaml POST /buy-phone-number
openapi: 3.0.3
info:
  title: Daily API
  description: |-
    The Daily REST API offers the ability to manage the following: 
    - Overall Domain Configuration
    - Individual Room creation and config management 
    - Meeting token creation and validation
    - Recording and compositing management 
    - Meeting analytics
    - Logs and metrics
    - Real-time presence

    Please reach out to help@daily.co if we can help with anything
  version: 1.1.1
  contact:
    name: Daily
    url: https://docs.daily.co
    email: help@daily.co
servers:
  - url: https://api.daily.co/v1
security:
  - bearerAuth: []
paths:
  /buy-phone-number:
    post:
      tags:
        - phone-numbers
      summary: /buy-phone-number
      description: >-
        This will buy a phone number. In the POST request you can either provide
        the phone number you want to buy, or leave it empty. If the specified
        `number` is still available, it will be bought or the API will return a
        failure. Alternatively, if you skipped the `number` field, a random
        phone number from California (CA) will be bought.
      operationId: BuyPhoneNumber
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                number:
                  type: string
                  description: >-
                    The phone number to purchase, in E.164 format (e.g.
                    "+18058700061"). If not provided, a random US number will be
                    purchased.
                  example: '+18058700061'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties: {}
              examples:
                Result:
                  value:
                    id: 85a70a9a-e22f-4a8d-8302-bbf1b88dd909
                    number: '+18058700061'
        '400':
          $ref: '#/components/responses/400'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        detail:
                          type: string
                        status:
                          type: string
                        title:
                          type: string
                        code:
                          type: string
                  status:
                    type: integer
              examples:
                Result:
                  value:
                    errors:
                      - detail: Number is invalid.
                        status: '422'
                        title: Invalid Attribute
                        code: '422'
                    status: 422
      deprecated: false
      security:
        - bearerAuth: []
components:
  responses:
    '400':
      description: '400'
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              info:
                type: string
          examples:
            Result:
              value:
                error: invalid-request-error
                info: missing required field
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````