Initiates a flow with a trigger type of WORKFLOW_MANUAL_START
.
You application must be authorized to use the Manage Box Relay
application
scope within the developer console.
"12345"
The ID of the workflow.
"workflow_parameters"
The type of the parameters object
Value is always workflow_parameters
The array of files for which the workflow should start. All files must be in the workflow's configured folder.
"12345678"
The id of the file
"file"
The type of the file object
Value is always file
The flow that will be triggered
"123456789"
The id of the flow
"flow"
The type of the flow object
The folder object for which the workflow is configured.
"87654321"
The id of the folder
"folder"
The type of the folder object
Value is always folder
A list of outcomes required to be configured at start time.
"890375782"
The id of the outcome
"outcome"
The type of the outcome object
Value is always outcome
"placeholder"
This is a placeholder example for various objects that can be passed in - refer to the guides section to find out more information.
Starts the workflow.
Returns an error if some of the parameters are missing or not valid.
workflow_is_not_enabled
when the workflow is not enabledworkflow_not_active_on_provided_folder
when the workflow is not
enabled for the specified folder idparameters_provided_do_not_match_target_outcome
when the provided
parameters do not match the expected parametersReturns an error if there are insufficient permissions.
insufficient_access
when the user does not have access rights to file
or foldermissing_relay_full_access
when the user does not have access to Relay
FullReturns an error if the workflow could not be found, or the authenticated user does not have access to the workflow.
workflow_not_found
when the workflow is not foundflow_missing_or_inaccessible
when the flow is not a manual start flowAn unexpected client error.
curl -i -X POST "https://api.box.com/2.0/workflows/42037322/start" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-d '{
"type": "workflow_parameters",
"flow": {
"id": "8937625",
"type": "flow"
},
"files": [{
"type": "file",
"id": "389047572"
},
{
"type": "file",
"id": "389047578"
}],
"folder": {
"id": "2233212",
"type": "folder"
},
"outcomes": [
{
"id": "34895783",
"type": "outcome",
"task_collaborators": {
"type": "variable",
"variable_type": "user_list",
"variable_value": [{ "type": "user", "id": "890273642" }]
},
"completion_rule": {
"type": "variable",
"variable_type": "task_completion_rule",
"variable_value": "all_assignees"
},
"file_collaborator_role": {
"type": "variable",
"variable_type": "collaborator_role",
"variable_value": "viewer"
}
}
]
}'