The /number/ endpoint is used to manage phone numbers. The following parameters are supported on this endpoint:
| INPUT PARAMETERS | |
|
number |
A valid country code and phone number in the following format: +14155555555. |
Examples
List Phone Numbers (List method, GET)
curl --header "Authorization:ApiKey testuser:256ee09ded99b29036fac4de96acedb7e8af7bf7" https://www.statusdashboard.com/api/v1/number/
{
"meta": {
"limit": 10,
"next": null,
"offset": 0,
"previous": null,
"total_count": 2
},
"objects": [
{
"blocked": false,
"number": "+14155554444",
"resource_uri": "/api/v1/number/1001/"
},
{
"blocked": false,
"number": "+14155555555",
"resource_uri": "/api/v1/number/1002/"
}
]
}
Upon success, you'll receive back an HTTP 200 (OK) indicating that the API call succeeded.
Add A Phone Number (List method, POST)
curl --header "Content-Type: application/json" --header "Authorization:ApiKey testuser:256ee09ded99b29036fac4de96acedb7e8af7bf7" -X POST --data '{"number":"+14155555556"}' https://www.statusdashboard.com/api/v1/number/
{
"blocked": false,
"number": "+14155555556",
"resource_uri": "/api/v1/number/1003"
}
Upon success, you'll receive back an HTTP 201 (created) along with details about the resource you just created.
Delete A Phone Number (Detail method, DELETE)
curl --header "Authorization:ApiKey testuser:256ee09ded99b29036fac4de96acedb7e8af7bf7" -X DELETE https://www.statusdashboard.com/api/v1/number/1003/
Upon success, you'll receive back an HTTP 204 (No Content) indicating that the request was fulfilled but there is no data to display.