curl --request GET \
--url https://api.openphone.com/v1/phone-numbers \
--header 'Authorization: <api-key>'
{
"data": [
{
"id": "PN123bc",
"groupId": "1234",
"createdAt": " '2022-01-01T00:00:00Z'",
"updatedAt": " '2022-01-01T00:00:00Z'",
"name": "My phone number",
"number": "+15555555555",
"formattedNumber": "+15555555555",
"forward": "+15555555555",
"portRequestId": "123abc",
"portingStatus": "completed",
"symbol": "🏡",
"users": [
{
"email": "<string>",
"firstName": "<string>",
"groupId": "<string>",
"id": "<string>",
"lastName": "<string>",
"role": "<string>"
}
],
"restrictions": {
"messaging": {
"CA": "unrestricted",
"US": "unrestricted",
"Intl": "unrestricted"
},
"calling": {
"CA": "unrestricted",
"US": "unrestricted",
"Intl": "unrestricted"
}
}
}
]
}
Retrieve the list of phone numbers and users associated with your OpenPhone workspace.
curl --request GET \
--url https://api.openphone.com/v1/phone-numbers \
--header 'Authorization: <api-key>'
{
"data": [
{
"id": "PN123bc",
"groupId": "1234",
"createdAt": " '2022-01-01T00:00:00Z'",
"updatedAt": " '2022-01-01T00:00:00Z'",
"name": "My phone number",
"number": "+15555555555",
"formattedNumber": "+15555555555",
"forward": "+15555555555",
"portRequestId": "123abc",
"portingStatus": "completed",
"symbol": "🏡",
"users": [
{
"email": "<string>",
"firstName": "<string>",
"groupId": "<string>",
"id": "<string>",
"lastName": "<string>",
"role": "<string>"
}
],
"restrictions": {
"messaging": {
"CA": "unrestricted",
"US": "unrestricted",
"Intl": "unrestricted"
},
"calling": {
"CA": "unrestricted",
"US": "unrestricted",
"Intl": "unrestricted"
}
}
}
]
}
Filter results to return only phone numbers associated with the specified user"s unique identifier.
"US123abc"
Success
The response is of type object
.
Was this page helpful?