API SMS Subscribers Endpoint
API / API SMS Subscribers Endpoint

The /subscribers/sms/ endpoint is used to manage sms subscribers. The following parameters are supported on this endpoint:

INPUT PARAMETERS

number
string

The resource_uri of the phone number to subscribe to the service.

service
string

The resource_uri of the service that the phone number is being subscribed to.

confirmed
boolean
(optional)

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/sms/

{
    "meta": {
        "limit": 10,
        "next": null,
        "offset": 0,
        "previous": null,
        "total_count": 3
    },
    "objects": [
        {
            "confirmed": true,
            "number": {
                "blocked": false,
                "number": "+14155554444",
                "resource_uri": "/api/v1/number/1001/"
            },
            "resource_uri": "/api/v1/subscribers/sms/2001/", 
            "service": {
                "description": "",
                "group": "North America DataCenter",
                "hidden": false,          
                "resource_uri": "/api/v1/service/150/",
                "service_name": "Web Site"
            }
        },
        {
            "confirmed": true,
            "number": {
                "blocked": false,
                "number": "+14155554444",
                "resource_uri": "/api/v1/number/1001/"
            },
            "resource_uri": "/api/v1/subscribers/sms/2002/", 
            "service": {
                "description": "http://owa.domain.com",
                "group": "North America DataCenter",
                "hidden": false,
                "resource_uri": "/api/v1/service/151/",
                "service_name": "Exchange Server"
            }
        },
        {
            "confirmed": true,
            "number": {
                "blocked": false,
                "number": "+14155555555",
                "resource_uri": "/api/v1/number/1002/"
            },
            "resource_uri": "/api/v1/subscribers/sms/2003/", 
            "service": {
                "description": "",
                "group": "North America DataCenter",
                "hidden": false,
                "resource_uri": "/api/v1/service/152/",
                "service_name": "File Server"
            }
        }
    ]
}

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 '{"number":"/api/v1/number/1001/","service":"/api/v1/service/150/","confirmed":true}' https://www.statusdashboard.com/api/v1/subscribers/sms/

{
    "confirmed": true, 
    "number": {
        "blocked": false,
        "number": "+14155554444",
        "resource_uri": "/api/v1/number/1001/"
    },
    "resource_uri": "/api/v1/subscribers/sms/2001/", 
    "service": {
        "description": "",
        "group": "North America DataCenter",
        "hidden": false,          
        "resource_uri": "/api/v1/service/150/",
        "service_name": "Web Site"
    }
}

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/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.

Still have questions?  Contact our support team.  We're always happy to help with any questions you might have.