API Email Subscribers Endpoint
API / API Email Subscribers Endpoint

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

INPUT PARAMETERS

email
string

The resource_uri of the email addess to subscribe to the service.

service
string

The resource_uri of the service that the email address 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/email/

{
    "meta": {
        "limit": 10,
        "next": null,
        "offset": 0,
        "previous": null,
        "total_count": 3
    },
    "objects": [
        {
            "confirmed": true,
            "email": {
                "email": "user1@company1.com",
                "resource_uri": "/api/v1/email/1001/"
            },
            "resource_uri": "/api/v1/subscribers/email/2001/", 
            "service": {
                "description": "",
                "group": "North America DataCenter",
                "hidden": false,          
                "resource_uri": "/api/v1/service/150/",
                "service_name": "Web Site"
            }
        },
        {
            "confirmed": true,
            "email": {
                "email": "user1@company1.com",
                "resource_uri": "/api/v1/email/1001/"
            },
            "resource_uri": "/api/v1/subscribers/email/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,
            "email": {
                "email": "user2@company2.com",
                "resource_uri": "/api/v1/email/1002/"
            },
            "resource_uri": "/api/v1/subscribers/email/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 '{"email":"/api/v1/email/1001/","service":"/api/v1/service/150/","confirmed":true}' https://www.statusdashboard.com/api/v1/subscribers/email/

{
    "confirmed": true, 
    "email": {
        "email": "user1@company1.com",
        "resource_uri": "/api/v1/email/1001/"
    },
    "resource_uri": "/api/v1/subscribers/email/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/email/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.