Notification API
- Base URL:
https://notification.sls.epilot.io - API Docs: https://docs.epilot.io/api/notification
Notification API for epilot 360
Quick Startβ
# List available operations
epilot notification
# Call an operation
epilot notification getNotificationsV2
Common Flagsβ
| Flag | Description |
|---|---|
-p key=value | Set a named parameter |
-d '{...}' | Request body JSON |
-H 'Key: Value' | Custom header |
-t, --token <token> | Bearer token for authentication |
--profile <name> | Use a named profile |
-s, --server <url> | Override server base URL |
-i, --include | Include response headers in output |
--json | Output raw JSON (no formatting) |
-v, --verbose | Verbose output (show request details) |
--jsonata <expr> | JSONata expression to transform response |
--definition <file> | Override OpenAPI spec file/URL |
--guided | Prompt for all parameters interactively |
--no-interactive | Disable interactive prompts |
Operationsβ
Notification
getNotificationsV2β Get notifications items. These items may eventually contain entities within their payload, which can be hydrated by thegetNotificationsβ Get notificationscreateNotificationβ Create a message that can be displayed in the notification panel.getNotificationβ Get the details of a single notification.markAllAsReadβ Mark all as readmarkAsReadβ Mark as readgetTotalUnreadβ Get total unread
Template
listNotificationTemplatesβ List notification templates with optional filtering and paginationcreateNotificationTemplateβ Create a new notification templategetNotificationTemplateβ Get a single notification template by IDupdateNotificationTemplateβ Update a notification template (full replacement)patchNotificationTemplateβ Partially update a notification templatedeleteNotificationTemplateβ Delete a notification template permanentlysendPreviewβ Send a preview notification (both email and in-app) to the requesting user.
getNotificationsV2β
Get notifications items. These items may eventually contain entities within their payload, which can be hydrated by the
GET /v2/notification/notifications
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
cursor | query | string | No | Base64 encoded cursor to be used for pagination |
after_id | query | number | No | |
limit | query | number | No | The numbers of items to return |
Sample Call
epilot notification getNotificationsV2
With JSONata filter:
epilot notification getNotificationsV2 --jsonata 'results[0]'
Sample Response
{
"cursor": "eyJjcmVhd",
"total": 1,
"total_unread": 1,
"results": [
{
"id": 123456789,
"notification_id": 123456789,
"timestamp": "1970-01-01T00:00:00.000Z",
"read_state": false,
"type": "workflow",
"redirect_url": "https://epilot.cloud",
"organization_id": "206801",
"title": {
"en": "My custom notification",
"de": "Meine benutzerdefinierte AktivitΓ€t"
},
"message": {
"en": "{{caller}} did something with {{contact.entity.id}} {{branch.name}}.",
"de": "{{caller}} habe etwas damit gemacht {{contact.entity.id}} {{branch.name}}."
},
"payload": {
"entity": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"schema": "contact"
}
},
"caller": {
"EpilotAuth": {
"token": {
"sub": "476e9b48-42f4-4234-a2b0-4668b34626ce",
"cognito:groups": ["Administrator"],
"cognito:preferred_role": "arn:aws:iam::912468240823:role/base-administrator-role",
"iss": "https://cognito-idp.eu-central-1.amazonaws.com/eu-central-1_6lZSgmU6D",
"custom:ivy_org_id": "739224",
"cognito:username": "n.ahmad@epilot.cloud",
"custom:ivy_user_id": "10006129",
"cognito:roles": ["arn:aws:iam::912468240823:role/base-administrator-role"],
"aud": "6e0jbdnger7nmoktaaflarue1l",
"event_id": "cd5f5583-d90c-4db5-8e99-5f5dd29a4d75",
"token_use": "id",
"auth_time": 1614333023,
"exp": 1614336623,
"iat": 1614333023,
"email": "n.ahmad@epilot.cloud"
}
}
},
"operations": [
{
"entity": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"operation": "updateEntity",
"params": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"slug": "contact"
},
"payload": {
"_schema": "contact",
"_org": "123",
"status": "Inactive"
}
}
],
"force_notify_users": {
"12345": {
"email": false,
"in_app": false
}
}
}
]
}
getNotificationsβ
Get notifications
GET /v1/notification/notifications
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
after_id | query | number | No | |
limit | query | number | No | The numbers of items to return |
no_hydrate | query | boolean | No | When true, the payload will not be hydrated with the entity data. This is useful when the client does not need the entity data and wants to save on API calls (performance gain). When false, the payloa |
Sample Call
epilot notification getNotifications
With JSONata filter:
epilot notification getNotifications --jsonata 'results[0]'
Sample Response
{
"total": 1,
"total_unread": 1,
"results": [
{
"id": 123456789,
"notification_id": 123456789,
"timestamp": "1970-01-01T00:00:00.000Z",
"read_state": false,
"type": "workflow",
"redirect_url": "https://epilot.cloud",
"organization_id": "206801",
"title": {
"en": "My custom notification",
"de": "Meine benutzerdefinierte AktivitΓ€t"
},
"message": {
"en": "{{caller}} did something with {{contact.entity.id}} {{branch.name}}.",
"de": "{{caller}} habe etwas damit gemacht {{contact.entity.id}} {{branch.name}}."
},
"payload": {
"entity": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"schema": "contact"
}
},
"caller": {
"EpilotAuth": {
"token": {
"sub": "476e9b48-42f4-4234-a2b0-4668b34626ce",
"cognito:groups": ["Administrator"],
"cognito:preferred_role": "arn:aws:iam::912468240823:role/base-administrator-role",
"iss": "https://cognito-idp.eu-central-1.amazonaws.com/eu-central-1_6lZSgmU6D",
"custom:ivy_org_id": "739224",
"cognito:username": "n.ahmad@epilot.cloud",
"custom:ivy_user_id": "10006129",
"cognito:roles": ["arn:aws:iam::912468240823:role/base-administrator-role"],
"aud": "6e0jbdnger7nmoktaaflarue1l",
"event_id": "cd5f5583-d90c-4db5-8e99-5f5dd29a4d75",
"token_use": "id",
"auth_time": 1614333023,
"exp": 1614336623,
"iat": 1614333023,
"email": "n.ahmad@epilot.cloud"
}
}
},
"operations": [
{
"entity": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"operation": "updateEntity",
"params": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"slug": "contact"
},
"payload": {
"_schema": "contact",
"_org": "123",
"status": "Inactive"
}
}
],
"force_notify_users": {
"12345": {
"email": false,
"in_app": false
}
}
}
]
}
createNotificationβ
Create a message that can be displayed in the notification panel.
POST /v1/notification/notifications
Request Body
Sample Call
epilot notification createNotification
With request body:
epilot notification createNotification \
-d '{
"notification_id": 0,
"timestamp": "1970-01-01T00:00:00.000Z",
"type": "workflow",
"redirect_url": "https://epilot.cloud",
"organization_id": "206801",
"title": {
"en": "My custom notification",
"de": "Meine benutzerdefinierte AktivitΓ€t"
},
"message": {
"en": "{{caller}} did something with {{contact.entity.id}} {{branch.name}}.",
"de": "{{caller}} habe etwas damit gemacht {{contact.entity.id}} {{branch.name}}."
},
"payload": {
"entity": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"schema": "contact"
}
},
"caller": {
"EpilotAuth": {
"token": {
"sub": "476e9b48-42f4-4234-a2b0-4668b34626ce",
"cognito:groups": ["Administrator"],
"cognito:preferred_role": "arn:aws:iam::912468240823:role/base-administrator-role",
"iss": "https://cognito-idp.eu-central-1.amazonaws.com/eu-central-1_6lZSgmU6D",
"custom:ivy_org_id": "739224",
"cognito:username": "n.ahmad@epilot.cloud",
"custom:ivy_user_id": "10006129",
"cognito:roles": ["arn:aws:iam::912468240823:role/base-administrator-role"],
"aud": "6e0jbdnger7nmoktaaflarue1l",
"event_id": "cd5f5583-d90c-4db5-8e99-5f5dd29a4d75",
"token_use": "id",
"auth_time": 1614333023,
"exp": 1614336623,
"iat": 1614333023,
"email": "n.ahmad@epilot.cloud"
}
}
},
"operations": [
{
"entity": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"operation": "updateEntity",
"params": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"slug": "contact"
},
"payload": {
"_schema": "contact",
"_org": "123",
"status": "Inactive"
}
}
],
"force_notify_users": {
"12345": {
"email": false,
"in_app": false
}
},
"read_state": false,
"visibility_user_ids": ["1", "2", "3", "4", "5"]
}'
Using stdin pipe:
cat body.json | epilot notification createNotification
With JSONata filter:
epilot notification createNotification --jsonata '$'
getNotificationβ
Get the details of a single notification.
GET /v1/notification/notifications/{id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | number | Yes | Notification Id |
Sample Call
epilot notification getNotification \
-p id=1
Using positional args for path parameters:
epilot notification getNotification 1
With JSONata filter:
epilot notification getNotification -p id=1 --jsonata '$'
Sample Response
{
"id": 123456789,
"notification_id": 123456789,
"timestamp": "1970-01-01T00:00:00.000Z",
"read_state": false,
"type": "workflow",
"redirect_url": "https://epilot.cloud",
"organization_id": "206801",
"title": {
"en": "My custom notification",
"de": "Meine benutzerdefinierte AktivitΓ€t"
},
"message": {
"en": "{{caller}} did something with {{contact.entity.id}} {{branch.name}}.",
"de": "{{caller}} habe etwas damit gemacht {{contact.entity.id}} {{branch.name}}."
},
"payload": {
"entity": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"schema": "contact"
}
},
"caller": {
"EpilotAuth": {
"token": {
"sub": "476e9b48-42f4-4234-a2b0-4668b34626ce",
"cognito:groups": ["Administrator"],
"cognito:preferred_role": "arn:aws:iam::912468240823:role/base-administrator-role",
"iss": "https://cognito-idp.eu-central-1.amazonaws.com/eu-central-1_6lZSgmU6D",
"custom:ivy_org_id": "739224",
"cognito:username": "n.ahmad@epilot.cloud",
"custom:ivy_user_id": "10006129",
"cognito:roles": ["arn:aws:iam::912468240823:role/base-administrator-role"],
"aud": "6e0jbdnger7nmoktaaflarue1l",
"event_id": "cd5f5583-d90c-4db5-8e99-5f5dd29a4d75",
"token_use": "id",
"auth_time": 1614333023,
"exp": 1614336623,
"iat": 1614333023,
"email": "n.ahmad@epilot.cloud"
}
}
},
"operations": [
{
"entity": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"operation": "updateEntity",
"params": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"slug": "contact"
},
"payload": {
"_schema": "contact",
"_org": "123",
"status": "Inactive"
}
}
],
"force_notify_users": {
"12345": {
"email": false,
"in_app": false
}
}
}
markAllAsReadβ
Mark all as read
PUT /v1/notification/notifications/mark
Sample Call
epilot notification markAllAsRead
With JSONata filter:
epilot notification markAllAsRead --jsonata '$'
markAsReadβ
Mark as read
PUT /v1/notification/notifications/{id}/mark
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | number | Yes | Numeric ID of the notification to mark as read |
Sample Call
epilot notification markAsRead \
-p id=1
Using positional args for path parameters:
epilot notification markAsRead 1
With JSONata filter:
epilot notification markAsRead -p id=1 --jsonata '$'
getTotalUnreadβ
Get total unread
GET /v1/notification/unreads
Sample Call
epilot notification getTotalUnread
With JSONata filter:
epilot notification getTotalUnread --jsonata '$'
listNotificationTemplatesβ
List notification templates with optional filtering and pagination
GET /v1/notification/templates
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
q | query | string | No | Lucene query string for filtering |
from | query | number | No | Pagination offset (0-based) |
size | query | number | No | Results per page |
sort | query | string | No | Sort fields (prefix with - for descending) |
fields | query | string | No | Comma-separated fields to include |
hydrate | query | boolean | No | Resolve nested relations |
Sample Call
epilot notification listNotificationTemplates
With JSONata filter:
epilot notification listNotificationTemplates --jsonata 'results[0]'
Sample Response
{
"results": [
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_schema": "string",
"_title": "string",
"_org": "string",
"_tags": ["string"],
"_created_at": "1970-01-01T00:00:00.000Z",
"_updated_at": "1970-01-01T00:00:00.000Z",
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
"_owners": [
{
"org_id": "string",
"user_id": "string"
}
],
"_acl": {
"view": ["string"],
"edit": ["string"],
"delete": ["string"]
},
"name": "string",
"type": "string",
"notification_title": "string",
"message": "string",
"action_label": "string",
"action_url": "string",
"style": "string",
"system_template": true,
"created_by": "string",
"updated_by": "string"
}
],
"hits": 0
}
createNotificationTemplateβ
Create a new notification template
POST /v1/notification/templates
Request Body (required)
Sample Call
epilot notification createNotificationTemplate
With request body:
epilot notification createNotificationTemplate \
-d '{
"name": "string",
"type": "string",
"notification_title": "string",
"message": "string",
"action_label": "string",
"action_url": "string",
"style": "string",
"_title": "string",
"_tags": ["string"],
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"]
}'
Using stdin pipe:
cat body.json | epilot notification createNotificationTemplate
With JSONata filter:
epilot notification createNotificationTemplate --jsonata '_id'
Sample Response
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_schema": "string",
"_title": "string",
"_org": "string",
"_tags": ["string"],
"_created_at": "1970-01-01T00:00:00.000Z",
"_updated_at": "1970-01-01T00:00:00.000Z",
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
"_owners": [
{
"org_id": "string",
"user_id": "string"
}
],
"_acl": {
"view": ["string"],
"edit": ["string"],
"delete": ["string"]
},
"name": "string",
"type": "string",
"notification_title": "string",
"message": "string",
"action_label": "string",
"action_url": "string",
"style": "string",
"system_template": true,
"created_by": "string",
"updated_by": "string"
}
getNotificationTemplateβ
Get a single notification template by ID
GET /v1/notification/templates/{id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Template ID (UUID) |
Sample Call
epilot notification getNotificationTemplate \
-p id=123e4567-e89b-12d3-a456-426614174000
Using positional args for path parameters:
epilot notification getNotificationTemplate 123e4567-e89b-12d3-a456-426614174000
With JSONata filter:
epilot notification getNotificationTemplate -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '_id'
Sample Response
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_schema": "string",
"_title": "string",
"_org": "string",
"_tags": ["string"],
"_created_at": "1970-01-01T00:00:00.000Z",
"_updated_at": "1970-01-01T00:00:00.000Z",
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
"_owners": [
{
"org_id": "string",
"user_id": "string"
}
],
"_acl": {
"view": ["string"],
"edit": ["string"],
"delete": ["string"]
},
"name": "string",
"type": "string",
"notification_title": "string",
"message": "string",
"action_label": "string",
"action_url": "string",
"style": "string",
"system_template": true,
"created_by": "string",
"updated_by": "string"
}
updateNotificationTemplateβ
Update a notification template (full replacement)
PUT /v1/notification/templates/{id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Template ID (UUID) |
Request Body (required)
Sample Call
epilot notification updateNotificationTemplate \
-p id=123e4567-e89b-12d3-a456-426614174000
With request body:
epilot notification updateNotificationTemplate \
-p id=123e4567-e89b-12d3-a456-426614174000 \
-d '{
"name": "string",
"notification_title": "string",
"message": "string",
"action_label": "string",
"action_url": "string",
"style": "string",
"_title": "string",
"_tags": ["string"],
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"]
}'
Using positional args for path parameters:
epilot notification updateNotificationTemplate 123e4567-e89b-12d3-a456-426614174000
Using stdin pipe:
cat body.json | epilot notification updateNotificationTemplate -p id=123e4567-e89b-12d3-a456-426614174000
With JSONata filter:
epilot notification updateNotificationTemplate -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '_id'
Sample Response
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_schema": "string",
"_title": "string",
"_org": "string",
"_tags": ["string"],
"_created_at": "1970-01-01T00:00:00.000Z",
"_updated_at": "1970-01-01T00:00:00.000Z",
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
"_owners": [
{
"org_id": "string",
"user_id": "string"
}
],
"_acl": {
"view": ["string"],
"edit": ["string"],
"delete": ["string"]
},
"name": "string",
"type": "string",
"notification_title": "string",
"message": "string",
"action_label": "string",
"action_url": "string",
"style": "string",
"system_template": true,
"created_by": "string",
"updated_by": "string"
}
patchNotificationTemplateβ
Partially update a notification template
PATCH /v1/notification/templates/{id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Template ID (UUID) |
Request Body (required)
Sample Call
epilot notification patchNotificationTemplate \
-p id=123e4567-e89b-12d3-a456-426614174000
With request body:
epilot notification patchNotificationTemplate \
-p id=123e4567-e89b-12d3-a456-426614174000 \
-d '{
"name": "string",
"notification_title": "string",
"message": "string",
"action_label": "string",
"action_url": "string",
"style": "string",
"_title": "string",
"_tags": ["string"],
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"]
}'
Using positional args for path parameters:
epilot notification patchNotificationTemplate 123e4567-e89b-12d3-a456-426614174000
Using stdin pipe:
cat body.json | epilot notification patchNotificationTemplate -p id=123e4567-e89b-12d3-a456-426614174000
With JSONata filter:
epilot notification patchNotificationTemplate -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '_id'
Sample Response
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_schema": "string",
"_title": "string",
"_org": "string",
"_tags": ["string"],
"_created_at": "1970-01-01T00:00:00.000Z",
"_updated_at": "1970-01-01T00:00:00.000Z",
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
"_owners": [
{
"org_id": "string",
"user_id": "string"
}
],
"_acl": {
"view": ["string"],
"edit": ["string"],
"delete": ["string"]
},
"name": "string",
"type": "string",
"notification_title": "string",
"message": "string",
"action_label": "string",
"action_url": "string",
"style": "string",
"system_template": true,
"created_by": "string",
"updated_by": "string"
}
deleteNotificationTemplateβ
Delete a notification template permanently
DELETE /v1/notification/templates/{id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Template ID (UUID) |
Sample Call
epilot notification deleteNotificationTemplate \
-p id=123e4567-e89b-12d3-a456-426614174000
Using positional args for path parameters:
epilot notification deleteNotificationTemplate 123e4567-e89b-12d3-a456-426614174000
With JSONata filter:
epilot notification deleteNotificationTemplate -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '_id'
Sample Response
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_schema": "string",
"_title": "string",
"_org": "string",
"_tags": ["string"],
"_created_at": "1970-01-01T00:00:00.000Z",
"_updated_at": "1970-01-01T00:00:00.000Z",
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
"_owners": [
{
"org_id": "string",
"user_id": "string"
}
],
"_acl": {
"view": ["string"],
"edit": ["string"],
"delete": ["string"]
},
"name": "string",
"type": "string",
"notification_title": "string",
"message": "string",
"action_label": "string",
"action_url": "string",
"style": "string",
"system_template": true,
"created_by": "string",
"updated_by": "string"
}
sendPreviewβ
Send a preview notification (both email and in-app) to the requesting user.
POST /v1/notification/templates/send-preview
Request Body (required)
Sample Call
epilot notification sendPreview
With request body:
epilot notification sendPreview \
-d '{
"template": {
"name": "string",
"notification_title": "string",
"message": "string",
"action_label": "string",
"action_url": "string",
"style": "string",
"_title": "string",
"_tags": ["string"],
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"]
},
"context_ids": {}
}'
Using stdin pipe:
cat body.json | epilot notification sendPreview
With JSONata filter:
epilot notification sendPreview --jsonata '$'
Sample Response
[
{
"success": true,
"data": {}
}
]