Notification contacts

Listing

GET /notification_contacts/

Gets the list of contacts configured for the account.

Status Codes:

Example request:

GET /api/2.0/notification_contacts/?limit=0 HTTP/1.1
Content-Type: application/json
Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "meta": {
        "limit": 0,
        "offset": 0,
        "total_count": 1
    },
    "objects": [
        {
            "email": "some_email_1@example.com",
            "main": true,
            "name": "Some Name",
            "phone": "",
            "resource_uri": "/api/2.0/notification_contacts/e13c4b8c-68c8-4163-bc00-2a43a86e5937/",
            "uuid": "e13c4b8c-68c8-4163-bc00-2a43a86e5937"
        }
    ]
}

Creating

POST /notification_contacts/

Creates a new contact.

Status Codes:

Example request:

POST /api/2.0/notification_contacts/ HTTP/1.1
Content-Type: application/json
Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop

{
    "objects": [
        {
            "email": "some_email_2@example.com",
            "name": "Some Name 2",
            "phone": "+1 123 555 1234"
        }
    ]
}

Example response:

HTTP/1.1 201 CREATED
Content-Type: application/json; charset=utf-8

{
    "objects": [
        {
            "email": "some_email_2@example.com",
            "main": null,
            "name": "Some Name 2",
            "phone": "+11235551234",
            "resource_uri": "/api/2.0/notification_contacts/0103f398-9f85-446a-a285-fe63cf9f0f28/",
            "uuid": "0103f398-9f85-446a-a285-fe63cf9f0f28"
        }
    ]
}

Editing

PUT /notification_contacts/{uuid}/

Edits a notification contact. Note that changing the main user’s email is not recommended, as if the account email changes, so will the main contact.

Status Codes:

Example request:

PUT /api/2.0/notification_contacts/0103f398-9f85-446a-a285-fe63cf9f0f28/ HTTP/1.1
Content-Type: application/json
Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop

{
    "email": "some_email_2@example.com",
    "name": "Some New Name"
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "email": "some_email_2@example.com",
    "main": null,
    "name": "Some New Name",
    "phone": "+11235551234",
    "pk": "0103f398-9f85-446a-a285-fe63cf9f0f28",
    "resource_uri": "/api/2.0/notification_contacts/0103f398-9f85-446a-a285-fe63cf9f0f28/",
    "uuid": "0103f398-9f85-446a-a285-fe63cf9f0f28"
}

Deleting

DELETE /notification_contacts/{uuid}/

Delete a notification contact. Note that you cannot delete the main contact.

Status Codes:

Example request:

DELETE /api/2.0/notification_contacts/0103f398-9f85-446a-a285-fe63cf9f0f28/ HTTP/1.1
Content-Type: application/json
Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop

Example response:

HTTP/1.1 204 NO CONTENT
Content-Type: text/html; charset=utf-8