Skip to main content

Notification API

Notification API for epilot 360

Quick Start​

# List available operations
epilot notification

# Call an operation
epilot notification getNotificationsV2

Common Flags​

FlagDescription
-p key=valueSet 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, --includeInclude response headers in output
--jsonOutput raw JSON (no formatting)
-v, --verboseVerbose output (show request details)
--jsonata <expr>JSONata expression to transform response
--definition <file>Override OpenAPI spec file/URL
--guidedPrompt for all parameters interactively
--no-interactiveDisable interactive prompts

Operations​

Notification

Template

getNotificationsV2​

Get notifications items. These items may eventually contain entities within their payload, which can be hydrated by the

GET /v2/notification/notifications

Parameters

NameInTypeRequiredDescription
cursorquerystringNoBase64 encoded cursor to be used for pagination
after_idquerynumberNo
limitquerynumberNoThe 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

NameInTypeRequiredDescription
after_idquerynumberNo
limitquerynumberNoThe numbers of items to return
no_hydratequerybooleanNoWhen 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

NameInTypeRequiredDescription
idpathnumberYesNotification 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

NameInTypeRequiredDescription
idpathnumberYesNumeric 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

NameInTypeRequiredDescription
qquerystringNoLucene query string for filtering
fromquerynumberNoPagination offset (0-based)
sizequerynumberNoResults per page
sortquerystringNoSort fields (prefix with - for descending)
fieldsquerystringNoComma-separated fields to include
hydratequerybooleanNoResolve 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

NameInTypeRequiredDescription
idpathstring (uuid)YesTemplate 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

NameInTypeRequiredDescription
idpathstring (uuid)YesTemplate 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

NameInTypeRequiredDescription
idpathstring (uuid)YesTemplate 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

NameInTypeRequiredDescription
idpathstring (uuid)YesTemplate 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": {}
}
]