The /subscribers/dashboard/sms/ endpoint is used to manage sms subscribers. The following parameters are supported on this endpoint:
| INPUT PARAMETERS | |
|
dashboard |
The resource_uri of the dashboard that contains the service to which the number is being subscribed. |
|
number |
The resource_uri of the phone number being subscribed to the service. |
|
service |
The resource_uri of the service to which the phone number is being subscribed. |
|
confirmed |
Whether or not the subscription is confirmed. |
Examples
List Subscribers (List method, GET)
curl --header "Authorization:ApiKey testuser:256ee09ded99b29036fac4de96acedb7e8af7bf7" https://www.statusdashboard.com/api/v1/subscribers/dashboard/sms/
{
"meta": {
"limit": 10,
"next": null,
"offset": 0,
"previous": null,
"total_count": 3
},
"objects": [
{
"dashboard": "/api/v1/dashboard/11/",
"confirmed": true,
"number": {
"blocked": false,
"number": "+14155554444",
"resource_uri": "/api/v1/number/1001/"
},
"resource_uri": "/api/v1/subscribers/dashboard/sms/2001/",
"service": "resource_uri": "/api/v1/service/150/"
},
{
"dashboard": "/api/v1/dashboard/11/",
"confirmed": true,
"number": {
"blocked": false,
"number": "+14155554444",
"resource_uri": "/api/v1/number/1001/"
},
"resource_uri": "/api/v1/subscribers/dashboard/sms/2002/",
"service": "resource_uri": "/api/v1/service/151/"
},
{
"dashboard": "/api/v1/dashboard/11/",
"confirmed": true,
"number": {
"blocked": false,
"number": "+14155555555",
"resource_uri": "/api/v1/number/1002/"
},
"resource_uri": "/api/v1/subscribers/dashboard/sms/2003/",
"service": "resource_uri": "/api/v1/service/152/"
}
]
}
Upon success, you'll receive back an HTTP 200 (OK) indicating that the API call succeeded.
Add a subscription (List method, POST)
curl --header "Content-Type: application/json" --header "Authorization:ApiKey testuser:256ee09ded99b29036fac4de96acedb7e8af7bf7" -X POST --data '{"dashboard": "/api/v1/dashboard/11/","number":"/api/v1/number/1001/","service":"/api/v1/service/150/","confirmed":true}' https://www.statusdashboard.com/api/v1/subscribers/dashboard/sms/
{
"dashboard": "/api/v1/dashboard/11/",
"confirmed": true,
"number": {
"blocked": false,
"number": "+14155554444",
"resource_uri": "/api/v1/number/1001/"
},
"resource_uri": "/api/v1/subscribers/dashboard/sms/2001/",
"service": "resource_uri": "/api/v1/service/150/"
}
}
Upon success, you'll receive back an HTTP 201 (created) along with details about the resource you just created.
Delete a subscription (Detail method, DELETE)
curl --header "Authorization:ApiKey testuser:256ee09ded99b29036fac4de96acedb7e8af7bf7" -X DELETE https://www.statusdashboard.com/api/v1/subscribers/dashboard/sms/2001/
Upon success, you'll receive back an HTTP 204 (No Content) indicating that the request was fulfilled but there is no data to display.