For a complete page index, fetch https://developer.close.com/llms.txt

# Retrieve a single phone number

GET https://api.close.com/api/v1/phone_number/{id}/

Reference: https://developer.close.com/api/resources/phone-numbers/get

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Close API
  version: 1.0.0
paths:
  /phone_number/{id}/:
    get:
      operationId: get
      summary: Retrieve a single phone number
      tags:
        - subpackage_phoneNumbers
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: _fields
          in: query
          description: Comma-separated list of fields to include in the response.
          required: false
          schema:
            type: string
        - name: Authorization
          in: header
          description: Basic authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneNumber'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                description: Any type
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                description: Any type
        '404':
          description: Not found
          content:
            application/json:
              schema:
                description: Any type
servers:
  - url: https://api.close.com/api/v1
components:
  schemas:
    UnderlyingCarrier:
      type: string
      enum:
        - twilio
        - plivo
      title: UnderlyingCarrier
    CarrierNumberType:
      type: string
      enum:
        - local
        - national
        - mobile
        - tollfree
        - shortcode
      description: The type of number the carrier has rented.
      title: CarrierNumberType
    PhoneNumberType:
      type: string
      enum:
        - internal
        - external
        - virtual
      title: PhoneNumberType
    PhoneNumber:
      type: object
      properties:
        address_id:
          type:
            - string
            - 'null'
        bundle_id:
          type:
            - string
            - 'null'
        carrier:
          oneOf:
            - $ref: '#/components/schemas/UnderlyingCarrier'
            - type: 'null'
        carrier_type:
          oneOf:
            - $ref: '#/components/schemas/CarrierNumberType'
            - type: 'null'
        country:
          type:
            - string
            - 'null'
        date_created:
          type: string
          format: date-time
        date_updated:
          type: string
          format: date-time
        forward_to:
          type:
            - string
            - 'null'
        forward_to_enabled:
          type: boolean
        forward_to_formatted:
          type:
            - string
            - 'null'
        id:
          type: string
        is_group_number:
          type: boolean
        is_premium:
          type: boolean
        is_verified:
          type: boolean
        label:
          type: string
        last_billed_price:
          type:
            - number
            - 'null'
          format: double
        mms_enabled:
          type: boolean
        next_billing_on:
          type:
            - string
            - 'null'
          format: date-time
        number:
          type: string
        number_formatted:
          type: string
        organization_id:
          type: string
        participants:
          type: array
          items:
            type: string
        phone_numbers:
          type: array
          items:
            type: string
        phone_numbers_formatted:
          type: array
          items:
            type: string
        press_1_to_accept:
          type: boolean
        sms_enabled:
          type: boolean
        supports_mms_to_countries:
          type: array
          items:
            type: string
        supports_sms_to_countries:
          type: array
          items:
            type: string
        type:
          $ref: '#/components/schemas/PhoneNumberType'
        user_id:
          type:
            - string
            - 'null'
        voicemail_greeting_url:
          type:
            - string
            - 'null'
        was_ported:
          type: boolean
      required:
        - address_id
        - bundle_id
        - carrier
        - carrier_type
        - country
        - date_created
        - date_updated
        - id
        - is_group_number
        - is_premium
        - is_verified
        - label
        - last_billed_price
        - mms_enabled
        - next_billing_on
        - number
        - number_formatted
        - organization_id
        - sms_enabled
        - supports_mms_to_countries
        - supports_sms_to_countries
        - type
        - user_id
      title: PhoneNumber
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: basic
    OAuth2:
      type: http
      scheme: bearer

```

## SDK Code Examples

```python phone_numbers_get_example
import requests

url = "https://api.close.com/api/v1/phone_number/id/"

response = requests.get(url, auth=("<CLOSE_API_KEY>", ""))

print(response.json())
```

```javascript phone_numbers_get_example
const url = 'https://api.close.com/api/v1/phone_number/id/';
const credentials = btoa("<CLOSE_API_KEY>:");

const options = {method: 'GET', headers: {Authorization: `Basic ${credentials}`}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go phone_numbers_get_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.close.com/api/v1/phone_number/id/"

	req, _ := http.NewRequest("GET", url, nil)

	req.SetBasicAuth("<CLOSE_API_KEY>", "")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby phone_numbers_get_example
require 'uri'
require 'net/http'

url = URI("https://api.close.com/api/v1/phone_number/id/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request.basic_auth("<CLOSE_API_KEY>", "")

response = http.request(request)
puts response.read_body
```

```java phone_numbers_get_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.close.com/api/v1/phone_number/id/")
  .basicAuth("<CLOSE_API_KEY>", "")
  .asString();
```

```php phone_numbers_get_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.close.com/api/v1/phone_number/id/', [
  'headers' => [
  ],
    'auth' => ['<CLOSE_API_KEY>', ''],
]);

echo $response->getBody();
```

```csharp phone_numbers_get_example
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://api.close.com/api/v1/phone_number/id/");
client.Authenticator = new HttpBasicAuthenticator("<CLOSE_API_KEY>", "");
var request = new RestRequest(Method.GET);

IRestResponse response = client.Execute(request);
```