POST
/
v2
/
workspaces
/
{workspaceId}
/
automations
curl --request POST \
  --url https://api.eda.prisme.ai/v2/workspaces/{workspaceId}/automations \
  --header 'Content-Type: application/json' \
  --header 'X-Prismeai-API-Key: <api-key>' \
  --data '{
  "description": {
    "fr": "Bonjour",
    "en": "Hello"
  },
  "private": false,
  "disabled": true,
  "name": {
    "fr": "Bonjour",
    "en": "Hello"
  },
  "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>",
  "do": [
    {
      "emit": {
        "event": "prismeaiMessenger.message",
        "payload": "<any>",
        "target": {
          "userTopic": "<string>",
          "userId": "<string>",
          "sessionId": "<string>",
          "currentSocket": true
        },
        "private": true,
        "autocomplete": {},
        "options": {
          "persist": true,
          "aggPayload": true
        }
      }
    }
  ],
  "output": "<any>",
  "authorizations": {
    "action": "<string>"
  }
}'
{
  "description": {
    "fr": "Bonjour",
    "en": "Hello"
  },
  "private": false,
  "disabled": true,
  "name": {
    "fr": "Bonjour",
    "en": "Hello"
  },
  "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>",
  "do": [
    {
      "emit": {
        "event": "prismeaiMessenger.message",
        "payload": "<any>",
        "target": {
          "userTopic": "<string>",
          "userId": "<string>",
          "sessionId": "<string>",
          "currentSocket": true
        },
        "private": true,
        "autocomplete": {},
        "options": {
          "persist": true,
          "aggPayload": true
        }
      }
    }
  ],
  "output": "<any>",
  "authorizations": {
    "action": "<string>"
  }
}

Authorizations

X-Prismeai-API-Key
string
header
required
connect.sid
string
cookie
required

Path Parameters

workspaceId
string
required

Workspace id

Body

application/json

Response

200
application/json

Success Response

The response is of type object.