curl --request POST \
--url https://api.eda.prisme.ai/v2/workspaces/{workspaceId}/automations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": {
"fr": "Bonjour",
"en": "Hello"
},
"do": [
{
"emit": {
"event": "prismeaiMessenger.message",
"payload": "<unknown>",
"target": {
"userTopic": "<string>",
"userId": "<string>",
"sessionId": "<string>",
"currentSocket": true
},
"private": true,
"autocomplete": {},
"options": {
"persist": true,
"aggPayload": false,
"async": false
}
}
}
],
"description": {
"fr": "Bonjour",
"en": "Hello"
},
"private": false,
"disabled": true,
"slug": "<string>",
"arguments": {},
"validateArguments": true,
"when": {
"events": [
"prismeaiMessenger.event"
],
"schedules": [
"2021-12-25T00:00",
"* * 1 * *"
],
"endpoint": "Set to true in order to activate HTTP endpoint. Slug will be trigger name by default"
},
"labels": [
"<string>"
],
"events": {
"emit": [
"<string>"
],
"listen": [
"<string>"
],
"autocomplete": [
{
"event": "prismeaiMessenger.message",
"autocomplete": {}
}
]
},
"updatedAt": "<string>",
"createdAt": "<string>",
"updatedBy": "<string>",
"createdBy": "<string>",
"checksum": "<string>",
"output": "{{result}}",
"authorizations": {
"action": "<string>"
}
}
'{
"name": {
"fr": "Bonjour",
"en": "Hello"
},
"do": [
{
"emit": {
"event": "prismeaiMessenger.message",
"payload": "<unknown>",
"target": {
"userTopic": "<string>",
"userId": "<string>",
"sessionId": "<string>",
"currentSocket": true
},
"private": true,
"autocomplete": {},
"options": {
"persist": true,
"aggPayload": false,
"async": false
}
}
}
],
"description": {
"fr": "Bonjour",
"en": "Hello"
},
"private": false,
"disabled": true,
"slug": "<string>",
"arguments": {},
"validateArguments": true,
"when": {
"events": [
"prismeaiMessenger.event"
],
"schedules": [
"2021-12-25T00:00",
"* * 1 * *"
],
"endpoint": "Set to true in order to activate HTTP endpoint. Slug will be trigger name by default"
},
"labels": [
"<string>"
],
"events": {
"emit": [
"<string>"
],
"listen": [
"<string>"
],
"autocomplete": [
{
"event": "prismeaiMessenger.message",
"autocomplete": {}
}
]
},
"updatedAt": "<string>",
"createdAt": "<string>",
"updatedBy": "<string>",
"createdBy": "<string>",
"checksum": "<string>",
"output": "{{result}}",
"authorizations": {
"action": "<string>"
}
}Create a new automation
curl --request POST \
--url https://api.eda.prisme.ai/v2/workspaces/{workspaceId}/automations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": {
"fr": "Bonjour",
"en": "Hello"
},
"do": [
{
"emit": {
"event": "prismeaiMessenger.message",
"payload": "<unknown>",
"target": {
"userTopic": "<string>",
"userId": "<string>",
"sessionId": "<string>",
"currentSocket": true
},
"private": true,
"autocomplete": {},
"options": {
"persist": true,
"aggPayload": false,
"async": false
}
}
}
],
"description": {
"fr": "Bonjour",
"en": "Hello"
},
"private": false,
"disabled": true,
"slug": "<string>",
"arguments": {},
"validateArguments": true,
"when": {
"events": [
"prismeaiMessenger.event"
],
"schedules": [
"2021-12-25T00:00",
"* * 1 * *"
],
"endpoint": "Set to true in order to activate HTTP endpoint. Slug will be trigger name by default"
},
"labels": [
"<string>"
],
"events": {
"emit": [
"<string>"
],
"listen": [
"<string>"
],
"autocomplete": [
{
"event": "prismeaiMessenger.message",
"autocomplete": {}
}
]
},
"updatedAt": "<string>",
"createdAt": "<string>",
"updatedBy": "<string>",
"createdBy": "<string>",
"checksum": "<string>",
"output": "{{result}}",
"authorizations": {
"action": "<string>"
}
}
'{
"name": {
"fr": "Bonjour",
"en": "Hello"
},
"do": [
{
"emit": {
"event": "prismeaiMessenger.message",
"payload": "<unknown>",
"target": {
"userTopic": "<string>",
"userId": "<string>",
"sessionId": "<string>",
"currentSocket": true
},
"private": true,
"autocomplete": {},
"options": {
"persist": true,
"aggPayload": false,
"async": false
}
}
}
],
"description": {
"fr": "Bonjour",
"en": "Hello"
},
"private": false,
"disabled": true,
"slug": "<string>",
"arguments": {},
"validateArguments": true,
"when": {
"events": [
"prismeaiMessenger.event"
],
"schedules": [
"2021-12-25T00:00",
"* * 1 * *"
],
"endpoint": "Set to true in order to activate HTTP endpoint. Slug will be trigger name by default"
},
"labels": [
"<string>"
],
"events": {
"emit": [
"<string>"
],
"listen": [
"<string>"
],
"autocomplete": [
{
"event": "prismeaiMessenger.message",
"autocomplete": {}
}
]
},
"updatedAt": "<string>",
"createdAt": "<string>",
"updatedBy": "<string>",
"createdBy": "<string>",
"checksum": "<string>",
"output": "{{result}}",
"authorizations": {
"action": "<string>"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Workspace id
Show child attributes
Show child attributes
"prismeaiMessenger.message"
Show child attributes
Whether to persist this event or not. Defaults to true
Populate advanced aggregation payload for custom mappings & analytics. This is automatically enabled for events mapped in config.events.types.*
If true, the instruction will return control without waiting for the event to be emitted. Defaults to false
Set this to true if you don't want your automation to be accessible outside of your app. Default is false.
false
Set this to true if you want to turn off this automation.
true
Unique & human readable id across current workspace's automations
Show child attributes
Show child attributes
string, number, object, array, boolean, localized:string, localized:number, localized:boolean Show child attributes
Show child attributes
"prismeaiMessenger.message"
Automation result expression. Might be a variable reference, an object/array with variables inside ...
"{{result}}"
Success Response
Show child attributes
Show child attributes
"prismeaiMessenger.message"
Show child attributes
Whether to persist this event or not. Defaults to true
Populate advanced aggregation payload for custom mappings & analytics. This is automatically enabled for events mapped in config.events.types.*
If true, the instruction will return control without waiting for the event to be emitted. Defaults to false
Set this to true if you don't want your automation to be accessible outside of your app. Default is false.
false
Set this to true if you want to turn off this automation.
true
Unique & human readable id across current workspace's automations
Show child attributes
Show child attributes
string, number, object, array, boolean, localized:string, localized:number, localized:boolean Show child attributes
Show child attributes
"prismeaiMessenger.message"
Automation result expression. Might be a variable reference, an object/array with variables inside ...
"{{result}}"
Was this page helpful?