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

# Create Phone Number

> Purchase and provision a new phone number

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.thinnest.ai/v2/phone-numbers \
    -H "Authorization: Bearer $THINNESTAI_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
    "provider": "vobiz",
    "country": "IN",
    "number_type": "local",
    "agent_id": "ag_xyz789"
  }'
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.thinnest.ai/v2/phone-numbers"
  headers = {
      "Authorization": "Bearer " + "YOUR_THINNESTAI_API_KEY",
      "Content-Type": "application/json",
  }

  payload = {
    "provider": "vobiz",
    "country": "IN",
    "number_type": "local",
    "agent_id": "ag_xyz789"
  }

  response = requests.post(url, headers=headers, json=payload)
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.thinnest.ai/v2/phone-numbers", {
    method: "POST",
    headers: {
      "Authorization": "Bearer " + "YOUR_THINNESTAI_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
    "provider": "vobiz",
    "country": "IN",
    "number_type": "local",
    "agent_id": "ag_xyz789"
  }),
  });

  const data = await response.json();
  console.log(data);
  ```

  ```go Go theme={null}
  package main

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

  func main() {
      payload := []byte(`{
    "provider": "vobiz",
    "country": "IN",
    "number_type": "local",
    "agent_id": "ag_xyz789"
  }`)
      req, _ := http.NewRequest("POST", "https://api.thinnest.ai/v2/phone-numbers", bytes.NewBuffer(payload))
      req.Header.Set("Authorization", "Bearer YOUR_THINNESTAI_API_KEY")
      req.Header.Set("Content-Type", "application/json")

      resp, err := http.DefaultClient.Do(req)
      if err != nil { panic(err) }
      defer resp.Body.Close()
      body, _ := io.ReadAll(resp.Body)
      fmt.Println(string(body))
  }
  ```
</RequestExample>

```http theme={null}
POST /v2/phone-numbers
```

## Request Body

```json theme={null}
{
  "provider": "vobiz",
  "country": "IN",
  "number_type": "local",
  "agent_id": "ag_xyz789"
}
```

## Response

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "pn_abc123",
    "number": "+919876543210",
    "provider": "vobiz",
    "status": "active",
    "agent_id": "ag_xyz789",
    "monthly_cost_inr": 150.00,
    "setup_fee_inr": 500.00,
    "created_at": "2026-03-25T10:00:00Z"
  }
  ```
</ResponseExample>
