# Complete number selection

Completes a number selection.

```http
POST https://api.pozy.ai/v1/connect/whatsapp/select-phone-number
```

- Area: Accounts & connections / Connect
- Auth: Authorization: Bearer pz_live_...

## Header parameters

- `X-Connect-Token` (string)

## Request body

Content type: `application/json`

- `profileId`, string, required
- `phoneNumberId`, string, required
- `wabaId`, string, required
- `tempToken`, string, required
- `userProfile`, object
- `redirect_url`, string

## Example request

```bash
curl -X POST "https://api.pozy.ai/v1/connect/whatsapp/select-phone-number" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "profileId": "6a0b6573846efc28aaa9a3ff",
  "phoneNumberId": "698fba0989716df44adb771f",
  "wabaId": "637a4cd33d3a96616841ce95",
  "tempToken": "string"
}'
```

```ts
const res = await fetch("https://api.pozy.ai/v1/connect/whatsapp/select-phone-number", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    profileId: "6a0b6573846efc28aaa9a3ff",
    phoneNumberId: "698fba0989716df44adb771f",
    wabaId: "637a4cd33d3a96616841ce95",
    tempToken: "string"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.post(
    "https://api.pozy.ai/v1/connect/whatsapp/select-phone-number",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "profileId": "6a0b6573846efc28aaa9a3ff",
        "phoneNumberId": "698fba0989716df44adb771f",
        "wabaId": "637a4cd33d3a96616841ce95",
        "tempToken": "string",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `message`, string
- `redirect_url`, string
- `account`, object
  - `accountId`, string
  - `platform`, string: One of `whatsapp`
  - `username`, string
  - `displayName`, string
  - `isActive`, boolean
  - `selectedPhoneNumber`, string

```json
{
  "message": "Hello from Pozy",
  "redirect_url": "https://pozy.ai/media/example-1.jpg",
  "account": {
    "accountId": "696e0b682d0a31188e7a2ba9",
    "platform": "whatsapp",
    "username": "acme",
    "displayName": "Acme",
    "isActive": true,
    "selectedPhoneNumber": "+14155550123"
  }
}
```
