## Get an available sending number

`client.availableNumber.retrieve(AvailableNumberRetrieveParamsquery?, RequestOptionsoptions?): AvailableNumberRetrieveResponse`

**get** `/v3/available_number`

Returns the best available line (E.164) to send from, applying smart
number assignment. Optionally pass `to` recipients to make the choice
"sticky" — reusing the line an existing chat with those recipients is
already on. Without `to`, the best healthy line is chosen.

This is advisory: it does not reserve the line or change selection state.
Pass the returned `phone_number` as `from` when you create the chat to
guarantee the same line.

Also returns `vcf_url`: a time-limited link to a vCard (`.vcf`) for the
chosen line, carrying its contact card (name/photo) with the chosen
number as the primary `TEL` and the partner's other healthy lines as
backups. Share it with recipients so they can save the line as a contact.

### Parameters

- `query: AvailableNumberRetrieveParams`

  - `to?: Array<string>`

    Recipient handles (E.164 or email) the message is destined for. When
    provided, an existing chat with these recipients makes the choice
    sticky. Repeat the parameter for multiple recipients.

### Returns

- `AvailableNumberRetrieveResponse`

  The line smart number assignment selected, plus a shareable vCard.

  - `phone_number: string`

    The selected sending line in E.164 format.

  - `vcf_url: string`

    Time-limited link to a vCard (`.vcf`) for the selected line. The card
    carries the line's contact details with the selected number as the
    primary `TEL` and the partner's other healthy lines as backups. The
    link expires; re-call this endpoint to mint a fresh one.

### Example

```typescript
import LinqAPIV3 from '@linqapp/sdk';

const client = new LinqAPIV3({
  apiKey: process.env['LINQ_API_V3_API_KEY'], // This is the default and can be omitted
});

const availableNumber = await client.availableNumber.retrieve();

console.log(availableNumber.phone_number);
```

#### Response

```json
{
  "phone_number": "+12025551234",
  "vcf_url": "https://s3.us-east-1.amazonaws.com/linq-attachments/vcf/9716d5c5/12025551234.vcf?X-Amz-Signature=..."
}
```
