Loading...

Pulse v2.0 API

Pulse, the evolution of Intellischool's "Pulse alerts" feature, generates events when certain data thresholds are met. The Pulse API enables authorised partners to integrate Pulse notifications, alerts, and reports into their applications.

To use this API, you must be an authorised partner.


Base URI

The Pulse API can be accessed via any of the regional Intellischool API services, or via the global unified API service. The route prefix is always /v2/alerts.

For example, to access the Pulse API via the global unified endpoint:
https://api.intellischool.net/v2/alerts/{endpoint}

Alternatively, to access the Pulse API via the AU-NSW regional service:
https://api.nsw.intellischool.com.au/v2/alerts/{endpoint}

Or the SG regional service:
https://api.intellischool.sg/v2/alerts/{endpoint}


Required scopes

In order to query the Pulse API, your auth token must have at least one of the following scopes enabled. As this is a restricted API, these scopes can only be enabled by contacting Intellischool.

  • Name
    https://schema.intellischool.net/scope/alerts/messages.read
    Type
    Description

    Read-only access to getMessage endpoint.

  • Name
    https://schema.intellischool.net/scope/alerts/webhooks.write
    Type
    Description

    Enables your app to manage webhooks programmatically with the getWebhook, newWebhook, updateWebhook and deleteWebhook endpoints.


GET /message/:id

getMessage

Gets the contents of a Pulse message.

Required attributes

  • Name
    id
    Type
    uuid

    The UUID of the message to be retrieved.

Request

GET
/message/:id

Response

{"message_id":"dd643652-5295-4898-9c17-e97670e35af3","method":"webhook","queued_alert_count":1,"fetched_alert_count":1,"sent_alert_count":1,"transaction_id":"qxgfr4SpTtexbDVUxppHJw","recipient":{"entity_uuid":"e2e52993-5686-49a1-8810-ad88c00137da","ext_id":"1234","name":"Melissa Jane Smith","first_name":"Melissa","last_name":"Smith","preferred_name":"Mel","primary_email":"mel.smith@school.edu","identifiers":{"sis_id":"5678","lms_guid":"3674940c-ef02-461c-b72e-22d2c0c5a63e"}},"alerts":[{"name":"Max Jones","badges":[{"value":"7B","color":"#fa7268"}],"alert_count":"1 alert","alerts":[{"name":"School-configured alert name","id":"6266b6d4-a58e-43c4-8ab3-431b580b96eb","type":"ccb888d0-0a05-4ec3-b7b8-ef72467941a7","trigger":{"type":"all","threshold_period":"current_semester"},"rows":[{"type":"type","key":"Alert type","value":"Absent from class without reason"},{"type":"trigger","key":"Trigger type","value":"Any absence"},{"type":"link","key":"Addressed to","value":"Directly to you"},{"type":"detail","key":"Detail","list":["24-Nov-2022: Absent from Year 9 History for 50 minutes (as marked by Miss E Lynch)"]}],"entity":{"uuid":"f910f248-6782-472d-8a84-58689378ef84","ext_id":"9876","first_name":"Jones","preferred_name":"Max","last_name":"Maximillian","pronouns":["He","Him","His"],"identifiers":{"sis_id":"5432","lms_guid":"07ddb3bd-627b-457c-b256-5d4849faacc7"}},"student":{"uuid":"77147561-bf97-47a9-b808-f98f1e4eeeee","current_homeroom":"7B","current_year_level":7}}]}]}

DELETE /webhook/:id

deleteWebhook

Deletes one of your app's webhooks, as specified by the ID parameter.

Required attributes

  • Name
    id
    Type
    uuid

    The ID of the webhook you would like to delete.

Request

DELETE
/webhook/:id

Response

{"webhook_id":"54feda07-e268-4cce-8cf7-37add2e0b282","action":"deleteWebhook","success":true}

POST /webhook

newWebhook

Register a new webhook for your app. Parameters should be provided in JSON format, with a content type of application/json in the headers of the request.

Required attributes

  • Name
    endpoint
    Type
    string

    The URL to which Intellischool should POST webhooks.

  • Name
    type
    Type
    enum ("notification-only" | "full-payload")

    Whether Intellischool should send only the notification content, or the full payload of a Pulse message to the webhook consumer.

Request

POST
/webhook
curl -X POST https://api.intellischool.net/v2/alerts/webhook \ -H 'Content-Type: application/json' -d '{"endpoint":"https://app.school.edu/webhook","type":"notification-only"}'

Response

{"webhook_id":"0b790e95-754b-4da6-9a35-b38796e6f63c","action":"newWebhook","success":true}

GET /webhook/:id?

getWebhook

Get all your app's registered webhooks, or a specific webhook if an ID is provided.

Optional attributes

  • Name
    id
    Type
    uuid

    The UUID of a specific webhook to retrieve

Request

GET
/webhook/:id?

Response

{"webhook_id":"38445093-459c-4a47-a9cf-5c38e51d5257","endpoint":"https://app.school.edu.au/webhook/consume?urlparam1=abcd","type":"notification-only"}

PATCH /webhook/:id

updateWebhook

Update one of your app's webhooks. Note that you must supply at least one of the optional attributes for this endpoint.

Update fields should be supplied in JSON format, with a content type header of application/json.

The endpoint will only return fields that have been updated in the updated_props object.

Required attributes

  • Name
    id
    Type
    uuid

    The ID of the webhook to be updated.

Optional attributes

  • Name
    endpoint
    Type
    string

    The new endpoint URL that Intellischool should POST to.

  • Name
    type
    Type
    enum ("notification-only" | "full-payload")

    The type of webhook that should be emitted.

Request

PATCH
/webhook/:id
curl -X PATCH https://api.intellischool.net/v2/alerts/webhook/632dfcc5-3ab0-4ace-94dc-036f1fa97377 \ -H 'Content-Type: application/json' -d '{"endpoint":"https://app.school.edu/new-webhook","type":"notification-only"}'

Response

{"webhook_id":"632dfcc5-3ab0-4ace-94dc-036f1fa97377","action":"updateWebhook","success":true,"updated_props":{"endpoint":"new-endpoint-url","type":"notification-only"}}

Webhooks

Authorised partners can opt to subscribe to webhooks that alert their app when a new alert message is generated. The primary use case for Pulse webhooks is creating a notification inside your app with the content (or a link to the content) of the new alert.

Trigger events

Webhooks are triggered for every message to every user. For example, if the same alert is sent to multiple users, the webhook will be triggered for each user. When designing your integration, you should consider the potential load on your webhook consumption endpoint. Most schools will have Pulse configured to send messages once per day, so your consumption endpoint will experience a spike in demand at that time.

When a webhook is triggered, Intellischool will POST the signed webhook payload to the registered webhook URI.

Registering a webhook

Use the getWebhook, newWebhook, updateWebhook and deleteWebhook endpoints to manage the webhooks for your app programmatically.

Types of webhook

There are two types of Pulse webhooks available: a notification-only webhook and the full-payload webhook. Your app does not need to subscribe to both, as they are both triggered upon the generation of a new alert message.

You should subscribe to the notification-only webhook if your app does not need the full message payload when generating a notification. Your notification may then link to a page within your app that loads the message content from this API's getMessage endpoint, or you can link directly to the message within Intellischool's native app.

You should subscribe to the full-payload webhook if your integration requires the full message payload immediately. Note that this payload can sometimes exceed 1MB per message for schools/individuals that use the Pulse system heavily.

Authenticating webhooks

Webhook payloads are posted to your registered endpoint as a signed JWT. You should always validate that a webhook is from Intellischool.

To do so, you can authenticate the JWT signature against Intellischool's global JWKS. The kid in the JWT header must match a public key in the JWKS.

Webhook response requirements

When Intellischool invokes a POST request to your webhook consumer, the consumer must respond within 30 seconds with a successful HTTP code (between 200 and 299).

If your consumer responds with any code other than a success code, or if it fails to respond at all, Intellischool will automatically retry the request up to 10 times. The first retry will occur after 5 seconds, after which the retry interval will double for each failed request (to a maximum of ~43 minutes). If, after 10 retries, your webhook consumer does not send a successful response, the alert message will be marked as undeliverable.