Skip to content

Workflows

List of valid attributes:

AttributeDescriptionSpecifics
account_idID of an account a workflow belongs toCannot be set
activeWhether a workflow is active or notCan be true or false, defaults to false
created_atTimestamp of creationCannot be set
descriptionDescription of a workflowOptional
nameName of a workflowMust be set

The following relationships can be included in requests:

RelationshipTypeDescription
actionshas_manyAll the actions that are part of the workflow
workflow_implementationhas_oneA record that has references to the workflow’s trigger and actions

Meta data: Permissions

GroupDescription
actionsContains permissions to edit or delete a workflow

Create

Example request:

{
"data": {
"type": "workflow",
"attributes": {
"name": "Workflow Name",
"description": "Workflow Description"
}
}
}

Example response:

{
"data": {
"id": "95579c3b-20ed-43b8-ab79-d60d05690be5",
"type": "workflow",
"attributes": {
...
}
}
}

This endpoint creates a new workflow.

HTTP Request

POST /api/v1/workflows

Update

Example request:

{
"data": {
"type": "workflow",
"attributes": {
"name": "Updated Workflow Name",
"description": "Updated Workflow Description"
}
}
}

Example response:

{
"data": {
"id": "95579c3b-20ed-43b8-ab79-d60d05690be5",
"type": "workflow",
"attributes": {
...
}
}
}

This endpoint updates a workflow.

HTTP Request

PUT /api/v1/workflows/:workflow_id

URL Parameters

ParameterDescription
workflow_idThe ID of the workflow to update

Show

Example response:

{
"data": {
"id": "14833508-e59c-4177-86db-dda7575ff61e",
"type": "workflow",
"attributes": {
...
}
}
}

This endpoint returns a workflow.

HTTP Request

GET /api/v1/workflows/:workflow_id

URL Parameters

ParameterDescription
workflow_idThe ID of the workflow to return

List

Example response:

{
"data": [
{
"id": "14833508-e59c-4177-86db-dda7575ff61e",
"type": "workflow",
"attributes": {
...
}
},
{
...
}
]
}

This endpoint returns all workflows.

HTTP Request

GET /api/v1/workflows

Delete

Example response:

{
"data": {
"id": "14833508-e59c-4177-86db-dda7575ff61e",
"type": "workflow",
"attributes": {
...
}
}
}

This endpoint deletes a workflow.

HTTP Request

DELETE /api/v1/workflows/:workflow_id

URL Parameters

ParameterDescription
workflow_idThe ID of the workflow to delete