The /tag/number/ endpoint is used to view, add and remove notification tags on phone numbers.
INPUT PARAMETERS | |
number |
The resource_uri of the phone number. |
tag |
The resource_uri of the notification tag. |
Examples
List Tagged Phone Numbers (List method, GET)
curl --header "Authorization:ApiKey testuser:256ee09ded99b29036fac4de96acedb7e8af7bf7" https://www.statusdashboard.com/api/v1/tag/number/
{ "meta": { "limit": 10, "next": null, "offset": 0, "previous": null, "total_count": 1 }, "objects": [ { "number": {
"blocked": false, "number": "+14155554444", "resource_uri": "/api/v1/number/1001/" }, "resource_uri": "/api/v1/tag/number/1/", "tag": { "resource_uri": "/api/v1/tag/notification/2/", "tag_name": "Customers", "tag_value": "Banking" } } ] }
Upon success, you'll receive back an HTTP 200 (OK) indicating that the API call succeeded.
Add a Notification Tag to a Phone Number (List method, POST)
curl --header "Content-Type: application/json" --header "Authorization:ApiKey testuser:256ee09ded99b29036fac4de96acedb7e8af7bf7" -X POST --data '{"number":"+4155554444", "tag":"/api/v1/tag/notification/2/"}' https://www.statusdashboard.com/api/v1/tag/number/ { "number": {
"blocked": false, "number": "+14155554444", "resource_uri": "/api/v1/number/1/" }, "resource_uri": "/api/v1/tag/number/1/", "tag": { "resource_uri": "/api/v1/tag/notification/2/", "tag_name": "Customers", "tag_value": "Banking" } }
Upon success, you'll receive back an HTTP 201 (created) along with details about the resource you just created.
Delete a Notification Tag from a Phone Number (Detail method, DELETE)
curl --header "Authorization:ApiKey testuser:256ee09ded99b29036fac4de96acedb7e8af7bf7" -X DELETE https://www.statusdashboard.com/api/v1/tag/number/1/
Upon success, you'll receive back an HTTP 204 (No Content) indicating that the request was fulfilled but there is no data to display.