import { CommuneClient } from 'commune-ai';
const commune = new CommuneClient({ apiKey: process.env.COMMUNE_API_KEY });
const phoneNumber = await commune.phoneNumbers.get('pn_01abc123');
console.log(phoneNumber.number); // +18005550001
console.log(phoneNumber.status); // active
from commune import CommuneClient
client = CommuneClient()
phone_number = client.phone_numbers.get("pn_01abc123")
print(phone_number.number) # +18005550001
print(phone_number.status) # active
get_phone_number(id="pn_01abc123")
curl https://api.commune.email/v1/phone-numbers/pn_01abc123 \
-H "Authorization: Bearer comm_..."
commune phone-numbers get pn_01abc123
{
"data": {
"id": "pn_01abc123",
"number": "+18005550001",
"numberType": "tollfree",
"friendlyName": "Support Line",
"country": "US",
"capabilities": {
"sms": true,
"mms": true,
"voice": true
},
"status": "active",
"allowList": [],
"blockList": [],
"creditCostPerMonth": 150,
"autoReply": null,
"createdAt": "2026-02-01T00:00:00.000Z",
"updatedAt": "2026-02-25T10:00:00.000Z"
}
}
{
"error": "Phone number not found"
}
Phone Numbers
Get Phone Number
Retrieve a single phone number by its ID.
GET
/
v1
/
phone-numbers
/
{id}
import { CommuneClient } from 'commune-ai';
const commune = new CommuneClient({ apiKey: process.env.COMMUNE_API_KEY });
const phoneNumber = await commune.phoneNumbers.get('pn_01abc123');
console.log(phoneNumber.number); // +18005550001
console.log(phoneNumber.status); // active
from commune import CommuneClient
client = CommuneClient()
phone_number = client.phone_numbers.get("pn_01abc123")
print(phone_number.number) # +18005550001
print(phone_number.status) # active
get_phone_number(id="pn_01abc123")
curl https://api.commune.email/v1/phone-numbers/pn_01abc123 \
-H "Authorization: Bearer comm_..."
commune phone-numbers get pn_01abc123
{
"data": {
"id": "pn_01abc123",
"number": "+18005550001",
"numberType": "tollfree",
"friendlyName": "Support Line",
"country": "US",
"capabilities": {
"sms": true,
"mms": true,
"voice": true
},
"status": "active",
"allowList": [],
"blockList": [],
"creditCostPerMonth": 150,
"autoReply": null,
"createdAt": "2026-02-01T00:00:00.000Z",
"updatedAt": "2026-02-25T10:00:00.000Z"
}
}
{
"error": "Phone number not found"
}
import { CommuneClient } from 'commune-ai';
const commune = new CommuneClient({ apiKey: process.env.COMMUNE_API_KEY });
const phoneNumber = await commune.phoneNumbers.get('pn_01abc123');
console.log(phoneNumber.number); // +18005550001
console.log(phoneNumber.status); // active
from commune import CommuneClient
client = CommuneClient()
phone_number = client.phone_numbers.get("pn_01abc123")
print(phone_number.number) # +18005550001
print(phone_number.status) # active
get_phone_number(id="pn_01abc123")
curl https://api.commune.email/v1/phone-numbers/pn_01abc123 \
-H "Authorization: Bearer comm_..."
commune phone-numbers get pn_01abc123
{
"data": {
"id": "pn_01abc123",
"number": "+18005550001",
"numberType": "tollfree",
"friendlyName": "Support Line",
"country": "US",
"capabilities": {
"sms": true,
"mms": true,
"voice": true
},
"status": "active",
"allowList": [],
"blockList": [],
"creditCostPerMonth": 150,
"autoReply": null,
"createdAt": "2026-02-01T00:00:00.000Z",
"updatedAt": "2026-02-25T10:00:00.000Z"
}
}
{
"error": "Phone number not found"
}
Path Parameters
string
required
The phone number ID. Format:
pn_...Response
object
The phone number record.
Hide properties
Hide properties
string
Unique phone number ID. Format:
pn_...string
Phone number in E.164 format.
string
One of:
local, tollfree, shortcode.string | null
Display name for this number.
string
ISO-3166 country code.
string
One of:
active, released, suspended_non_payment.string[]
E.164 numbers in the allow list. Empty = all allowed.
string[]
E.164 numbers in the block list.
number
Monthly credit cost (150).
object | null
string
ISO 8601 timestamp.
string
ISO 8601 timestamp.
Last modified on March 19, 2026
Was this page helpful?

