Notifications

List notifications

List notifications on a site.

GET /api/site/{id}/notifications

Example request :

curl "https://cloud.boxydev.com/api/site/1/notifications" \
    -H "Authorization: Bearer {token}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json"

Example response :

{
    "data": [
        {
            "id": 1,
            "name": "Discord",
            "type": "discord",
            "meta": {
                "webhook": "..."
            }
        },
        {
            "id": 2,
            "name": "Fiorella",
            "type": "email",
            "meta": {
                "email": "..."
            }
        }
    ],
    "links": {
        "first": "https://cloud.boxydev.com/api/site/1/notifications?page=1",
        "last": "https://cloud.boxydev.com/api/site/1/notifications?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://cloud.boxydev.com/api/site/1/notifications",
        "per_page": 20,
        "to": 1,
        "total": 1
    }
}

Update notifications

Update notifications on a site.

PUT /api/site/{id}/notifications

You can get notification channels list here. You can manage all your notification channels on your account.

Parameters :

Parameter Description
channels.* The notification channels to use when site is deployed.

Example request :

curl "https://cloud.boxydev.com/api/site/1/notifications" \
    -H "Authorization: Bearer {token}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -d '{
        "channels": [1, 2]
    }'