Get a workflow
/api/v1/workflows/{id}Returns one workflow with its trigger, conditions and actions. SLA policies (type sla and ticket_sla) can be read here too.
Secrets of a Send Webhook action (auto.webhook) are hidden: header values, the request body, and the path, credentials and query-string values of the URL are returned as ***redacted***. The scheme, host and port of the URL are kept.
Conditions and actions can carry extra display fields written by the app's workflow builder (uiValue, uiFilterOperator, type, badges, stamp). They are returned as stored.
Required ability: workflows:read.
Request
Authorization
Bearer Token
Provide your API token in the Authorization header. See Authentication to issue one.
Example:Authorization: Bearer ********************
idstring<uuid>requiredThe workflow id (UUID).
Example:6a7b8c9d-0e1f-4a2b-8c3d-4e5f6a7b8c9d
Responses
200The workflow.
The workflow.
idstring<uuid> | nulloptionalnullonly in the preview of a create dry run.namestringoptionaltypestringoptionalAllowed values:"workflow", "sla", "ticket_sla"
priorityinteger | nulloptionalPosition in the evaluation order within its type; 1 is first.
enabledbooleanoptionalcustombooleanoptionaltruefor a workflow that agents run by hand (triggerwhen_manually_triggered).triggerWorkflowTriggeroptionalChild attributes
eventsarray[string]requiredTrigger ids from
GET /api/v1/workflows/schema. The workflow runs when any of them happens. A trigger markedexclusivein the schema cannot be combined with others.Example:["when_chat_room_is_open"]
delaySecondsintegeroptionalSeconds to wait. Required with a trigger marked
supportsDelayin the schema, and not allowed otherwise.
conditionsarray[array[WorkflowCondition]]optionalGroups of conditions. Every group must match (AND); within a group any one condition may match (OR). An empty list means always.
Child attributes
keystringrequiredA condition id from
GET /api/v1/workflows/schema.Example:contact.name
operatorstring | nulloptionalOne of the operators the schema lists for this condition, for example
equalorcontains.valuesanyoptionalWhat to compare with. Its shape depends on the condition (
valueTypein the schema): usually a string, for some conditions an object.uiValuestring | nulloptionalDisplay text used by the app's workflow builder. Optional.
uiFilterOperatorstring | nulloptionalDisplay text used by the app's workflow builder. Optional.
typestring | nulloptionalDisplay hint used by the app's workflow builder. Optional.
badgesanyoptionalDisplay data used by the app's workflow builder. Optional.
actionsarray[WorkflowAction]optionalThe actions, run in order.
Child attributes
keystringrequiredAn action id from
GET /api/v1/workflows/schema.Example:auto.assign
valuesanyoptionalThe action's settings. Its shape depends on the action (
valueTypeandfieldsin the schema): a string or an object.uiValuestring | nulloptionalDisplay text used by the app's workflow builder. Optional.
stampbooleanoptionalShow the action in the inbox when it runs. Only for actions marked
supportsStampin the schema.
createdAtstring<date-time> | nulloptionalupdatedAtstring<date-time> | nulloptional
The API token is missing or invalid.
403The API token does not have the ability this endpoint requires. See "Token abilities" in the introduction.
The API token does not have the ability this endpoint requires. See "Token abilities" in the introduction.
messagestringrequirederrorstringoptionalstatusCodeintegerrequired
404No workflow with this id exists for the token's tenant, or id is not a UUID.
No workflow with this id exists for the token's tenant, or id is not a UUID.
messagestringrequirederrorstringoptionalstatusCodeintegerrequired