# Flows

## Gets all flows for the specified playbook.

> Retrieves a paginated list of all flows for the specified playbook, with optional search and sorting.

```json
{"openapi":"3.0.4","info":{"title":"Playbook Marketplace API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.Sorting.ItemSorting":{"enum":[0],"type":"integer","format":"int32"},"Jylo.Toolkit.API.Models.Container.Review.FlowReadModel":{"required":["allDocuments","description","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"allDocuments":{"type":"boolean"},"documentTypeMapping":{"type":"object","additionalProperties":{"type":"string","format":"uuid"},"nullable":true},"documentObjectIdentifiers":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"playbookIdentifier":{"type":"string","format":"uuid","nullable":true},"dateAdded":{"type":"string","format":"date-time"},"objectIdentifier":{"type":"string","format":"uuid"},"isDirectory":{"type":"boolean"},"hasAssembly":{"type":"boolean"},"hasDocumentAssembly":{"type":"boolean"},"hasChildren":{"type":"boolean","nullable":true},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"},"flowColumns":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.FlowColumnReadModel"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.OrganizationMemberModel":{"required":["id","name"],"type":"object","properties":{"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.Container.Review.FlowColumnReadModel":{"type":"object","properties":{"promptObjectIdentifier":{"type":"string","format":"uuid"},"objectIdentifier":{"type":"string","format":"uuid"},"promptLabel":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/playbooks/{playbookIdentifier}/flows":{"get":{"tags":["Flows"],"summary":"Gets all flows for the specified playbook.","description":"Retrieves a paginated list of all flows for the specified playbook, with optional search and sorting.","parameters":[{"name":"flatten","in":"query","description":"Whether to flatten the flow tree.","schema":{"type":"boolean"}},{"name":"parentObjectIdentifier","in":"query","description":"Optional parent object identifier.","schema":{"type":"string","format":"uuid"}},{"name":"pageNumber","in":"query","description":"The page number for paginated results.","schema":{"type":"integer","format":"int32"}},{"name":"pageSize","in":"query","description":"The number of items per page.","schema":{"type":"integer","format":"int32"}},{"name":"searchText","in":"query","description":"Optional search text to filter results.","schema":{"type":"string"}},{"name":"sorting","in":"query","description":"The sorting option for the results.","schema":{"$ref":"#/components/schemas/Jylo.Toolkit.Sorting.ItemSorting"}},{"name":"desc","in":"query","description":"Whether to sort in descending order.","schema":{"type":"boolean","default":true}},{"name":"playbookIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.FlowReadModel"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.FlowReadModel"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.FlowReadModel"}}}}},"403":{"description":"Forbidden"}}}}}}
```

## Creates a new flow for the specified playbook.

> Creates a new flow for the specified playbook.

```json
{"openapi":"3.0.4","info":{"title":"Playbook Marketplace API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.PlaybookMarketplace.Models.AddPlaybookFlowModel":{"required":["allDocuments","description","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"allDocuments":{"type":"boolean"},"documentObjectIdentifiers":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true},"documentTypeMapping":{"type":"object","additionalProperties":{"type":"string","format":"uuid"},"nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.Container.Review.FlowReadModel":{"required":["allDocuments","description","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"allDocuments":{"type":"boolean"},"documentTypeMapping":{"type":"object","additionalProperties":{"type":"string","format":"uuid"},"nullable":true},"documentObjectIdentifiers":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"playbookIdentifier":{"type":"string","format":"uuid","nullable":true},"dateAdded":{"type":"string","format":"date-time"},"objectIdentifier":{"type":"string","format":"uuid"},"isDirectory":{"type":"boolean"},"hasAssembly":{"type":"boolean"},"hasDocumentAssembly":{"type":"boolean"},"hasChildren":{"type":"boolean","nullable":true},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"},"flowColumns":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.FlowColumnReadModel"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.OrganizationMemberModel":{"required":["id","name"],"type":"object","properties":{"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.Container.Review.FlowColumnReadModel":{"type":"object","properties":{"promptObjectIdentifier":{"type":"string","format":"uuid"},"objectIdentifier":{"type":"string","format":"uuid"},"promptLabel":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/playbooks/{playbookIdentifier}/flows":{"post":{"tags":["Flows"],"summary":"Creates a new flow for the specified playbook.","description":"Creates a new flow for the specified playbook.","parameters":[{"name":"playbookIdentifier","in":"path","description":"The object identifier of the playbook.","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"The flow data to create.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.PlaybookMarketplace.Models.AddPlaybookFlowModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.PlaybookMarketplace.Models.AddPlaybookFlowModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.PlaybookMarketplace.Models.AddPlaybookFlowModel"}}}},"responses":{"201":{"description":"Created","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.FlowReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.FlowReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.FlowReadModel"}}}},"400":{"description":"Bad Request"},"403":{"description":"Forbidden"}}}}}}
```

## Creates a new folder for flows.

> Creates a new folder for flows.

```json
{"openapi":"3.0.4","info":{"title":"Playbook Marketplace API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.API.Models.FolderWriteModel":{"required":["name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.FolderReadModel":{"required":["dateAdded","name","objectIdentifier"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"dateAdded":{"type":"string","format":"date-time"},"objectIdentifier":{"type":"string","format":"uuid"}},"additionalProperties":false}}},"paths":{"/playbooks/{playbookIdentifier}/flows/folder":{"post":{"tags":["Flows"],"summary":"Creates a new folder for flows.","description":"Creates a new folder for flows.","parameters":[{"name":"playbookIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The folder data to create.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.FolderWriteModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.FolderWriteModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.FolderWriteModel"}}}},"responses":{"201":{"description":"Created","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.FolderReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.FolderReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.FolderReadModel"}}}},"400":{"description":"Bad Request"},"403":{"description":"Forbidden"}}}}}}
```

## Stops a flow that is in progress.

> Stop a flow that is in progress.

```json
{"openapi":"3.0.4","info":{"title":"Playbook Marketplace API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/playbooks/{playbookIdentifier}/flows/{flowObjectIdentifier}/stop":{"patch":{"tags":["Flows"],"summary":"Stops a flow that is in progress.","description":"Stop a flow that is in progress.","parameters":[{"name":"flowObjectIdentifier","in":"path","description":"The object identifier of the flow to stop.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"playbookIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}}}}
```

## Gets the details of a specific flow by its object identifier.

> Retrieves the details of a flow using its object identifier.

```json
{"openapi":"3.0.4","info":{"title":"Playbook Marketplace API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.API.Models.Container.Review.FlowReadModel":{"required":["allDocuments","description","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"allDocuments":{"type":"boolean"},"documentTypeMapping":{"type":"object","additionalProperties":{"type":"string","format":"uuid"},"nullable":true},"documentObjectIdentifiers":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"playbookIdentifier":{"type":"string","format":"uuid","nullable":true},"dateAdded":{"type":"string","format":"date-time"},"objectIdentifier":{"type":"string","format":"uuid"},"isDirectory":{"type":"boolean"},"hasAssembly":{"type":"boolean"},"hasDocumentAssembly":{"type":"boolean"},"hasChildren":{"type":"boolean","nullable":true},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"},"flowColumns":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.FlowColumnReadModel"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.OrganizationMemberModel":{"required":["id","name"],"type":"object","properties":{"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.Container.Review.FlowColumnReadModel":{"type":"object","properties":{"promptObjectIdentifier":{"type":"string","format":"uuid"},"objectIdentifier":{"type":"string","format":"uuid"},"promptLabel":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/playbooks/{playbookIdentifier}/flows/{objectIdentifier}":{"get":{"tags":["Flows"],"summary":"Gets the details of a specific flow by its object identifier.","description":"Retrieves the details of a flow using its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","description":"The object identifier of the flow.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"playbookIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.FlowReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.FlowReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.FlowReadModel"}}}},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}}}}
```

## Updates an existing flow by its object identifier.

> Updates the details of an existing flow using its object identifier.

```json
{"openapi":"3.0.4","info":{"title":"Playbook Marketplace API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.API.Models.Container.Review.FlowWriteModel":{"required":["allDocuments","description","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"allDocuments":{"type":"boolean"},"documentTypeMapping":{"type":"object","additionalProperties":{"type":"string","format":"uuid"},"nullable":true},"documentObjectIdentifiers":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"playbookIdentifier":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.Container.Review.FlowReadModel":{"required":["allDocuments","description","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"allDocuments":{"type":"boolean"},"documentTypeMapping":{"type":"object","additionalProperties":{"type":"string","format":"uuid"},"nullable":true},"documentObjectIdentifiers":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"playbookIdentifier":{"type":"string","format":"uuid","nullable":true},"dateAdded":{"type":"string","format":"date-time"},"objectIdentifier":{"type":"string","format":"uuid"},"isDirectory":{"type":"boolean"},"hasAssembly":{"type":"boolean"},"hasDocumentAssembly":{"type":"boolean"},"hasChildren":{"type":"boolean","nullable":true},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"},"flowColumns":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.FlowColumnReadModel"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.OrganizationMemberModel":{"required":["id","name"],"type":"object","properties":{"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.Container.Review.FlowColumnReadModel":{"type":"object","properties":{"promptObjectIdentifier":{"type":"string","format":"uuid"},"objectIdentifier":{"type":"string","format":"uuid"},"promptLabel":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/playbooks/{playbookIdentifier}/flows/{objectIdentifier}":{"put":{"tags":["Flows"],"summary":"Updates an existing flow by its object identifier.","description":"Updates the details of an existing flow using its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","description":"The object identifier of the flow to update.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"playbookIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The updated flow data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.FlowWriteModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.FlowWriteModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.FlowWriteModel"}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.FlowReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.FlowReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.FlowReadModel"}}}},"400":{"description":"Bad Request"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}}}}
```

## Deletes a flow by its object identifier.

> Deletes a flow using its object identifier.

```json
{"openapi":"3.0.4","info":{"title":"Playbook Marketplace API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/playbooks/{playbookIdentifier}/flows/{objectIdentifier}":{"delete":{"tags":["Flows"],"summary":"Deletes a flow by its object identifier.","description":"Deletes a flow using its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","description":"The object identifier of the flow to delete.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"playbookIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}}}}
```

## Gets the progress of a flow by its object identifier.

> Retrieves the progress of a flow using its object identifier.

```json
{"openapi":"3.0.4","info":{"title":"Playbook Marketplace API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.API.Models.Container.Review.FlowProgressModel":{"type":"object","properties":{"progress":{"type":"number","format":"double"}},"additionalProperties":false}}},"paths":{"/playbooks/{playbookIdentifier}/flows/{objectIdentifier}/progress":{"get":{"tags":["Flows"],"summary":"Gets the progress of a flow by its object identifier.","description":"Retrieves the progress of a flow using its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","description":"The object identifier of the flow.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"playbookIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.FlowProgressModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.FlowProgressModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.FlowProgressModel"}}}},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}}}}
```
