Download OpenAPI specification:
Unlock seamless communication and automation with the Alertive API, a powerful tool designed to integrate directly with Alertive's highly configurable system. This documentation provides a comprehensive guide to leveraging the API's key functions facilitating creating conversations, checking their state, sending notifications, dynamically escalating participation and much more. By exposing a carefully selected subset of configuration keys and rigorously testing for reliability, the Alertive API enables you to automate alert and message creation ensuring efficient and dependable communication for your organisation. The overarching term for a communication, whether it's a chat, alert or task is a “conversation”.
Depending on the type of system you’re integrating with will depend on which Alertive API base URL you’ll use. Below is a list of the currently available base URLs and the purpose of each.
Testing: https://testing.alertiveapi.com/ - Used to integrate with internal Alertive environments and will include untested API features. Only used by the Alertive team.
Staging: https://staging.alertiveapi.com/ - Used to integrate with UAT systems and will include changes not yet deployed to production.
Production: https://prod.alertiveapi.com/ - Used to integrate with production systems and will only include fully tested and stable API features.
To fully utilise the Alertive API you’ll need to make a HTTP request to the appropriate token endpoint to retrieve an access token. The obtained token can then be used in subsequent API requests.
Token Endpoint: [API BASE URL]/oauth2/token
client_credentials grant type.The request body must be application/json and contain the following parameters:
{
"grant_type": "client_credentials"
}
Encode your Client ID and Client Secret using Base64 in the format client_id:client_secret.
Example:
abcdefg12345:hijklmnop67890YWJjZGVmZzEyMzQ1OmhpamtsbW5vcDY3ODkwBasic YWJjZGVmZzEyMzQ1OmhpamtsbW5vcDY3ODkwExample using curl:
curl -X POST \
https://[API BASE URL]/oauth2/token \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Authorization: Basic YWJjZGVmZzEyMzQ1OmhpamtsbW5vcDY3ODkw' \
-d 'grant_type=client_credentials'
Successful response:
{
"access_token": "YWJjZGVmZzEyMzQ1OmhpamtsbW5vcDY3ODkw",
"expires_in": 3600,
"token_type": "Bearer"
}
Example using curl:
curl -X GET \
https://prod.alertiveapi.com/conversations \
-H 'Authorization: Bearer [YOUR_ACCESS_TOKEN]'
The “Create a New Conversation” endpoint allows you to initiate a new conversation and serves as the entry point for creating alerts, tasks, and named conversations. Depending on the parameters provided in the request payload, this endpoint can be used to generate alert messages to notify users of events, assign actionable tasks, or start named conversations for ongoing discussions grouped under a specific title.
| x-org-id required | string The organisation ID of the Alertive system you want to interface with |
| name | string Name of the conversation |
| conversation_type required | string Enum: "alert" "named" "task" Type of conversation to create |
| title required | string Title/subject of the conversation |
| description required | string Description of the conversation |
| type | string Priority type for the conversation |
| priority_label | string Label for the priority level |
| priority_colour | string Color code for the priority level |
| colour | string Color code for the conversation |
| ios_icon | string Icon identifier for iOS devices |
| android_icon | string Icon identifier for Android devices |
| sound_file_id | string Identifier for the notification sound |
| is_critical | boolean Whether the conversation is critical or not |
| chat_available | boolean Whether chat functionality is available |
| expiry_ttl | integer Default: 3600 Time-to-live in seconds for conversation expiry |
| activity_ttl | integer Default: 86400 Time-to-live in seconds for conversation activity |
Array of objects Available response options for alerts | |
| participant_can_leave | boolean Whether participants can leave the conversation |
| owner_can_close_early | boolean Whether the owner can close the conversation early |
| owner_can_add_additional_contacts | boolean Whether the owner can add additional contacts |
| can_send_attachments_within_conversation | boolean Whether attachments can be sent within the conversation |
object Alert-specific configuration | |
required | Array of objects The recipients of the conversation |
object Optional patient information related to the conversation |
{- "name": "Emergency Alert",
- "conversation_type": "alert",
- "title": "Patient Cardiac Arrest",
- "description": "Patient in Room 204 experiencing cardiac arrest",
- "is_critical": true,
- "chat_available": false,
- "recipients": [
- {
- "type": "user",
- "upn": "doctor.smith@hospital.org",
- "affiliation": "member"
}, - {
- "type": "group",
- "identifier": "cardiac_response_team",
- "affiliation": "member"
}
], - "patient_data": {
- "id": "P123456",
- "first_name": "John",
- "last_name": "Doe",
- "gender": "male",
- "nhs_number": "123 456 7890"
}
}{- "message": "",
- "success": true,
- "data": {
- "conversation_id": "conversation123456"
}
}The “Read Conversation” endpoint allows you to retrieve a specific conversation by its ID, but it only returns the conversation’s metadata. This includes high-level details such as the conversation type, status, and timestamps, without exposing the full message history or content.
| x-org-id required | string The organisation ID of the Alertive system you want to interface with |
{- "message": "string",
- "success": true,
- "data": {
- "conversation_id": "string",
- "result": { }
}
}The “Delete Conversation” endpoint allows you to remove an existing conversation from the system, but only if it was originally created via the API. This restriction ensures that system-generated or manually created conversations outside of the API remain protected from unintended deletion.
| conversation_id required | string ID of the conversation to delete |
| x-org-id required | string The organisation ID of the Alertive system you want to interface with |
{- "message": "string",
- "success": true,
- "data": {
- "conversation_id": "string"
}
}The “Create Messages” endpoint allows you to post a new message to an existing conversation, enabling continued communication within the same thread. This is useful for updating participants, responding to previous messages, or adding context to an ongoing alert, task, or named conversation.
| conversationId required | string ID of the conversation to send message to |
| x-org-id required | string The organisation ID of the Alertive system you want to interface with |
| title | string Title of the message |
| integration_message | boolean Default: false Whether this is an integration message with action buttons |
required | object |
{- "title": "System Notification",
- "message_type": "notification",
- "options": {
- "content": "Patient vital signs are now stable.",
- "title": "Patient Update",
- "colour": "#28a745",
- "source": "Monitoring System"
}
}{- "message": "",
- "success": true,
- "data": {
- "message_id": "a1b2c3d4-e5f6-4789-a1b2-c3d4e5f67890"
}
}