> ## Documentation Index
> Fetch the complete documentation index at: https://developer.box.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflows resources

Box Relay Workflows are objects that represent a named collection of flows.

## Workflow

Box Relay Workflows are objects that represent a named collection of flows. Your application must be authorized to use the `Manage Box Relay` application scope within the developer console in order to use this resource.

<Accordion title="Attributes and example">
  | Property      | Type              | Required | Description                                                         |
  | ------------- | ----------------- | -------- | ------------------------------------------------------------------- |
  | `id`          | `string`          | No       | The unique identifier for the workflow.                             |
  | `type`        | `enum<string>`    | No       | The value will always be `workflow`. Available options: `workflow`. |
  | `name`        | `string`          | No       | The name of the workflow.                                           |
  | `description` | `string`          | No       | The description for a workflow.                                     |
  | `is_enabled`  | `boolean`         | No       | Specifies if this workflow is enabled.                              |
  | `flows`       | array of `object` | No       | A list of flows assigned to a workflow.                             |

  ```json Example theme={null}
  {
    "id": "11446498",
    "type": "workflow",
    "name": "New Hire Workflow",
    "description": "This workflow sets off a new hire approval flow",
    "is_enabled": true,
    "flows": [
      {
        "id": "12345",
        "type": "flow",
        "trigger": {
          "type": "trigger",
          "trigger_type": "WORKFLOW_MANUAL_START",
          "scope": [
            {
              "type": "trigger_scope",
              "ref": "/event/source/parameters/folder",
              "object": {
                "type": "folder",
                "id": "12345"
              }
            }
          ]
        },
        "outcomes": [
          {
            "id": "12345",
            "type": "outcome",
            "name": "Task Approval Outcome",
            "action_type": "assign_task",
            "if_rejected": [
              {
                "id": "12345",
                "type": "outcome",
                "name": "Approval Rejection Outcome",
                "action_type": "assign_task"
              }
            ]
          }
        ],
        "created_at": "2012-12-12T10:53:43-08:00",
        "created_by": {
          "id": "11446498",
          "type": "user"
        }
      }
    ]
  }
  ```
</Accordion>

## Workflow (Mini)

Box Relay Workflows are objects that represent a named collection of flows. You application must be authorized to use the `Manage Box Relay` application scope within the developer console in order to use this resource.

<Accordion title="Attributes and example">
  | Property      | Type           | Required | Description                                                         |
  | ------------- | -------------- | -------- | ------------------------------------------------------------------- |
  | `id`          | `string`       | No       | The unique identifier for the workflow.                             |
  | `type`        | `enum<string>` | No       | The value will always be `workflow`. Available options: `workflow`. |
  | `name`        | `string`       | No       | The name of the workflow.                                           |
  | `description` | `string`       | No       | The description for a workflow.                                     |
  | `is_enabled`  | `boolean`      | No       | Specifies if this workflow is enabled.                              |

  ```json Example theme={null}
  {
    "id": "11446498",
    "type": "workflow",
    "name": "New Hire Workflow",
    "description": "This workflow sets off a new hire approval flow",
    "is_enabled": true
  }
  ```
</Accordion>

## Workflows

A list of workflows. You application must be authorized to use the `Manage Box Relay` application scope within the developer console in order to use this resource.

<Accordion title="Attributes and example">
  | Property      | Type                           | Required | Description                                                                                                                                                                            |
  | ------------- | ------------------------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `limit`       | `integer`                      | No       | The limit that was used for these entries. This will be the same as the `limit` query parameter unless that value exceeded the maximum value allowed. The maximum value varies by API. |
  | `next_marker` | `string`                       | No       | The marker for the start of the next page of results. Can be `null`.                                                                                                                   |
  | `prev_marker` | `string`                       | No       | The marker for the start of the previous page of results. Can be `null`.                                                                                                               |
  | `entries`     | array of [Workflow](#workflow) | No       | A list of workflows.                                                                                                                                                                   |

  ```json Example theme={null}
  {
    "limit": 1000,
    "next_marker": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii",
    "prev_marker": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVih",
    "entries": [
      {
        "id": "11446498",
        "type": "workflow",
        "name": "New Hire Workflow",
        "description": "This workflow sets off a new hire approval flow",
        "is_enabled": true,
        "flows": [
          {
            "id": "12345",
            "type": "flow",
            "trigger": {
              "type": "trigger",
              "trigger_type": "WORKFLOW_MANUAL_START",
              "scope": [
                {
                  "type": "trigger_scope",
                  "ref": "/event/source/parameters/folder",
                  "object": {
                    "type": "folder",
                    "id": "12345"
                  }
                }
              ]
            },
            "outcomes": [
              {
                "id": "12345",
                "type": "outcome",
                "name": "Task Approval Outcome",
                "action_type": "assign_task",
                "if_rejected": [
                  {
                    "id": "12345",
                    "type": "outcome",
                    "name": "Approval Rejection Outcome",
                    "action_type": "assign_task"
                  }
                ]
              }
            ],
            "created_at": "2012-12-12T10:53:43-08:00",
            "created_by": {
              "id": "11446498",
              "type": "user"
            }
          }
        ]
      }
    ]
  }
  ```
</Accordion>
