curl --request POST \
--url https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [
{
"type": "apps.someApp.someCustomEvent",
"payload": {
"foo": "bar"
}
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({events: [{type: 'apps.someApp.someCustomEvent', payload: {foo: 'bar'}}]})
};
fetch('https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/events"
payload = { "events": [
{
"type": "apps.someApp.someCustomEvent",
"payload": { "foo": "bar" }
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)[
{
"id": "evt_abc123",
"type": "runtime.executed.automation",
"createdAt": "2024-01-15T10:30:00Z",
"size": 256,
"source": {
"workspaceId": "ws_456",
"automationSlug": "send-welcome-email"
},
"payload": {
"slug": "send-welcome-email",
"output": "{{result}}"
}
}
]{
"error": "BadParameters",
"message": "<string>",
"details": "<unknown>"
}{
"error": "AuthenticationError",
"message": "Unauthenticated"
}{
"error": "ForbiddenError",
"message": "Forbidden"
}{
"error": "ObjectNotFound",
"message": "<string>"
}Send Workspace Event
Emit a new event in this workspace
curl --request POST \
--url https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [
{
"type": "apps.someApp.someCustomEvent",
"payload": {
"foo": "bar"
}
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({events: [{type: 'apps.someApp.someCustomEvent', payload: {foo: 'bar'}}]})
};
fetch('https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/events"
payload = { "events": [
{
"type": "apps.someApp.someCustomEvent",
"payload": { "foo": "bar" }
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)[
{
"id": "evt_abc123",
"type": "runtime.executed.automation",
"createdAt": "2024-01-15T10:30:00Z",
"size": 256,
"source": {
"workspaceId": "ws_456",
"automationSlug": "send-welcome-email"
},
"payload": {
"slug": "send-welcome-email",
"output": "{{result}}"
}
}
]{
"error": "BadParameters",
"message": "<string>",
"details": "<unknown>"
}{
"error": "AuthenticationError",
"message": "Unauthenticated"
}{
"error": "ForbiddenError",
"message": "Forbidden"
}{
"error": "ObjectNotFound",
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of workspace to listen to
Body
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
- Option 15
- Option 16
- Option 17
- Option 18
[
{
"type": "apps.someApp.someCustomEvent",
"payload": { "foo": "bar" }
}
]
Response
Success Response
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
- Option 15
- Option 16
- Option 17
- Option 18
- Option 19
"apps.someApp.someCustomEvent"
Hide child attributes
Hide child attributes
Identifier of the organization API key that originated the interaction, when applicable. Propagates across nested automation calls, cross-workspace fetches and event-triggered automations.
Creation date (ISO8601)
Hide child attributes
Hide 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
[
{
"id": "evt_abc123",
"type": "runtime.executed.automation",
"createdAt": "2024-01-15T10:30:00Z",
"size": 256,
"source": {
"workspaceId": "ws_456",
"automationSlug": "send-welcome-email"
},
"payload": {
"slug": "send-welcome-email",
"output": "{{result}}"
}
}
]
Was this page helpful?