# Notifications

Below are endpoints that allow you to configure your Email and SMS notification settings for a Flock. We do also have a section for Webhooks if you need to configure webhook settings.

# Emails

Receive notifications in your email inbox. Simple, yet effective.

# Add Notification Emails

POST /api/v1/flock/settings/notifications/email/add

Add a new email(s) to the notifications list.

Required Parameters

auth_token string
A valid auth token
flock_id string
A valid flock_id
addresses string
A comma separated list of valid email addresses to add

Response

A JSON structure with result indicator.

Example

curl https://EXAMPLE.canary.tools/api/v1/flock/settings/notifications/email/add \
  -d auth_token=EXAMPLE_AUTH_TOKEN \
  -d flock_id=EXAMPLE_FLOCK_ID \
  -d addresses=EXAMPLE_ADDRESSES_LIST
Copied!
1
2
3
4
Response
{
  "result": "success"
}
Copied!
1
2
3

# Check if Notification Emails are Enabled

GET /api/v1/flock/settings/notifications/email/is_enabled

Check if notification emails are enabled for a Flock.

Required Parameters

auth_token string
A valid auth token
flock_id string
A valid flock_id

Response

A JSON structure with the enabled state.

Example

curl https://EXAMPLE.canary.tools/api/v1/flock/settings/notifications/email/is_enabled \
  -d auth_token=EXAMPLE_AUTH_TOKEN \
  -d flock_id=EXAMPLE_FLOCK_ID \
  -G
Copied!
1
2
3
4
Response
{
  "is_enabled": true,
  "result": "success"
}
Copied!
1
2
3
4

# Check if Notification Emails are Global

GET /api/v1/flock/settings/notifications/email/is_global

Check if notification emails are set to Global for a Flock.

Required Parameters

auth_token string
A valid auth token
flock_id string
A valid flock_id

Response

A JSON structure with the Global state.

Example

curl https://EXAMPLE.canary.tools/api/v1/flock/settings/notifications/email/is_global \
  -d auth_token=EXAMPLE_AUTH_TOKEN \
  -d flock_id=EXAMPLE_FLOCK_ID \
  -G
Copied!
1
2
3
4
Response
{
  "is_global": true,
  "result": "success"
}
Copied!
1
2
3
4

# Disable Notification Emails

POST /api/v1/flock/settings/notifications/email/disable

Disable notification emails for a Flock.

Required Parameters

auth_token string
A valid auth token
flock_id string
A valid flock_id

Response

A JSON structure with result indicator.

Example

curl https://EXAMPLE.canary.tools/api/v1/flock/settings/notifications/email/disable \
  -d auth_token=EXAMPLE_AUTH_TOKEN \
  -d flock_id=EXAMPLE_FLOCK_ID 
Copied!
1
2
3
Response
{
  "result": "success"
}
Copied!
1
2
3

# Enable Notification Emails

POST /api/v1/flock/settings/notifications/email/enable

Enable notification emails for a Flock.

Required Parameters

auth_token string
A valid auth token
flock_id string
A valid flock_id

Response

A JSON structure with result indicator.

Example

curl https://EXAMPLE.canary.tools/api/v1/flock/settings/notifications/email/enable \
  -d auth_token=EXAMPLE_AUTH_TOKEN \
  -d flock_id=EXAMPLE_FLOCK_ID 
Copied!
1
2
3
Response
{
  "result": "success"
}
Copied!
1
2
3

# List Notification Emails

GET /api/v1/flock/settings/notifications/email

Retrieve the list of notification emails for a Flock.

Required Parameters

auth_token string
A valid auth token
flock_id string
A valid flock_id

Response

A JSON structure with the list of notification emails.

Example

curl https://EXAMPLE.canary.tools/api/v1/flock/settings/notifications/email \
  -d auth_token=EXAMPLE_AUTH_TOKEN \
  -d flock_id=EXAMPLE_FLOCK_ID \
  -G
Copied!
1
2
3
4
Response
{
  "emails": [
    "<email_address>",
    "<email_address>"
  ],
  "result": "success"
}
Copied!
1
2
3
4
5
6
7

# Operational Emails

Redirect all Device Disconnected or Reconnected alert email notifications to a different set of email addresses.

# Add Operational Notification Emails

POST /api/v1/flock/settings/notifications/operational_email/add

Add a new email(s) to the operational notifications list.

Required Parameters

auth_token string
A valid auth token
flock_id string
A valid flock_id
addresses string
A comma separated list of valid email addresses to add

Response

A JSON structure with result indicator.

Example

curl https://EXAMPLE.canary.tools/api/v1/flock/settings/notifications/operational_email/add \
  -d auth_token=EXAMPLE_AUTH_TOKEN \
  -d flock_id=EXAMPLE_FLOCK_ID \
  -d addresses=EXAMPLE_ADDRESSES_LIST
Copied!
1
2
3
4
Response
{
  "result": "success"
}
Copied!
1
2
3

# Check if Operational Notification Emails are Enabled

GET /api/v1/flock/settings/notifications/operational_email/is_enabled

Check if operational notification emails are enabled for a Flock.

Required Parameters

auth_token string
A valid auth token
flock_id string
A valid flock_id

Response

A JSON structure with the enabled state.

Example

curl https://EXAMPLE.canary.tools/api/v1/flock/settings/notifications/operational_email/is_enabled \
  -d auth_token=EXAMPLE_AUTH_TOKEN \
  -d flock_id=EXAMPLE_FLOCK_ID \
  -G
Copied!
1
2
3
4
Response
{
  "is_enabled": true,
  "result": "success"
}
Copied!
1
2
3
4

# Check if Operational Notification Emails are Global

GET /api/v1/flock/settings/notifications/operational_email/is_global

Check if operational notification emails are set to Global for a Flock.

Required Parameters

auth_token string
A valid auth token
flock_id string
A valid flock_id

Response

A JSON structure with the Global state.

Example

curl https://EXAMPLE.canary.tools/api/v1/flock/settings/notifications/operational_email/is_global \
  -d auth_token=EXAMPLE_AUTH_TOKEN \
  -d flock_id=EXAMPLE_FLOCK_ID \
  -G
Copied!
1
2
3
4
Response
{
  "is_global": true,
  "result": "success"
}
Copied!
1
2
3
4

# Disable Operational Notification Emails

POST /api/v1/flock/settings/notifications/operational_email/disable

Disable operational notification emails for a Flock.

Required Parameters

auth_token string
A valid auth token
flock_id string
A valid flock_id

Response

A JSON structure with result indicator.

Example

curl https://EXAMPLE.canary.tools/api/v1/flock/settings/notifications/operational_email/disable \
  -d auth_token=EXAMPLE_AUTH_TOKEN \
  -d flock_id=EXAMPLE_FLOCK_ID 
Copied!
1
2
3
Response
{
  "result": "success"
}
Copied!
1
2
3

# Enable Operational Notification Emails

POST /api/v1/flock/settings/notifications/operational_email/enable

Enable operational notification emails for a Flock. If enabled, Canary Disconnects/Reconnects, Canary Settings Changed, Console Settings Changed and Flock Settings Changed alerts will be emailed to the Operational Email Notifications addresses only.

Required Parameters

auth_token string
A valid auth token
flock_id string
A valid flock_id

Response

A JSON structure with result indicator.

Example

curl https://EXAMPLE.canary.tools/api/v1/flock/settings/notifications/operational_email/enable \
  -d auth_token=EXAMPLE_AUTH_TOKEN \
  -d flock_id=EXAMPLE_FLOCK_ID 
Copied!
1
2
3
Response
{
  "result": "success"
}
Copied!
1
2
3

# List Operational Notification Emails

GET /api/v1/flock/settings/notifications/operational_email

Retrieve the list of operational notification emails for a Flock.

Required Parameters

auth_token string
A valid auth token
flock_id string
A valid flock_id

Response

A JSON structure with the list of operational notification emails.

Example

curl https://EXAMPLE.canary.tools/api/v1/flock/settings/notifications/operational_email \
  -d auth_token=EXAMPLE_AUTH_TOKEN \
  -d flock_id=EXAMPLE_FLOCK_ID \
  -G
Copied!
1
2
3
4
Response
{
  "emails": [
    "<email_address>",
    "<email_address>"
  ],
  "result": "success"
}
Copied!
1
2
3
4
5
6
7

# SMS

Receive notifications directly to your cellphone. Simple, yet effective.

# Add Operational Notification Numbers

POST /api/v1/flock/settings/notifications/sms/add

Add new cellphone numbers to the notifications list.

Required Parameters

auth_token string
A valid auth token
flock_id string
A valid flock_id
numbers string
A comma separated list of valid cellphone numbers to add

Response

A JSON structure with result indicator.

Example

curl https://EXAMPLE.canary.tools/api/v1/flock/settings/notifications/sms/add \
  -d auth_token=EXAMPLE_AUTH_TOKEN \
  -d flock_id=EXAMPLE_FLOCK_ID \
  --data-urlencode numbers=EXAMPLE_CEllPHONE_NUMBERS_LIST
Copied!
1
2
3
4
Response
{
  "result": "success"
}
Copied!
1
2
3

# Check if SMS Notifications are Enabled

GET /api/v1/flock/settings/notifications/sms/is_enabled

Check if SMS notifications are enabled for a Flock.

Required Parameters

auth_token string
A valid auth token
flock_id string
A valid flock_id

Response

A JSON structure with the enabled state.

Example

curl https://EXAMPLE.canary.tools/api/v1/flock/settings/notifications/sms/is_enabled \
  -d auth_token=EXAMPLE_AUTH_TOKEN \
  -d flock_id=EXAMPLE_FLOCK_ID \
  -G
Copied!
1
2
3
4
Response
{
  "is_enabled":true,
  "result":"success"
}
Copied!
1
2
3
4

# Check if SMS Notifications are Global

GET /api/v1/flock/settings/notifications/sms/is_global

Check if SMS notifications are set to Global for a Flock.

Required Parameters

auth_token string
A valid auth token
flock_id string
A valid flock_id

Response

A JSON structure with the Global state.

Example

curl https://EXAMPLE.canary.tools/api/v1/flock/settings/notifications/sms/is_global \
  -d auth_token=EXAMPLE_AUTH_TOKEN \
  -d flock_id=EXAMPLE_FLOCK_ID \
  -G
Copied!
1
2
3
4
Response
{
  "is_global": true,
  "result": "success"
}
Copied!
1
2
3
4

# Disable SMS Notifications

POST /api/v1/flock/settings/notifications/sms/disable

Disable SMS notifications for a Flock.

Required Parameters

auth_token string
A valid auth token
flock_id string
A valid flock_id

Response

A JSON structure with result indicator.

Example

curl https://EXAMPLE.canary.tools/api/v1/flock/settings/notifications/sms/disable \
  -d auth_token=EXAMPLE_AUTH_TOKEN \
  -d flock_id=EXAMPLE_FLOCK_ID 
Copied!
1
2
3
Response
{
  "result": "success"
}
Copied!
1
2
3

# Enable SMS Notifications

POST /api/v1/flock/settings/notifications/sms/enable

Enable SMS notifications for a Flock.

Required Parameters

auth_token string
A valid auth token
flock_id string
A valid flock_id

Response

A JSON structure with result indicator.

Example

curl https://EXAMPLE.canary.tools/api/v1/flock/settings/notifications/sms/enable \
  -d auth_token=EXAMPLE_AUTH_TOKEN \
  -d flock_id=EXAMPLE_FLOCK_ID 
Copied!
1
2
3
Response
{
  "result": "success"
}
Copied!
1
2
3

# List Notification Numbers

GET /api/v1/flock/settings/notifications/sms

Retrieve the list of notification numbers for a Flock.

Required Parameters

auth_token string
A valid auth token
flock_id string
A valid flock_id

Response

A JSON structure with the list of notification numbers.

Example

curl https://EXAMPLE.canary.tools/api/v1/flock/settings/notifications/sms \
  -d auth_token=EXAMPLE_AUTH_TOKEN \
  -d flock_id=EXAMPLE_FLOCK_ID \
  -G
Copied!
1
2
3
4
Response
{
  "numbers": [
    "<cellphone_number>",
    "<cellphone_number"
  ],
  "result": "success"
}
Copied!
1
2
3
4
5
6
7

# Set Notification Numbers

POST /api/v1/flock/settings/notifications/sms/save

Set the SMS notification list for a Flock

Required Parameters

auth_token string
A valid auth token
flock_id string
A valid flock_id

Optional Parameters

addresses string
A comma separated list of valid cellphone numbers
clear boolean
If set to true, clears the list of cellphone numbers

Response

A JSON structure with result indicator.

Example

curl https://EXAMPLE.canary.tools/api/v1/flock/settings/notifications/sms/save \
  -d auth_token=EXAMPLE_AUTH_TOKEN \
  -d flock_id=EXAMPLE_FLOCK_ID \
  --data-urlencode numbers=EXAMPLE_CEllPHONE_NUMBERS_LIST
Copied!
1
2
3
4
Response
{
  "result": "success"
}
Copied!
1
2
3

# Use Global for SMS Notifications

POST /api/v1/flock/settings/notifications/sms/use_global

Set the Flock's SMS notification state to Global.

Required Parameters

auth_token string
A valid auth token
flock_id string
A valid flock_id

Response

A JSON structure with result indicator.

Example

curl https://EXAMPLE.canary.tools/api/v1/flock/settings/notifications/sms/use_global \
  -d auth_token=EXAMPLE_AUTH_TOKEN \
  -d flock_id=EXAMPLE_FLOCK_ID 
Copied!
1
2
3
Response
{
  "result": "success"
}
Copied!
1
2
3