Skip to main content

List SMS Channels

Agent Skill

Automate this endpoint with an AI agent using the 2chat-sms skill:

npx skills add 2ChatCo/agent-skills -s 2chat-sms

List the SMS channels (numbers) connected to your 2Chat account, with pagination.

Endpoint

GET https://api.p.2chat.io/open/sms/channels

Authentication

Include your API key in the X-User-API-Key header. Learn more about authentication.

Query parameters

ParameterDescriptionExample
page_numberZero-based page index to return. Default is 00
results_per_pageNumber of results per page, between 1 and 200. Default is 20050

Invocation

curl -L -G 'https://api.p.2chat.io/open/sms/channels?page_number=0&results_per_page=50' \
--header 'X-User-API-Key: your_api_key_here'

Response

Success (HTTP 200 OK)

{
"success": true,
"count": 1,
"page": 0,
"channels": [
{
"uuid": "SMS9a3f1c20-4e7b-4d8a-9c61-2f5b8d0a4e13",
"account_uuid": "ACC7b2e9d41-3c8a-4f02-9b1d-6e5a4c3f2a10",
"voip_number_setup_uuid": "DID3e1b7a90-2f64-4c8d-bb15-9a0e2d7f4c83",
"phone_number": "+13057654321",
"friendly_name": "Support line",
"iso_country_code": "US",
"supports_sms_in": true,
"supports_sms_out": true,
"enabled": true,
"created_at": "2026-05-12T14:03:21Z",
"updated_at": "2026-06-01T09:18:44Z"
}
]
}
FieldDescription
successtrue when the request was successful
countTotal number of SMS channels on your account (across all pages)
pageThe zero-based page index returned
channelsArray of SMS channel objects (see below)

Each channel object contains:

FieldDescriptionExample
uuidUnique identifier of the SMS channel (prefixed SMS)SMS9a3f1c20-4e7b-4d8a-9c61-2f5b8d0a4e13
account_uuidUUID of the account the channel belongs toACC7b2e9d41-3c8a-4f02-9b1d-6e5a4c3f2a10
voip_number_setup_uuidUUID of the underlying virtual number setup (prefixed DID)DID3e1b7a90-2f64-4c8d-bb15-9a0e2d7f4c83
phone_numberThe channel's phone number in E.164 format+13057654321
friendly_nameThe friendly name you chose for the numberSupport line
iso_country_codeTwo-letter country code of the numberUS
supports_sms_inWhether the channel can receive inbound SMStrue
supports_sms_outWhether the channel can send outbound SMStrue
enabledWhether the channel is enabled on 2Chattrue
created_atWhen the channel was created (UTC)2026-05-12T14:03:21Z
updated_atWhen the channel was last updated (UTC)2026-06-01T09:18:44Z

Error

{
"error": true,
"error_message": "Description of what went wrong"
}
FieldDescription
errortrue when the request failed
error_messageA description of what went wrong