Skip to content
Get started

Update a phone number

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.

Path ParametersExpand Collapse
phoneNumberId: string
formatuuid
Body ParametersJSONExpand Collapse
forwarding_number: string

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

ReturnsExpand Collapse
id: string

Unique identifier for the phone number

formatuuid
forwarding_number: string

The forwarding number after the update. Null when cleared.

phone_number: string

Phone number in E.164 format

Update a phone number

curl https://api.linqapp.com/api/partner/v3/phone_numbers/$PHONE_NUMBER_ID \
    -X PUT \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $LINQ_API_V3_API_KEY" \
    -d '{
          "forwarding_number": "+12025559999"
        }'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "phone_number": "+12025551234",
  "forwarding_number": "+12025559999"
}
{
  "error": {
    "status": 400,
    "code": 1002,
    "message": "Phone number must be in E.164 format",
    "doc_url": "https://docs.linqapp.com/error/codes/1xxx/1002/"
  },
  "success": false
}
{
  "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": 403,
    "code": 2005,
    "message": "Access denied - insufficient permissions for this resource",
    "doc_url": "https://docs.linqapp.com/error/codes/2xxx/2005/"
  },
  "success": false
}
{
  "error": {
    "status": 404,
    "code": 2001,
    "message": "Resource not found",
    "doc_url": "https://docs.linqapp.com/error/codes/2xxx/2001/"
  },
  "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
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "phone_number": "+12025551234",
  "forwarding_number": "+12025559999"
}
{
  "error": {
    "status": 400,
    "code": 1002,
    "message": "Phone number must be in E.164 format",
    "doc_url": "https://docs.linqapp.com/error/codes/1xxx/1002/"
  },
  "success": false
}
{
  "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": 403,
    "code": 2005,
    "message": "Access denied - insufficient permissions for this resource",
    "doc_url": "https://docs.linqapp.com/error/codes/2xxx/2005/"
  },
  "success": false
}
{
  "error": {
    "status": 404,
    "code": 2001,
    "message": "Resource not found",
    "doc_url": "https://docs.linqapp.com/error/codes/2xxx/2001/"
  },
  "success": false
}
{
  "error": {
    "status": 500,
    "code": 3006,
    "message": "Internal server error",
    "doc_url": "https://docs.linqapp.com/error/codes/3xxx/3006/"
  },
  "success": false
}