> For the complete documentation index, see [llms.txt](https://developer.jylo.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.jylo.ai/api-reference/projects/flow-documents.md).

# Flow Documents

## List documents in a flow collection.

> Returns a paginated list of documents in the specified flow document collection, including the total count for pagination.

```json
{"openapi":"3.0.4","info":{"title":"Project 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.Projects.Services.Features.FlowDocuments.Application.Queries.GetFlowDocumentsByCollection.GetFlowDocumentsByCollectionResponse":{"type":"object","properties":{"totalCount":{"type":"integer","format":"int32"},"skip":{"type":"integer","format":"int32"},"take":{"type":"integer","format":"int32"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowDocuments.Contracts.Responses.FlowDocumentResponse"},"nullable":true}},"additionalProperties":false},"Jylo.Projects.Services.Features.FlowDocuments.Contracts.Responses.FlowDocumentResponse":{"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"flowDocumentCollectionObjectIdentifier":{"type":"string","format":"uuid"},"dateAdded":{"type":"string","format":"date-time"},"document":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowDocuments.Contracts.Responses.DocumentResponse"}},"additionalProperties":false},"Jylo.Projects.Services.Features.FlowDocuments.Contracts.Responses.DocumentResponse":{"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"contentType":{"type":"string","nullable":true},"extension":{"type":"string","nullable":true},"size":{"type":"integer","format":"int64","nullable":true},"dateAdded":{"type":"string","format":"date-time"},"fileType":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.FileType"},"tokenCount":{"type":"integer","format":"int32","nullable":true},"pageCount":{"type":"integer","format":"int32","nullable":true},"convertedToPdf":{"type":"boolean"},"folder":{"type":"string","nullable":true},"filePath":{"type":"string","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.Constants.FileType":{"enum":["unknown","image","video","text","audio","directory"],"type":"string"},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/flow-document-collections/{collectionObjectIdentifier}/documents":{"get":{"tags":["Flow Documents"],"summary":"List documents in a flow collection.","description":"Returns a paginated list of documents in the specified flow document collection, including the total count for pagination.","parameters":[{"name":"collectionObjectIdentifier","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"skip","in":"query","schema":{"type":"integer","format":"int32","default":0}},{"name":"take","in":"query","schema":{"type":"integer","format":"int32","default":50}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowDocuments.Application.Queries.GetFlowDocumentsByCollection.GetFlowDocumentsByCollectionResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowDocuments.Application.Queries.GetFlowDocumentsByCollection.GetFlowDocumentsByCollectionResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowDocuments.Application.Queries.GetFlowDocumentsByCollection.GetFlowDocumentsByCollectionResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Add a document to a flow collection.

> Links an existing document into a flow document collection so it can be used by flows in the project.

```json
{"openapi":"3.0.4","info":{"title":"Project 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.Projects.Models.Flows.FlowDocuments.AddFlowDocumentRequest":{"required":["documentObjectIdentifier"],"type":"object","properties":{"documentObjectIdentifier":{"type":"string","format":"uuid"}},"additionalProperties":false},"Jylo.Projects.Services.Features.FlowDocuments.Contracts.Responses.FlowDocumentResponse":{"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"flowDocumentCollectionObjectIdentifier":{"type":"string","format":"uuid"},"dateAdded":{"type":"string","format":"date-time"},"document":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowDocuments.Contracts.Responses.DocumentResponse"}},"additionalProperties":false},"Jylo.Projects.Services.Features.FlowDocuments.Contracts.Responses.DocumentResponse":{"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"contentType":{"type":"string","nullable":true},"extension":{"type":"string","nullable":true},"size":{"type":"integer","format":"int64","nullable":true},"dateAdded":{"type":"string","format":"date-time"},"fileType":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.FileType"},"tokenCount":{"type":"integer","format":"int32","nullable":true},"pageCount":{"type":"integer","format":"int32","nullable":true},"convertedToPdf":{"type":"boolean"},"folder":{"type":"string","nullable":true},"filePath":{"type":"string","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.Constants.FileType":{"enum":["unknown","image","video","text","audio","directory"],"type":"string"},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/flow-document-collections/{collectionObjectIdentifier}/documents":{"post":{"tags":["Flow Documents"],"summary":"Add a document to a flow collection.","description":"Links an existing document into a flow document collection so it can be used by flows in the project.","parameters":[{"name":"collectionObjectIdentifier","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Models.Flows.FlowDocuments.AddFlowDocumentRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Models.Flows.FlowDocuments.AddFlowDocumentRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Models.Flows.FlowDocuments.AddFlowDocumentRequest"}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowDocuments.Contracts.Responses.FlowDocumentResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowDocuments.Contracts.Responses.FlowDocumentResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowDocuments.Contracts.Responses.FlowDocumentResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"409":{"description":"Conflict","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Remove a document from a flow collection.

> Unlinks a document from its flow document collection. The original document is not deleted, only its association with the collection. All prompt answers for that collection are deleted because they are no longer valid once the collection's documents change.

```json
{"openapi":"3.0.4","info":{"title":"Project 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":{"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/flow-documents/{objectIdentifier}":{"delete":{"tags":["Flow Documents"],"summary":"Remove a document from a flow collection.","description":"Unlinks a document from its flow document collection. The original document is not deleted, only its association with the collection. All prompt answers for that collection are deleted because they are no longer valid once the collection's documents change.","parameters":[{"name":"objectIdentifier","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## List flow reference material documents.

> Returns a paginated list of the documents and folders directly inside a flow reference material's folder, or at its top level when no parent is given.

```json
{"openapi":"3.0.4","info":{"title":"Project 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":{"PaginationList.FlowSourceDocumentResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowSourceDocuments.Contracts.Responses.FlowSourceDocumentResponse"},"nullable":true},"totalCount":{"type":"integer","format":"int32"}},"additionalProperties":false},"Jylo.Projects.Services.Features.FlowSourceDocuments.Contracts.Responses.FlowSourceDocumentResponse":{"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"isDirectory":{"type":"boolean"},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"documentUploadObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"flowReferenceMaterialObjectIdentifier":{"type":"string","format":"uuid"},"dateAdded":{"type":"string","format":"date-time"},"extension":{"type":"string","nullable":true},"resourceOwnerId":{"type":"string","nullable":true},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.Integrations.IdentityService.Models.OrganizationMember"}},"additionalProperties":false},"Jylo.Toolkit.Integrations.IdentityService.Models.OrganizationMember":{"required":["id","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"picture":{"type":"string","nullable":true},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.Integrations.IdentityService.Models.Role"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.Integrations.IdentityService.Models.Role":{"required":["id","name"],"type":"object","properties":{"id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/flows/{flowObjectIdentifier}/reference-materials/{referenceMaterialObjectIdentifier}/documents":{"get":{"tags":["Flow Documents"],"summary":"List flow reference material documents.","description":"Returns a paginated list of the documents and folders directly inside a flow reference material's folder, or at its top level when no parent is given.","parameters":[{"name":"referenceMaterialObjectIdentifier","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"pageNumber","in":"query","schema":{"type":"integer","format":"int32","default":1}},{"name":"pageSize","in":"query","schema":{"type":"integer","format":"int32","default":20}},{"name":"parentObjectIdentifier","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"flowObjectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/PaginationList.FlowSourceDocumentResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/PaginationList.FlowSourceDocumentResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/PaginationList.FlowSourceDocumentResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Create a flow document or folder.

> Creates a new document or folder within a flow reference material's file tree, optionally nested under a parent folder.

```json
{"openapi":"3.0.4","info":{"title":"Project 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.Projects.Services.Features.FlowSourceDocuments.Contracts.Requests.CreateFlowSourceDocumentRequest":{"required":["name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"isDirectory":{"type":"boolean"},"documentUploadObjectIdentifier":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false},"Jylo.Projects.Services.Features.FlowSourceDocuments.Contracts.Responses.FlowSourceDocumentResponse":{"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"isDirectory":{"type":"boolean"},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"documentUploadObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"flowReferenceMaterialObjectIdentifier":{"type":"string","format":"uuid"},"dateAdded":{"type":"string","format":"date-time"},"extension":{"type":"string","nullable":true},"resourceOwnerId":{"type":"string","nullable":true},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.Integrations.IdentityService.Models.OrganizationMember"}},"additionalProperties":false},"Jylo.Toolkit.Integrations.IdentityService.Models.OrganizationMember":{"required":["id","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"picture":{"type":"string","nullable":true},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.Integrations.IdentityService.Models.Role"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.Integrations.IdentityService.Models.Role":{"required":["id","name"],"type":"object","properties":{"id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/flows/{flowObjectIdentifier}/reference-materials/{referenceMaterialObjectIdentifier}/documents":{"post":{"tags":["Flow Documents"],"summary":"Create a flow document or folder.","description":"Creates a new document or folder within a flow reference material's file tree, optionally nested under a parent folder.","parameters":[{"name":"referenceMaterialObjectIdentifier","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"flowObjectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowSourceDocuments.Contracts.Requests.CreateFlowSourceDocumentRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowSourceDocuments.Contracts.Requests.CreateFlowSourceDocumentRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowSourceDocuments.Contracts.Requests.CreateFlowSourceDocumentRequest"}}}},"responses":{"201":{"description":"Created","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowSourceDocuments.Contracts.Responses.FlowSourceDocumentResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowSourceDocuments.Contracts.Responses.FlowSourceDocumentResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowSourceDocuments.Contracts.Responses.FlowSourceDocumentResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Get a flow document by id.

> Returns the details of a single document or folder within a flow reference material.

```json
{"openapi":"3.0.4","info":{"title":"Project 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.Projects.Services.Features.FlowSourceDocuments.Contracts.Responses.FlowSourceDocumentResponse":{"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"isDirectory":{"type":"boolean"},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"documentUploadObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"flowReferenceMaterialObjectIdentifier":{"type":"string","format":"uuid"},"dateAdded":{"type":"string","format":"date-time"},"extension":{"type":"string","nullable":true},"resourceOwnerId":{"type":"string","nullable":true},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.Integrations.IdentityService.Models.OrganizationMember"}},"additionalProperties":false},"Jylo.Toolkit.Integrations.IdentityService.Models.OrganizationMember":{"required":["id","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"picture":{"type":"string","nullable":true},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.Integrations.IdentityService.Models.Role"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.Integrations.IdentityService.Models.Role":{"required":["id","name"],"type":"object","properties":{"id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/flows/{flowObjectIdentifier}/reference-materials/{referenceMaterialObjectIdentifier}/documents/{objectIdentifier}":{"get":{"tags":["Flow Documents"],"summary":"Get a flow document by id.","description":"Returns the details of a single document or folder within a flow reference material.","parameters":[{"name":"objectIdentifier","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"flowObjectIdentifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"referenceMaterialObjectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowSourceDocuments.Contracts.Responses.FlowSourceDocumentResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowSourceDocuments.Contracts.Responses.FlowSourceDocumentResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowSourceDocuments.Contracts.Responses.FlowSourceDocumentResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Update a flow document.

> Updates a flow document or folder, for example to move it to a different parent folder.

```json
{"openapi":"3.0.4","info":{"title":"Project 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.Projects.Services.Features.FlowSourceDocuments.Contracts.Requests.UpdateFlowSourceDocumentRequest":{"type":"object","properties":{"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false},"Jylo.Projects.Services.Features.FlowSourceDocuments.Contracts.Responses.FlowSourceDocumentResponse":{"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"isDirectory":{"type":"boolean"},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"documentUploadObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"flowReferenceMaterialObjectIdentifier":{"type":"string","format":"uuid"},"dateAdded":{"type":"string","format":"date-time"},"extension":{"type":"string","nullable":true},"resourceOwnerId":{"type":"string","nullable":true},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.Integrations.IdentityService.Models.OrganizationMember"}},"additionalProperties":false},"Jylo.Toolkit.Integrations.IdentityService.Models.OrganizationMember":{"required":["id","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"picture":{"type":"string","nullable":true},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.Integrations.IdentityService.Models.Role"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.Integrations.IdentityService.Models.Role":{"required":["id","name"],"type":"object","properties":{"id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/flows/{flowObjectIdentifier}/reference-materials/{referenceMaterialObjectIdentifier}/documents/{objectIdentifier}":{"put":{"tags":["Flow Documents"],"summary":"Update a flow document.","description":"Updates a flow document or folder, for example to move it to a different parent folder.","parameters":[{"name":"objectIdentifier","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"flowObjectIdentifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"referenceMaterialObjectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowSourceDocuments.Contracts.Requests.UpdateFlowSourceDocumentRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowSourceDocuments.Contracts.Requests.UpdateFlowSourceDocumentRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowSourceDocuments.Contracts.Requests.UpdateFlowSourceDocumentRequest"}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowSourceDocuments.Contracts.Responses.FlowSourceDocumentResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowSourceDocuments.Contracts.Responses.FlowSourceDocumentResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Services.Features.FlowSourceDocuments.Contracts.Responses.FlowSourceDocumentResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Delete a flow document or folder.

> Permanently deletes a document or folder from a flow reference material.

```json
{"openapi":"3.0.4","info":{"title":"Project 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":{"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/flows/{flowObjectIdentifier}/reference-materials/{referenceMaterialObjectIdentifier}/documents/{objectIdentifier}":{"delete":{"tags":["Flow Documents"],"summary":"Delete a flow document or folder.","description":"Permanently deletes a document or folder from a flow reference material.","parameters":[{"name":"objectIdentifier","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"flowObjectIdentifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"referenceMaterialObjectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Download a flow document file.

> Streams the file content of a flow document, optionally as a PDF rendition.

```json
{"openapi":"3.0.4","info":{"title":"Project 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":{"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/flows/{flowObjectIdentifier}/reference-materials/{referenceMaterialObjectIdentifier}/documents/{objectIdentifier}/download":{"get":{"tags":["Flow Documents"],"summary":"Download a flow document file.","description":"Streams the file content of a flow document, optionally as a PDF rendition.","parameters":[{"name":"objectIdentifier","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"usePdf","in":"query","schema":{"type":"boolean","default":false}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"flowObjectIdentifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"referenceMaterialObjectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"string","format":"binary"}},"text/json":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.jylo.ai/api-reference/projects/flow-documents.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
