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/x-www-form-urlencoded 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 Sub-type of the conversation (e.g., "Bloods", "Cannular", "Patient Relocation", "Catheter") |
| priority_value | integer [ 1 .. 99999 ] Priority value for the conversation (must be a positive integer between 1 and 99999) |
| priority_label | string Label for the priority level (required if priority_value is provided) |
| priority_colour | string Color code for the priority level (required if priority_value is provided) |
| due_date | string^\d{4}-\d{2}-\d{2}( \d{2}:\d{2})?$ Due date for the task in Europe/London local time. Format: "YYYY-MM-DD HH:MM" or "YYYY-MM-DD" |
| 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^[A-Za-z0-9_-]+$ 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 |
object or Array of objects | |
object Defines the flow of response options that will be shown. The structure maps from the current state to the available next states. If no response_flow is provided, all response options will be shown initially. The response_flow must have an initial state with empty string key (""). | |
| 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 Additional custom attributes for the conversation. Supports up to 5 extra attributes (extra_attr_1 through extra_attr_5). An attribute is of type 'text' and can be marked as 'mandatory', 'optional', or 'notAvailable'. | |
Array of objects Optional integration actions that can be triggered from the conversation. Integration actions require server-side configuration by the Alertive support team. You can only use integration actions that have been pre-configured on your system. Contact Alertive support to set up new integration actions or to see what actions are available. | |
object Alert-specific configuration | |
required | Array of objects The recipients of the conversation |
object Optional SIP data | |
object Optional patient information related to the conversation | |
object or string Optional external system data to attach to the conversation. This data is stored as a tag and can be retrieved later via the GET endpoint. Maximum size is 1KB (including tag name). Can be provided as either a JSON object or a string. | |
| webhook_enabled | boolean Whether webhooks are enabled for this conversation |
| webhook_id | string Identifier for the webhook configuration |
object or Array of strings Events configuration for webhooks. Can be provided as either a JSON object or an array. | |
object or Array of strings Webhook endpoints configuration. Can be provided as either a JSON object or an array. |
{- "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",
- "identifier": "doctor.smith@hospital.org",
- "affiliation": "member"
}, - {
- "type": "group",
- "identifier": "cardiac_response_team",
- "affiliation": "member"
}, - {
- "type": "role",
- "identifier": "On-Call Doctor",
- "affiliation": "member"
}
], - "alert": {
- "participant_alert_responses_visible": false,
- "allow_additional_responses": false,
- "sms_backup": false,
- "sms_timeout": 60,
- "standard_sms_backup": "always",
- "standard_sms_timeout": 120,
- "standard_sms_template": "URGENT ALERT: {{title}} - {{description}}",
- "at_risk_ttl": 300
}, - "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.
| conversationId required | string The ID of the conversation |
| x-org-id required | string The organisation ID of the Alertive system you want to interface with |
{- "message": "Conversation retrieved successfully.",
- "success": true,
- "data": {
- "conversation_id": "n10678489063820583653",
- "result": {
- "state": "open",
- "title": "Test iOS icons - TASK",
- "description": "Some incredibly interesting description",
- "type": "Blood",
- "created": "1764748080463",
- "push_priority": "urgent",
- "expiry_ttl": 400,
- "activity_ttl": 400,
- "webhook_enabled": true,
- "events": [
- "conversation_received",
- "conversation_read",
- "conversation_responded"
], - "attachments": {
- "has_image": false,
- "has_audio": false
}, - "priority": {
- "value": 5,
- "label": "Medium",
- "color": "#37be52"
}, - "due": "1758044700000",
- "patient_data": {
- "id": "1000001",
- "nhs_number": "4857773456",
- "given_name": "John",
- "family_name": "Doe",
- "sex": "Male",
- "date_of_birth": "1999-08-18",
- "address1": "14 Acacia Avenue",
- "address2": "Lower Stretton",
- "city": "Warrington",
- "postal_code": "WA4 4TE"
}, - "alertive": {
- "created_from_api": "true"
}, - "integration_actions": [
- {
- "name": "test_action",
- "label": "Test action"
}
], - "read": [ ],
- "received": [
- {
- "aid": "bdc360d637badd0877d1889d488657ff05a425744dc1d0666d1f65a49051f6e1@qasimulation.com",
- "timestamp": "1764748080619",
- "type": "user",
- "display_name": "Alertive User",
- "upn": "alertive.user@alertive.co.uk"
}
], - "responses": [ ]
}
}
}The "Update Conversation" endpoint allows you to update specific fields of an existing conversation, but only if it was originally created via the API. You can update the title, description, and participants. When updating participants, the provided list replaces the existing participants (any participants not in the new list will be removed, and any new participants will be added). Only include the fields you want to update in the request body.
| conversationId required | string The ID of the conversation |
| x-org-id required | string The organisation ID of the Alertive system you want to interface with |
| title | string Title/subject of the conversation |
| description | string Description of the conversation |
Array of objects The recipients of the conversation. When provided, this list replaces all existing participants. Any participants not in this list will be removed, and any new participants will be added. |
{- "title": "Updated Conversation Title"
}{- "message": "Conversation updated successfully",
- "success": true,
- "data": {
- "conversation_id": "conversation123456"
}
}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.
| conversationId 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"
}
}The "Add Participants" endpoint allows you to add one or more participants to an existing conversation. The conversation must have been created via the API. If any participant already exists in the conversation, the operation will fail with a 409 Conflict error.
| conversationId required | string ID of the conversation to add participants to |
| x-org-id required | string The organisation ID of the Alertive system you want to interface with |
required | Array of objects Array of participants to add to the conversation |
{- "recipients": [
- {
- "type": "user",
- "identifier": "doctor.smith@hospital.org",
- "affiliation": "member"
}
]
}{- "message": "Participants added successfully",
- "success": true,
- "data": {
- "conversation_id": "conversation123456"
}
}The "Remove Participants" endpoint allows you to remove one or more participants from an existing conversation. The conversation must have been created via the API. If any participant does not exist in the conversation, the operation will fail with a 404 Not Found error.
| conversationId required | string ID of the conversation to remove participants from |
| x-org-id required | string The organisation ID of the Alertive system you want to interface with |
required | Array of objects Array of participants to remove from the conversation. Only type and identifier/aid are required. |
{- "recipients": [
- {
- "type": "user",
- "identifier": "doctor.smith@hospital.org"
}
]
}{- "message": "Participants removed successfully",
- "success": true,
- "data": {
- "conversation_id": "conversation123456"
}
}The "Modify Participants" endpoint allows you to change the affiliation (role) of one or more participants in an existing conversation. The conversation must have been created via the API. If any participant does not exist in the conversation, the operation will fail with a 404 Not Found error. If a participant already has the target affiliation, the operation will fail with a 409 Conflict error.
| conversationId required | string ID of the conversation to modify participants in |
| x-org-id required | string The organisation ID of the Alertive system you want to interface with |
required | Array of objects Array of participants to modify in the conversation. The affiliation field specifies the new affiliation. |
{- "recipients": [
- {
- "type": "user",
- "identifier": "doctor.smith@hospital.org",
- "affiliation": "admin"
}
]
}{- "message": "Participants modified successfully",
- "success": true,
- "data": {
- "conversation_id": "conversation123456"
}
}