List number area codes
List number area codes: listNumberAreaCodes in the TypeScript, Python, Rust and Go clients.
GET /v1/projects/{id}/platforms/sms/numbers/area-codes
Lists current provider coverage for US local numbers, sorted and deduplicated. Coverage does not guarantee inventory carrying every required feature. New area-specific purchases must use a listed code; accepted purchases keep waiting if coverage later changes. Requires platforms:read for the path project.
photon.projects.platforms.listNumberAreaCodes(input: ListNumberAreaCodesInput, options?: RequestOptions): Promise<ListNumberAreaCodesOutput>photon.projects.platforms.list_number_area_codes(input: ListNumberAreaCodesInput, *, options: RequestOptions | None = None) -> models.ListNumberAreaCodesResponseclient.list_number_area_codes(id: String, country_code: String).await -> Result<ResponseValue<types::ListNumberAreaCodesResponse>, Error<ListNumberAreaCodesError>>client.Projects.Platforms.ListNumberAreaCodes(ctx context.Context, params *ListNumberAreaCodesParams, opts ...RequestOption) (*ListNumberAreaCodesResponse, error)import { Photon } from "@photon-ai/api";
const photon = new Photon({
headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.platforms.listNumberAreaCodes({
path: {
id: "id",
},
query: {
countryCode: "US",
},
});import os
from photon_api import Photon
from photon_api.rpc_generated import ListNumberAreaCodesInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.projects.platforms.list_number_area_codes(
ListNumberAreaCodesInput.model_validate({
"path": {
"id": "id",
},
"query": {
"countryCode": "US",
},
})
)use photon_ai_api::{Credential, PhotonClientBuilder, SecretString};
let token = std::env::var("PHOTON_API_TOKEN")?;
let client = PhotonClientBuilder::new()
.credential("accountServiceKey", Credential::Bearer(SecretString::from(token)))
.build()?;
let result = client
.list_number_area_codes("id".to_owned(), "US".to_owned())
.await
.map_err(|error| format!("{error:?}"))?
.into_inner();import (
"context"
"os"
photonapi "github.com/photon-hq/api/packages/go"
)
ctx := context.Background()
client := photonapi.NewClient(photonapi.WithAPIKey(os.Getenv("PHOTON_API_TOKEN")))
result, err := client.Projects.Platforms.ListNumberAreaCodes(ctx, &photonapi.ListNumberAreaCodesParams{
ID: "id",
CountryCode: "US",
})
if err != nil {
return err
}
_ = result{
"areaCodes": [
"string"
],
"countryCode": "US"
}Parameters
Selects the API contract date. Without it, the request is served as 2026-07-01.
Returns
200 Current area-code coverage. An empty list is a successful coverage read, not an upstream failure. ListNumberAreaCodesResponse
Headers: Cache-Control, ETag, Photon-Version. The raw response carries these headers; see Raw responses.
304 Not Modified. Sent only when If-None-Match matches the ETag of an earlier 200 response for the same representation; no body. No body.
Headers: Cache-Control, ETag, Photon-Version. The raw response carries these headers; see Raw responses.