API reference
Platform
- Search
- Users
- Teams
- Tickets
- Tags
- Ticket tags
- Accounts
- Forms
- Comments
- Emoji actions
- Custom fields
- Custom object fields
- Custom objects
- Object records
- Views
- Views types
- Draft tickets
- Storage
- Reactions
Workflows
- Workflows
- GETAvailable filter operators and logical operators to use in workflow filters
- POSTCreate a new workflow
- DELDelete a workflow
- GETGet activity registry
- GETGet all the executions of a workflow
- GETGet all the tasks of a workflow execution
- GETGet all the workflows defined by the organization
- GETGet all the workflows defined by the organization
- GETGet event registry
- POSTToggle a workflow
- PATCHUpdate a workflow
- GET
Apps platform
- App creation
- App installation
- App uninstallation
- App reinstallation
- Incoming webhook
Workflows
Create a new workflow
POST
/
api
/
v1
/
workflows
Create a new workflow
Copy
Ask AI
curl --request POST \
--url https://workflow-app.thena.ai/api/v1/workflows \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"name": "<string>",
"type": "MANUAL",
"subType": "WORKFLOW",
"triggerEvent": "<string>",
"filters": {
"{{context.name}}": {
"~starts": "T"
}
},
"annotations": [
{
"entityType": "Ticket",
"requiredFields": {
"ticketId": "{{context.event.message.payload.ticketId}}"
},
"relations": [
"account",
"account.classification"
],
"pathToAnnotate": "context.event.message.payload.ticket"
}
],
"workflowDefinition": [
{
"stepIdentifier": 123,
"activity": {
"uniqueIdentifier": "<string>",
"autoUpgradeToLatestVersion": true,
"version": 123
},
"input": {},
"retryPolicy": {
"maximumAttempts": 123,
"initialInterval": 123,
"backoffCoefficient": 123
},
"onFailure": "ABORT",
"executionTimeout": 123,
"isSleepActivity": true,
"dependencies": [
"<string>"
],
"requireApproval": true,
"approver": {},
"filters": {},
"compensationActivity": {
"activity": {
"uniqueIdentifier": "<string>",
"autoUpgradeToLatestVersion": true,
"version": 123
},
"input": {}
}
}
],
"executingAgent": "<string>",
"teamId": "<string>",
"metadata": {}
}'
Copy
Ask AI
{
"uid": "<string>",
"type": "<string>",
"subType": "<string>",
"uniqueIdentifier": "<string>",
"name": "<string>",
"version": 123,
"triggerEvent": {
"uid": "<string>",
"description": "<string>",
"eventName": "<string>",
"source": "platform_app",
"schema": {},
"metadata": {}
},
"filters": {},
"annotations": [
"<string>"
],
"workflowDefinition": [
{
"stepIdentifier": 123,
"activity": {
"name": "<string>",
"uniqueIdentifier": "<string>",
"version": 123,
"autoUpgradeToLatestVersion": true
},
"input": {},
"retryPolicy": {
"maximumAttempts": 123,
"initialInterval": 123,
"backoffCoefficient": 123
},
"onFailure": "<string>",
"isSleepActivity": true,
"executionTimeout": 123,
"approver": {
"type": "TEAM",
"uid": "<string>",
"timeout": 123
},
"dependencies": [
"<string>"
],
"filters": {},
"compensationActivity": {}
}
],
"executingAgent": "<string>",
"isActive": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"teamId": "<string>",
"metadata": {}
}
Authorizations
Enter your API key
Body
application/json
Response
201
application/json
Operation successful
The response is of type object
.
Create a new workflow
Copy
Ask AI
curl --request POST \
--url https://workflow-app.thena.ai/api/v1/workflows \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"name": "<string>",
"type": "MANUAL",
"subType": "WORKFLOW",
"triggerEvent": "<string>",
"filters": {
"{{context.name}}": {
"~starts": "T"
}
},
"annotations": [
{
"entityType": "Ticket",
"requiredFields": {
"ticketId": "{{context.event.message.payload.ticketId}}"
},
"relations": [
"account",
"account.classification"
],
"pathToAnnotate": "context.event.message.payload.ticket"
}
],
"workflowDefinition": [
{
"stepIdentifier": 123,
"activity": {
"uniqueIdentifier": "<string>",
"autoUpgradeToLatestVersion": true,
"version": 123
},
"input": {},
"retryPolicy": {
"maximumAttempts": 123,
"initialInterval": 123,
"backoffCoefficient": 123
},
"onFailure": "ABORT",
"executionTimeout": 123,
"isSleepActivity": true,
"dependencies": [
"<string>"
],
"requireApproval": true,
"approver": {},
"filters": {},
"compensationActivity": {
"activity": {
"uniqueIdentifier": "<string>",
"autoUpgradeToLatestVersion": true,
"version": 123
},
"input": {}
}
}
],
"executingAgent": "<string>",
"teamId": "<string>",
"metadata": {}
}'
Copy
Ask AI
{
"uid": "<string>",
"type": "<string>",
"subType": "<string>",
"uniqueIdentifier": "<string>",
"name": "<string>",
"version": 123,
"triggerEvent": {
"uid": "<string>",
"description": "<string>",
"eventName": "<string>",
"source": "platform_app",
"schema": {},
"metadata": {}
},
"filters": {},
"annotations": [
"<string>"
],
"workflowDefinition": [
{
"stepIdentifier": 123,
"activity": {
"name": "<string>",
"uniqueIdentifier": "<string>",
"version": 123,
"autoUpgradeToLatestVersion": true
},
"input": {},
"retryPolicy": {
"maximumAttempts": 123,
"initialInterval": 123,
"backoffCoefficient": 123
},
"onFailure": "<string>",
"isSleepActivity": true,
"executionTimeout": 123,
"approver": {
"type": "TEAM",
"uid": "<string>",
"timeout": 123
},
"dependencies": [
"<string>"
],
"filters": {},
"compensationActivity": {}
}
],
"executingAgent": "<string>",
"isActive": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"teamId": "<string>",
"metadata": {}
}
Assistant
Responses are generated using AI and may contain mistakes.