Numbers
List phone numbers
Get Started
SDKs
API Reference
- Accounts
- Numbers
- Faxes
- Files
- Outbox
- Webhooks
- Shop
Numbers
List phone numbers
List your purchased/assigned phone numbers. For corporate members all assigned numbers will be returned, while for the corporate admin, all purchased numbers. (Permitted scopes: fax:all:read, fax:numbers:read)
GET
/
accounts
/
{user_id}
/
numbers
const axios = require('axios');
const NumbersApiFp = require('@alohi/faxplus-api').NumbersApiFp;
const Configuration = require('@alohi/faxplus-api').Configuration;
const config = new Configuration({
accessToken: accessToken,
basePath: 'https://restapi.fax.plus/v3',
// Header required only when using the OAuth2 token scheme
baseOptions: {
headers: {
"x-fax-clientid": clientId,
}
}
});
async function listNumbers() {
const reqParams = {
"userId": '23415ufasx8df7'
}
const req = await NumbersApiFp(config).listNumbers(reqParams);
const resp = await req(axios);
}
listNumbers()
{
"numbers": [
{
"acquired_date": "2017-07-31 09:20:06",
"assigned_to": [
"7724157c0974440293e45877c57f0703"
],
"expiration_date": null,
"id": "e6e68ef87f0b8768ebacdb218994bfe7",
"is_canceled": false,
"notifications": [
{
"email": true,
"push_notification": true,
"type": "voicemail"
},
{
"email": true,
"push_notification": true,
"type": "receive_fax"
},
{
"email": true,
"push_notification": true,
"type": "announcement"
},
{
"email": true,
"push_notification": true,
"type": "callforward"
}
],
"number": "+16699990000",
"owner_id": "7724157c0974440293e45877c57f0703",
"status": "active"
}
]
}
const axios = require('axios');
const NumbersApiFp = require('@alohi/faxplus-api').NumbersApiFp;
const Configuration = require('@alohi/faxplus-api').Configuration;
const config = new Configuration({
accessToken: accessToken,
basePath: 'https://restapi.fax.plus/v3',
// Header required only when using the OAuth2 token scheme
baseOptions: {
headers: {
"x-fax-clientid": clientId,
}
}
});
async function listNumbers() {
const reqParams = {
"userId": '23415ufasx8df7'
}
const req = await NumbersApiFp(config).listNumbers(reqParams);
const resp = await req(axios);
}
listNumbers()
Authorizations
OAuth2 Authorization Grant
Path Parameters
ID of the user to get numbers for
Response
200
application/json
Response containing a list of number objects
List of numbers
Date and time at which the number was acquired
IDs of the user to whom this number is assigned
Number ID
Fax number
Number owner ID
Status of your fax number e.g. active, inactive.
Available options:
waiting_verification
, active
Number expiration date, might be blank
True if number is canceled but not yet deleted
const axios = require('axios');
const NumbersApiFp = require('@alohi/faxplus-api').NumbersApiFp;
const Configuration = require('@alohi/faxplus-api').Configuration;
const config = new Configuration({
accessToken: accessToken,
basePath: 'https://restapi.fax.plus/v3',
// Header required only when using the OAuth2 token scheme
baseOptions: {
headers: {
"x-fax-clientid": clientId,
}
}
});
async function listNumbers() {
const reqParams = {
"userId": '23415ufasx8df7'
}
const req = await NumbersApiFp(config).listNumbers(reqParams);
const resp = await req(axios);
}
listNumbers()
{
"numbers": [
{
"acquired_date": "2017-07-31 09:20:06",
"assigned_to": [
"7724157c0974440293e45877c57f0703"
],
"expiration_date": null,
"id": "e6e68ef87f0b8768ebacdb218994bfe7",
"is_canceled": false,
"notifications": [
{
"email": true,
"push_notification": true,
"type": "voicemail"
},
{
"email": true,
"push_notification": true,
"type": "receive_fax"
},
{
"email": true,
"push_notification": true,
"type": "announcement"
},
{
"email": true,
"push_notification": true,
"type": "callforward"
}
],
"number": "+16699990000",
"owner_id": "7724157c0974440293e45877c57f0703",
"status": "active"
}
]
}