---
title: "Update telephone number on an account"
method: PATCH
path: "/v2/partition/{partitionId}/account/{accountId}/telephonenumber/{tn}"
tags: ["Telephone Number"]
---

# Update telephone number on an account

`PATCH /v2/partition/{partitionId}/account/{accountId}/telephonenumber/{tn}`

## Request

- Base URL: `https://api.alianza.com`
- URL: `https://api.alianza.com/v2/partition/{partitionId}/account/{accountId}/telephonenumber/{tn}`
- Auth: API key in header `X-AUTH-TOKEN`
- TypeScript: <https://skmtc.dev/alianza/apis/alianza-public-api/docs/v2/partition/:partitionId/account/:accountId/telephonenumber/:tn/patch.ts> (a function with typed inputs; its response is checked against the schema)

Use to update a telephone number on an account. <span hidden>Refer <a href="tnAccount.html#patch-telephonenumber-account">here</a> for more details.</span>

## Path parameters

- `accountId` string, required
- `partitionId` string, required
- `tn` string, required

## Request body

- object: Json object containing the fragment of the <a href="#/~schema/TelephoneNumberAccountV2X">telephoneNumberAccountV2X</a> object to be updated

## Response `200`

Successful operation

- TelephoneNumberAccountV2X
  - `phoneNumber` string
  - `referenceType` 'SIP_TRUNK' | 'END_USER' | 'IVR' | 'LINE_APPEARANCE' | 'LINE_HUNTGROUP' | 'TELEPHONE' | 'VFAX' | 'BUSINESS_LINE' | 'BUSINESS_LINE_HUNT_GROUP' | 'CALL_GROUP' | 'CALL_QUEUE' | 'AUTO_ATTENDANT' | 'SPECIALTY_LINE' | 'CONTACT_CENTER': What kind of destination gets calls from this number.
  - `referenceId` string: The id of the destination which gets calls from this number. You can think of this as a variable refkey; what it points to depends on the referenceType.
  - `functionType` 'ELS' | 'TollFree' | 'TemporaryNumber' | 'SPTN'
  - `canAcceptSMS` boolean
  - `operationalStatus` 'ACTIVE' | 'STAGED'
  - `portId` string
  - `servicePackageType` 'Usage' | 'PrimaryLocalFlatRate' | 'PrimaryLocalAndDomesticLDFlatRate' | 'SecondaryLocalFlatRate' | 'SecondaryLocalAndDomesticLDFlatRate'
  - `accountId` string
  - `partitionId` string
  - `customerServiceRecord` CustomerServiceRecordX
    - `id` string
    - `firstName` string
    - `middleInitial` string
    - `lastName` string
    - `businessName` string
    - `streetNumber` string
    - `streetNumberSuffix` string
    - `preDirectional` '' | 'N' | 'NE' | 'E' | 'SE' | 'S' | 'SW' | 'W' | 'NW'
    - `streetName` string
    - `streetSuffix` string
    - `postDirectional` '' | 'N' | 'NE' | 'E' | 'SE' | 'S' | 'SW' | 'W' | 'NW'
    - `city` string
    - `state` string: A two-letter state abbreviation
    - `country` string: Alianza supports accounts in the USA and Canada.
    - `postalCode` string
    - `secondaryLocationDescription` '' | 'APARTMENT' | 'BUILDING' | 'BASEMENT' | 'DEPARTMENT' | 'FLOOR' | 'FRONT' | 'HANGER' | 'KEY' | 'LOBBY' | 'LOT' | 'LOWER' | 'OFFICE' | 'PENTHOUSE' | 'PIER' | 'REAR' | 'ROOM' | 'SIDE' | 'SLIP' | 'SPACE' | 'SUITE' | 'STOP' | 'TRAILER' | 'UNIT' | 'UPPER'
    - `unit` string
    - `customerType` 'BUSINESS' | 'RESIDENTIAL'
    - `firstNameSecondary` string
    - `blockCustomerName` boolean
    - `customerName` string
  - `carrierStatus` 'ACTIVE' | 'ACTIVATION_ON_HOLD' | 'ACTIVATION_PENDING' | 'PORT_PENDING' | 'CANCEL_PORT' | 'CANCEL_PORT_EXPIDITED' | 'DELETE_PENDING' | 'DELETED' | 'CANCEL_PORT_COMPLETE' | 'PORT_REJECTED' | 'INVENTORY' | 'INVENTORY_CLAIMED' | 'COOLDOWN' | 'RECOVERED'
  - `orderVersion` string
  - `e911Address` E911AddressX
    - `id` string
    - `firstName` string
    - `middleInitial` string
    - `lastName` string
    - `businessName` string
    - `streetNumber` string
    - `streetNumberSuffix` string
    - `preDirectional` '' | 'N' | 'NE' | 'E' | 'SE' | 'S' | 'SW' | 'W' | 'NW'
    - `streetName` string
    - `streetSuffix` string
    - `postDirectional` '' | 'N' | 'NE' | 'E' | 'SE' | 'S' | 'SW' | 'W' | 'NW'
    - `city` string
    - `state` string
    - `country` string
    - `postalCode` string
    - `secondaryLocationDescription` '' | 'APARTMENT' | 'BUILDING' | 'BASEMENT' | 'DEPARTMENT' | 'FLOOR' | 'FRONT' | 'HANGER' | 'KEY' | 'LOBBY' | 'LOT' | 'LOWER' | 'OFFICE' | 'PENTHOUSE' | 'PIER' | 'REAR' | 'ROOM' | 'SIDE' | 'SLIP' | 'SPACE' | 'SUITE' | 'STOP' | 'TRAILER' | 'UNIT' | 'UPPER'
    - `unit` string
    - `customerType` 'BUSINESS' | 'RESIDENTIAL'
    - `latitude` string: -90 through 90, 4-6 decimals
    - `longitude` string: -180 through 180, 4-6 decimals
    - `language` string: Optional, see /v2/ref/language for supported languages
  - `temporaryNumber` string
  - `directoryListing` DirectoryListingX
    - `listed` boolean
    - `type` 'ERROR' | 'LIST_PUBLISH' | 'LIST_NOT_PUBLISH' | 'NOT_LIST_NOT_PUBLISH' | 'PORTED' | 'COMPLEX': Indicates how a telephone number should be listed. <span hidden>For more information on the directory listing process, please refer <a href="directoryListing.html#overview">here</a></span>
    - `address` AddressX
      - `id` string
      - `firstName` string
      - `middleInitial` string
      - `lastName` string
      - `businessName` string
      - `streetNumber` string
      - `streetNumberSuffix` string
      - `preDirectional` '' | 'N' | 'NE' | 'E' | 'SE' | 'S' | 'SW' | 'W' | 'NW'
      - `streetName` string
      - `streetSuffix` string
      - `postDirectional` '' | 'N' | 'NE' | 'E' | 'SE' | 'S' | 'SW' | 'W' | 'NW'
      - `city` string
      - `state` string: A two-letter state abbreviation
      - `country` string: Alianza supports accounts in USA and CAN
      - `postalCode` string
      - `secondaryLocationDescription` '' | 'APARTMENT' | 'BUILDING' | 'BASEMENT' | 'DEPARTMENT' | 'FLOOR' | 'FRONT' | 'HANGER' | 'KEY' | 'LOBBY' | 'LOT' | 'LOWER' | 'OFFICE' | 'PENTHOUSE' | 'PIER' | 'REAR' | 'ROOM' | 'SIDE' | 'SLIP' | 'SPACE' | 'SUITE' | 'STOP' | 'TRAILER' | 'UNIT' | 'UPPER'
      - `unit` string
  - `assignAsCallerId` boolean
  - `byotnCarrierId` string
  - `ringType` 'StandardRing' | 'Ring1' | 'Ring2' | 'Ring3' | 'Ring4' | 'Ring5' | 'Ring6' | 'Ring7': Default ringtype for this phone
  - `carrierId` string
  - `tollFree` boolean
  - `id` string
  - `tags` string[]: Optional tags for categorizing the telephone number (e.g., location, service type). Tags are stored as attributes in the Attribute Service. Format is lowercase with hyphens replacing spaces. Maximum 10 tags per number.

## Other responses

- `400`: Invalid JSON fragment
- `401`: Unauthorized
- `404`: PartitionId, AccountId, or MacAddress is not found

---

[API](https://skmtc.dev/alianza/apis/alianza-public-api.md) - [All operations](https://skmtc.dev/alianza/apis/alianza-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/alianza/apis/alianza-public-api/revisions/7223246c352c?raw)
