Skip to content
Get started

List phone numbers

client.PhoneNumbers.List(ctx) (*PhoneNumberListResponse, error)
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.

ReturnsExpand Collapse
type PhoneNumberListResponse struct{…}
PhoneNumbers []PhoneNumberListResponsePhoneNumber

List of phone numbers assigned to the partner

ID string

Unique identifier for the phone number

formatuuid
DeprecatedHealthStatus PhoneNumberListResponsePhoneNumberHealthStatus

[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 for what each status means and how to react.

DocURL string

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

formaturi
Status string

Current reputation of this phone line.

  • HEALTHY — The line is in good standing. Send normally.
  • AT_RISK — The line’s overall engagement is trending down. Slow the line’s send pace and review your messaging patterns.
  • CRITICAL — Strong signals that messages from this line aren’t landing well. Pause outbound on the line until it recovers.

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

One of the following:
const PhoneNumberListResponsePhoneNumberHealthStatusStatusHealthy PhoneNumberListResponsePhoneNumberHealthStatusStatus = "HEALTHY"
const PhoneNumberListResponsePhoneNumberHealthStatusStatusAtRisk PhoneNumberListResponsePhoneNumberHealthStatusStatus = "AT_RISK"
const PhoneNumberListResponsePhoneNumberHealthStatusStatusCritical PhoneNumberListResponsePhoneNumberHealthStatusStatus = "CRITICAL"
PhoneNumber string

Phone number in E.164 format

Reputation PhoneNumberListResponsePhoneNumberReputation

[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 for what each status means and how to react.

DocURL string

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

formaturi
Status string

Current reputation of this phone line.

  • HEALTHY — The line is in good standing. Send normally.
  • AT_RISK — The line’s overall engagement is trending down. Slow the line’s send pace and review your messaging patterns.
  • CRITICAL — Strong signals that messages from this line aren’t landing well. Pause outbound on the line until it recovers.

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

One of the following:
const PhoneNumberListResponsePhoneNumberReputationStatusHealthy PhoneNumberListResponsePhoneNumberReputationStatus = "HEALTHY"
const PhoneNumberListResponsePhoneNumberReputationStatusAtRisk PhoneNumberListResponsePhoneNumberReputationStatus = "AT_RISK"
const PhoneNumberListResponsePhoneNumberReputationStatusCritical PhoneNumberListResponsePhoneNumberReputationStatus = "CRITICAL"
ForwardingNumber stringOptional

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

List phone numbers

package main

import (
  "context"
  "fmt"

  "github.com/linq-team/linq-go"
  "github.com/linq-team/linq-go/option"
)

func main() {
  client := linqgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  phoneNumbers, err := client.PhoneNumbers.List(context.TODO())
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", phoneNumbers.PhoneNumbers)
}
{
  "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"
      }
    }
  ]
}
{
  "error": {
    "status": 401,
    "code": 2004,
    "message": "Unauthorized - missing or invalid authentication token",
    "doc_url": "https://docs.linqapp.com/error/codes/2xxx/2004/"
  },
  "success": false
}
{
  "error": {
    "status": 500,
    "code": 3006,
    "message": "Internal server error",
    "doc_url": "https://docs.linqapp.com/error/codes/3xxx/3006/"
  },
  "success": false
}
Returns Examples
{
  "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"
      }
    }
  ]
}
{
  "error": {
    "status": 401,
    "code": 2004,
    "message": "Unauthorized - missing or invalid authentication token",
    "doc_url": "https://docs.linqapp.com/error/codes/2xxx/2004/"
  },
  "success": false
}
{
  "error": {
    "status": 500,
    "code": 3006,
    "message": "Internal server error",
    "doc_url": "https://docs.linqapp.com/error/codes/3xxx/3006/"
  },
  "success": false
}