# Create a hosted KYC link

Creates a hosted KYC link.

```http
POST https://api.pozy.ai/v1/phone-numbers/kyc/share
```

- Area: Phone & voice / Phone Numbers
- Auth: Authorization: Bearer pz_live_...
- Not available yet: calls return 403 feature_not_available

## Request body

Content type: `application/json`

- `profileId`, string, required
- `country`, string, required: 2 to 2 characters
- `areaCode`, string: Matches `^\d{1,4}$`
- `language`, string: One of `en`, `es`, `pt-BR`
- `branding`, object
  - `companyName`, string: Up to 60 characters
  - `logoUrl`, string (URL)
  - `brandColor`, string: Matches `^#[0-9a-fA-F]{6}$`
- `redirect_url`, string (URL)

## Example request

```bash
curl -X POST "https://api.pozy.ai/v1/phone-numbers/kyc/share" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "profileId": "6a0b6573846efc28aaa9a3ff",
  "country": "US"
}'
```

```ts
const res = await fetch("https://api.pozy.ai/v1/phone-numbers/kyc/share", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    profileId: "6a0b6573846efc28aaa9a3ff",
    country: "US"
  }),
});
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/phone-numbers/kyc/share",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "profileId": "6a0b6573846efc28aaa9a3ff",
        "country": "US",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `url`, string
- `token`, string
- `expiresAt`, string (date-time)

```json
{
  "url": "https://pozy.ai/media/example-1.jpg",
  "token": "string",
  "expiresAt": "2026-10-02T09:00:00.000Z"
}
```
