# Phone Numbers

## List phone numbers

`client.phoneNumbers.list(RequestOptionsoptions?): PhoneNumberListResponse`

**get** `/v3/phone_numbers`

Returns all phone numbers assigned to the authenticated partner.
Use this endpoint to discover which phone numbers are available for
use as the `from` field when creating a chat, listing chats, or sending a voice memo.

### Returns

- `PhoneNumberListResponse`

  - `phone_numbers: Array<PhoneNumber>`

    List of phone numbers assigned to the partner

    - `id: string`

      Unique identifier for the phone number

    - `health_status: HealthStatus`

      **[BETA]** Current reputation for a phone line. Always present — lines start at `HEALTHY` and may shift based on aggregate engagement and delivery signals across all conversations on the line.

      Unlike chat health, line reputation does not include `opted_out` — opt-out applies to individual recipients, not the whole line.

      See the [Phone Reputation guide](/guides/phone-numbers/phone-reputation) for what each status means and how to react.

      - `doc_url: string`

        Deep-link to the relevant section of the Phone Reputation guide for this status.

      - `status: "HEALTHY" | "AT_RISK" | "CRITICAL"`

        Current reputation of this phone line as assessed by risk-service.

        - `HEALTHY` — No elevated risk detected.
        - `AT_RISK` — Elevated risk indicators present; consider reducing send volume or reviewing messaging patterns.
        - `CRITICAL` — High risk; further sending may result in line flagging or restriction.

        Defaults to `HEALTHY` for lines that have not yet been scored.

        - `"HEALTHY"`

        - `"AT_RISK"`

        - `"CRITICAL"`

    - `phone_number: string`

      Phone number in E.164 format

    - `reputation: Reputation`

      **[BETA]** Current reputation for a phone line. Always present — lines start at `HEALTHY` and may shift based on aggregate engagement and delivery signals across all conversations on the line.

      Unlike chat health, line reputation does not include `opted_out` — opt-out applies to individual recipients, not the whole line.

      See the [Phone Reputation guide](/guides/phone-numbers/phone-reputation) for what each status means and how to react.

      - `doc_url: string`

        Deep-link to the relevant section of the Phone Reputation guide for this status.

      - `status: "HEALTHY" | "AT_RISK" | "CRITICAL"`

        Current reputation of this phone line as assessed by risk-service.

        - `HEALTHY` — No elevated risk detected.
        - `AT_RISK` — Elevated risk indicators present; consider reducing send volume or reviewing messaging patterns.
        - `CRITICAL` — High risk; further sending may result in line flagging or restriction.

        Defaults to `HEALTHY` for lines that have not yet been scored.

        - `"HEALTHY"`

        - `"AT_RISK"`

        - `"CRITICAL"`

    - `forwarding_number?: string | null`

      The forwarding number associated with this phone number, in E.164 format. Null when no forwarding number is configured.

### 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 phoneNumbers = await client.phoneNumbers.list();

console.log(phoneNumbers.phone_numbers);
```

#### Response

```json
{
  "phone_numbers": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "phone_number": "+12025551234",
      "forwarding_number": "+12025559999",
      "reputation": {
        "status": "HEALTHY",
        "doc_url": "https://docs.linqapp.com/guides/phone-numbers/phone-reputation#healthy"
      },
      "health_status": {
        "status": "HEALTHY",
        "doc_url": "https://docs.linqapp.com/guides/phone-numbers/phone-reputation#healthy"
      }
    },
    {
      "id": "550e8400-e29b-41d4-a716-446655440001",
      "phone_number": "+12025559876",
      "forwarding_number": null,
      "reputation": {
        "status": "AT_RISK",
        "doc_url": "https://docs.linqapp.com/guides/phone-numbers/phone-reputation#at-risk"
      },
      "health_status": {
        "status": "AT_RISK",
        "doc_url": "https://docs.linqapp.com/guides/phone-numbers/phone-reputation#at-risk"
      }
    }
  ]
}
```

## Update a phone number

`client.phoneNumbers.update(stringphoneNumberID, PhoneNumberUpdateParamsbody, RequestOptionsoptions?): PhoneNumberUpdateResponse`

**put** `/v3/phone_numbers/{phoneNumberId}`

Updates the forwarding number for a phone number. The forwarding number is where inbound calls will be forwarded to.

Pass an empty string to clear the forwarding number.

### Parameters

- `phoneNumberID: string`

- `body: PhoneNumberUpdateParams`

  - `forwarding_number: string | null`

    The forwarding number in E.164 format. Set to null or empty string to clear.

### Returns

- `PhoneNumberUpdateResponse`

  - `id: string`

    Unique identifier for the phone number

  - `forwarding_number: string | null`

    The forwarding number after the update. Null when cleared.

  - `phone_number: string`

    Phone number in E.164 format

### 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 phoneNumber = await client.phoneNumbers.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
  forwarding_number: '+12025559999',
});

console.log(phoneNumber.id);
```

#### Response

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "phone_number": "+12025551234",
  "forwarding_number": "+12025559999"
}
```

## Domain Types

### Phone Number List Response

- `PhoneNumberListResponse`

  - `phone_numbers: Array<PhoneNumber>`

    List of phone numbers assigned to the partner

    - `id: string`

      Unique identifier for the phone number

    - `health_status: HealthStatus`

      **[BETA]** Current reputation for a phone line. Always present — lines start at `HEALTHY` and may shift based on aggregate engagement and delivery signals across all conversations on the line.

      Unlike chat health, line reputation does not include `opted_out` — opt-out applies to individual recipients, not the whole line.

      See the [Phone Reputation guide](/guides/phone-numbers/phone-reputation) for what each status means and how to react.

      - `doc_url: string`

        Deep-link to the relevant section of the Phone Reputation guide for this status.

      - `status: "HEALTHY" | "AT_RISK" | "CRITICAL"`

        Current reputation of this phone line as assessed by risk-service.

        - `HEALTHY` — No elevated risk detected.
        - `AT_RISK` — Elevated risk indicators present; consider reducing send volume or reviewing messaging patterns.
        - `CRITICAL` — High risk; further sending may result in line flagging or restriction.

        Defaults to `HEALTHY` for lines that have not yet been scored.

        - `"HEALTHY"`

        - `"AT_RISK"`

        - `"CRITICAL"`

    - `phone_number: string`

      Phone number in E.164 format

    - `reputation: Reputation`

      **[BETA]** Current reputation for a phone line. Always present — lines start at `HEALTHY` and may shift based on aggregate engagement and delivery signals across all conversations on the line.

      Unlike chat health, line reputation does not include `opted_out` — opt-out applies to individual recipients, not the whole line.

      See the [Phone Reputation guide](/guides/phone-numbers/phone-reputation) for what each status means and how to react.

      - `doc_url: string`

        Deep-link to the relevant section of the Phone Reputation guide for this status.

      - `status: "HEALTHY" | "AT_RISK" | "CRITICAL"`

        Current reputation of this phone line as assessed by risk-service.

        - `HEALTHY` — No elevated risk detected.
        - `AT_RISK` — Elevated risk indicators present; consider reducing send volume or reviewing messaging patterns.
        - `CRITICAL` — High risk; further sending may result in line flagging or restriction.

        Defaults to `HEALTHY` for lines that have not yet been scored.

        - `"HEALTHY"`

        - `"AT_RISK"`

        - `"CRITICAL"`

    - `forwarding_number?: string | null`

      The forwarding number associated with this phone number, in E.164 format. Null when no forwarding number is configured.

### Phone Number Update Response

- `PhoneNumberUpdateResponse`

  - `id: string`

    Unique identifier for the phone number

  - `forwarding_number: string | null`

    The forwarding number after the update. Null when cleared.

  - `phone_number: string`

    Phone number in E.164 format
