# Messages

## Retrieves a paginated list of messages for the specified assistant.

> Retrieves a paginated list of messages for the specified assistant, optionally filtered and sorted.

```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.Toolkit.Sorting.ItemSorting":{"enum":[0],"type":"integer","format":"int32"},"Jylo.Projects.Models.Chat.MessageReadModel":{"required":["assistant","isAssistant","modelIdentifier","text"],"type":"object","properties":{"text":{"type":"string","nullable":true},"messageDocumentIdentifiers":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true},"modelIdentifier":{"type":"string","format":"uuid"},"stream":{"type":"boolean","nullable":true},"objectIdentifier":{"type":"string","format":"uuid"},"textWithCitations":{"type":"string","nullable":true},"dateAdded":{"type":"string","format":"date-time"},"messageResponseTypeId":{"type":"integer","format":"int32","nullable":true},"addingCitations":{"type":"boolean","nullable":true},"assistant":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.AssistantReadModel"},"isAssistant":{"type":"boolean"},"messageCitations":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.CitationReadModel"},"nullable":true},"citationsJsonResponse":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.CitationResponseModel"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"},"nullable":true},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"}},"additionalProperties":false},"Jylo.Projects.Models.Chat.AssistantReadModel":{"required":["name"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"documents":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"},"nullable":true},"dateAdded":{"type":"string","format":"date-time"},"documentMetadata":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.DocumentEntities.DocumentMetadata"},"nullable":true},"estimatedTokenCount":{"type":"integer","format":"int32"},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"}},"additionalProperties":false},"Jylo.Toolkit.API.Models.Documents.DocumentReadModel":{"required":["documentUploadObjectIdentifier","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"isDirectory":{"type":"boolean"},"documentUploadObjectIdentifier":{"type":"string","format":"uuid"},"contentType":{"type":"string","nullable":true},"size":{"type":"integer","format":"int64","nullable":true},"objectIdentifier":{"type":"string","format":"uuid"},"dateAdded":{"type":"string","format":"date-time"},"uploadSuccessful":{"type":"boolean","nullable":true},"tokenCount":{"type":"integer","format":"int64","nullable":true},"metadataTokenCount":{"type":"integer","format":"int64","nullable":true},"unsupportedFileType":{"type":"boolean","nullable":true},"unPackingComplete":{"type":"boolean","nullable":true},"unPackingFailed":{"type":"boolean","nullable":true},"uploadInProgress":{"type":"boolean","nullable":true},"url":{"type":"string","nullable":true},"hasChildren":{"type":"boolean","nullable":true},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"}},"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.Entities.DocumentEntities.DocumentMetadata":{"type":"object","properties":{"paragraphs":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.DocumentEntities.Paragraph"},"nullable":true},"documentObjectIdentifier":{"type":"string","format":"uuid"}},"additionalProperties":false},"Jylo.Toolkit.Entities.DocumentEntities.Paragraph":{"required":["boundingRegions","content","objectIdentifier"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"content":{"type":"string","nullable":true},"boundingRegions":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.DocumentEntities.Bounding"},"nullable":true},"role":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.DocumentEntities.Role"}},"additionalProperties":false},"Jylo.Toolkit.Entities.DocumentEntities.Bounding":{"required":["points"],"type":"object","properties":{"points":{"type":"array","items":{"type":"number","format":"float"},"nullable":true},"page":{"type":"integer","format":"int32"}},"additionalProperties":false},"Jylo.Toolkit.Entities.DocumentEntities.Role":{"enum":["Title","SectionHeading","PageHeader","PageFooter","PageNumber"],"type":"string"},"Jylo.Projects.Models.Chat.CitationReadModel":{"required":["quote"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"quote":{"type":"string","nullable":true},"documentObjectIdentifier":{"type":"string","format":"uuid"},"messageObjectIdentifier":{"type":"string","format":"uuid"}},"additionalProperties":false},"Jylo.Projects.Models.Chat.CitationResponseModel":{"required":["citations"],"type":"object","properties":{"citations":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.Citation"},"nullable":true}},"additionalProperties":false},"Jylo.Projects.Models.Chat.Citation":{"required":["assertion","evidence"],"type":"object","properties":{"assertion":{"type":"string","nullable":true},"evidence":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.Evidence"},"nullable":true}},"additionalProperties":false},"Jylo.Projects.Models.Chat.Evidence":{"required":["document","quote"],"type":"object","properties":{"document":{"type":"string","format":"uuid"},"quote":{"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}/assistants/{assistantIdentifier}/messages":{"get":{"tags":["Messages"],"summary":"Retrieves a paginated list of messages for the specified assistant.","description":"Retrieves a paginated list of messages for the specified assistant, optionally filtered and sorted.","parameters":[{"name":"assistantIdentifier","in":"path","description":"The unique identifier of the assistant.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"pageNumber","in":"query","description":"The page number to retrieve.","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 messages.","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":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.MessageReadModel"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.MessageReadModel"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.MessageReadModel"}}}}},"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"}}}}}}}}}
```

## Creates a new message in the specified assistant.

> Creates a new message in the specified assistant. Supports streaming responses.

```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.Chat.MessageWriteModel":{"required":["modelIdentifier","text"],"type":"object","properties":{"text":{"type":"string","nullable":true},"messageDocumentIdentifiers":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true},"modelIdentifier":{"type":"string","format":"uuid"},"stream":{"type":"boolean","nullable":true}},"additionalProperties":false},"Jylo.Projects.Models.Chat.MessageReadModel":{"required":["assistant","isAssistant","modelIdentifier","text"],"type":"object","properties":{"text":{"type":"string","nullable":true},"messageDocumentIdentifiers":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true},"modelIdentifier":{"type":"string","format":"uuid"},"stream":{"type":"boolean","nullable":true},"objectIdentifier":{"type":"string","format":"uuid"},"textWithCitations":{"type":"string","nullable":true},"dateAdded":{"type":"string","format":"date-time"},"messageResponseTypeId":{"type":"integer","format":"int32","nullable":true},"addingCitations":{"type":"boolean","nullable":true},"assistant":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.AssistantReadModel"},"isAssistant":{"type":"boolean"},"messageCitations":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.CitationReadModel"},"nullable":true},"citationsJsonResponse":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.CitationResponseModel"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"},"nullable":true},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"}},"additionalProperties":false},"Jylo.Projects.Models.Chat.AssistantReadModel":{"required":["name"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"documents":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"},"nullable":true},"dateAdded":{"type":"string","format":"date-time"},"documentMetadata":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.DocumentEntities.DocumentMetadata"},"nullable":true},"estimatedTokenCount":{"type":"integer","format":"int32"},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"}},"additionalProperties":false},"Jylo.Toolkit.API.Models.Documents.DocumentReadModel":{"required":["documentUploadObjectIdentifier","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"isDirectory":{"type":"boolean"},"documentUploadObjectIdentifier":{"type":"string","format":"uuid"},"contentType":{"type":"string","nullable":true},"size":{"type":"integer","format":"int64","nullable":true},"objectIdentifier":{"type":"string","format":"uuid"},"dateAdded":{"type":"string","format":"date-time"},"uploadSuccessful":{"type":"boolean","nullable":true},"tokenCount":{"type":"integer","format":"int64","nullable":true},"metadataTokenCount":{"type":"integer","format":"int64","nullable":true},"unsupportedFileType":{"type":"boolean","nullable":true},"unPackingComplete":{"type":"boolean","nullable":true},"unPackingFailed":{"type":"boolean","nullable":true},"uploadInProgress":{"type":"boolean","nullable":true},"url":{"type":"string","nullable":true},"hasChildren":{"type":"boolean","nullable":true},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"}},"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.Entities.DocumentEntities.DocumentMetadata":{"type":"object","properties":{"paragraphs":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.DocumentEntities.Paragraph"},"nullable":true},"documentObjectIdentifier":{"type":"string","format":"uuid"}},"additionalProperties":false},"Jylo.Toolkit.Entities.DocumentEntities.Paragraph":{"required":["boundingRegions","content","objectIdentifier"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"content":{"type":"string","nullable":true},"boundingRegions":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.DocumentEntities.Bounding"},"nullable":true},"role":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.DocumentEntities.Role"}},"additionalProperties":false},"Jylo.Toolkit.Entities.DocumentEntities.Bounding":{"required":["points"],"type":"object","properties":{"points":{"type":"array","items":{"type":"number","format":"float"},"nullable":true},"page":{"type":"integer","format":"int32"}},"additionalProperties":false},"Jylo.Toolkit.Entities.DocumentEntities.Role":{"enum":["Title","SectionHeading","PageHeader","PageFooter","PageNumber"],"type":"string"},"Jylo.Projects.Models.Chat.CitationReadModel":{"required":["quote"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"quote":{"type":"string","nullable":true},"documentObjectIdentifier":{"type":"string","format":"uuid"},"messageObjectIdentifier":{"type":"string","format":"uuid"}},"additionalProperties":false},"Jylo.Projects.Models.Chat.CitationResponseModel":{"required":["citations"],"type":"object","properties":{"citations":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.Citation"},"nullable":true}},"additionalProperties":false},"Jylo.Projects.Models.Chat.Citation":{"required":["assertion","evidence"],"type":"object","properties":{"assertion":{"type":"string","nullable":true},"evidence":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.Evidence"},"nullable":true}},"additionalProperties":false},"Jylo.Projects.Models.Chat.Evidence":{"required":["document","quote"],"type":"object","properties":{"document":{"type":"string","format":"uuid"},"quote":{"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}/assistants/{assistantIdentifier}/messages":{"post":{"tags":["Messages"],"summary":"Creates a new message in the specified assistant.","description":"Creates a new message in the specified assistant. Supports streaming responses.","parameters":[{"name":"assistantIdentifier","in":"path","description":"The unique identifier of the assistant.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The message data to add.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.MessageWriteModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.MessageWriteModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.MessageWriteModel"}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.MessageReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.MessageReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.MessageReadModel"}}}},"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"}}}},"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"}}}}}}}}}
```

## Retrieves a message by its object identifier.

> Retrieves a message by its object identifier.

```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.Chat.MessageReadModel":{"required":["assistant","isAssistant","modelIdentifier","text"],"type":"object","properties":{"text":{"type":"string","nullable":true},"messageDocumentIdentifiers":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true},"modelIdentifier":{"type":"string","format":"uuid"},"stream":{"type":"boolean","nullable":true},"objectIdentifier":{"type":"string","format":"uuid"},"textWithCitations":{"type":"string","nullable":true},"dateAdded":{"type":"string","format":"date-time"},"messageResponseTypeId":{"type":"integer","format":"int32","nullable":true},"addingCitations":{"type":"boolean","nullable":true},"assistant":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.AssistantReadModel"},"isAssistant":{"type":"boolean"},"messageCitations":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.CitationReadModel"},"nullable":true},"citationsJsonResponse":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.CitationResponseModel"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"},"nullable":true},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"}},"additionalProperties":false},"Jylo.Projects.Models.Chat.AssistantReadModel":{"required":["name"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"documents":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"},"nullable":true},"dateAdded":{"type":"string","format":"date-time"},"documentMetadata":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.DocumentEntities.DocumentMetadata"},"nullable":true},"estimatedTokenCount":{"type":"integer","format":"int32"},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"}},"additionalProperties":false},"Jylo.Toolkit.API.Models.Documents.DocumentReadModel":{"required":["documentUploadObjectIdentifier","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"isDirectory":{"type":"boolean"},"documentUploadObjectIdentifier":{"type":"string","format":"uuid"},"contentType":{"type":"string","nullable":true},"size":{"type":"integer","format":"int64","nullable":true},"objectIdentifier":{"type":"string","format":"uuid"},"dateAdded":{"type":"string","format":"date-time"},"uploadSuccessful":{"type":"boolean","nullable":true},"tokenCount":{"type":"integer","format":"int64","nullable":true},"metadataTokenCount":{"type":"integer","format":"int64","nullable":true},"unsupportedFileType":{"type":"boolean","nullable":true},"unPackingComplete":{"type":"boolean","nullable":true},"unPackingFailed":{"type":"boolean","nullable":true},"uploadInProgress":{"type":"boolean","nullable":true},"url":{"type":"string","nullable":true},"hasChildren":{"type":"boolean","nullable":true},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"}},"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.Entities.DocumentEntities.DocumentMetadata":{"type":"object","properties":{"paragraphs":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.DocumentEntities.Paragraph"},"nullable":true},"documentObjectIdentifier":{"type":"string","format":"uuid"}},"additionalProperties":false},"Jylo.Toolkit.Entities.DocumentEntities.Paragraph":{"required":["boundingRegions","content","objectIdentifier"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"content":{"type":"string","nullable":true},"boundingRegions":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.DocumentEntities.Bounding"},"nullable":true},"role":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.DocumentEntities.Role"}},"additionalProperties":false},"Jylo.Toolkit.Entities.DocumentEntities.Bounding":{"required":["points"],"type":"object","properties":{"points":{"type":"array","items":{"type":"number","format":"float"},"nullable":true},"page":{"type":"integer","format":"int32"}},"additionalProperties":false},"Jylo.Toolkit.Entities.DocumentEntities.Role":{"enum":["Title","SectionHeading","PageHeader","PageFooter","PageNumber"],"type":"string"},"Jylo.Projects.Models.Chat.CitationReadModel":{"required":["quote"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"quote":{"type":"string","nullable":true},"documentObjectIdentifier":{"type":"string","format":"uuid"},"messageObjectIdentifier":{"type":"string","format":"uuid"}},"additionalProperties":false},"Jylo.Projects.Models.Chat.CitationResponseModel":{"required":["citations"],"type":"object","properties":{"citations":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.Citation"},"nullable":true}},"additionalProperties":false},"Jylo.Projects.Models.Chat.Citation":{"required":["assertion","evidence"],"type":"object","properties":{"assertion":{"type":"string","nullable":true},"evidence":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.Evidence"},"nullable":true}},"additionalProperties":false},"Jylo.Projects.Models.Chat.Evidence":{"required":["document","quote"],"type":"object","properties":{"document":{"type":"string","format":"uuid"},"quote":{"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}/assistants/{assistantIdentifier}/messages/{objectIdentifier}":{"get":{"tags":["Messages"],"summary":"Retrieves a message by its object identifier.","description":"Retrieves a message by its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","description":"The unique identifier of the message to retrieve.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"assistantIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.MessageReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.MessageReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.MessageReadModel"}}}},"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"}}}},"404":{"description":"Not Found","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"}}}}}}}}}
```

## Updates a message by its object identifier.

> Updates a message by its object identifier.

```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.Chat.MessageWriteModel":{"required":["modelIdentifier","text"],"type":"object","properties":{"text":{"type":"string","nullable":true},"messageDocumentIdentifiers":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true},"modelIdentifier":{"type":"string","format":"uuid"},"stream":{"type":"boolean","nullable":true}},"additionalProperties":false},"Jylo.Projects.Models.Chat.MessageReadModel":{"required":["assistant","isAssistant","modelIdentifier","text"],"type":"object","properties":{"text":{"type":"string","nullable":true},"messageDocumentIdentifiers":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true},"modelIdentifier":{"type":"string","format":"uuid"},"stream":{"type":"boolean","nullable":true},"objectIdentifier":{"type":"string","format":"uuid"},"textWithCitations":{"type":"string","nullable":true},"dateAdded":{"type":"string","format":"date-time"},"messageResponseTypeId":{"type":"integer","format":"int32","nullable":true},"addingCitations":{"type":"boolean","nullable":true},"assistant":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.AssistantReadModel"},"isAssistant":{"type":"boolean"},"messageCitations":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.CitationReadModel"},"nullable":true},"citationsJsonResponse":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.CitationResponseModel"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"},"nullable":true},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"}},"additionalProperties":false},"Jylo.Projects.Models.Chat.AssistantReadModel":{"required":["name"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"documents":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"},"nullable":true},"dateAdded":{"type":"string","format":"date-time"},"documentMetadata":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.DocumentEntities.DocumentMetadata"},"nullable":true},"estimatedTokenCount":{"type":"integer","format":"int32"},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"}},"additionalProperties":false},"Jylo.Toolkit.API.Models.Documents.DocumentReadModel":{"required":["documentUploadObjectIdentifier","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"isDirectory":{"type":"boolean"},"documentUploadObjectIdentifier":{"type":"string","format":"uuid"},"contentType":{"type":"string","nullable":true},"size":{"type":"integer","format":"int64","nullable":true},"objectIdentifier":{"type":"string","format":"uuid"},"dateAdded":{"type":"string","format":"date-time"},"uploadSuccessful":{"type":"boolean","nullable":true},"tokenCount":{"type":"integer","format":"int64","nullable":true},"metadataTokenCount":{"type":"integer","format":"int64","nullable":true},"unsupportedFileType":{"type":"boolean","nullable":true},"unPackingComplete":{"type":"boolean","nullable":true},"unPackingFailed":{"type":"boolean","nullable":true},"uploadInProgress":{"type":"boolean","nullable":true},"url":{"type":"string","nullable":true},"hasChildren":{"type":"boolean","nullable":true},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"}},"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.Entities.DocumentEntities.DocumentMetadata":{"type":"object","properties":{"paragraphs":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.DocumentEntities.Paragraph"},"nullable":true},"documentObjectIdentifier":{"type":"string","format":"uuid"}},"additionalProperties":false},"Jylo.Toolkit.Entities.DocumentEntities.Paragraph":{"required":["boundingRegions","content","objectIdentifier"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"content":{"type":"string","nullable":true},"boundingRegions":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.DocumentEntities.Bounding"},"nullable":true},"role":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.DocumentEntities.Role"}},"additionalProperties":false},"Jylo.Toolkit.Entities.DocumentEntities.Bounding":{"required":["points"],"type":"object","properties":{"points":{"type":"array","items":{"type":"number","format":"float"},"nullable":true},"page":{"type":"integer","format":"int32"}},"additionalProperties":false},"Jylo.Toolkit.Entities.DocumentEntities.Role":{"enum":["Title","SectionHeading","PageHeader","PageFooter","PageNumber"],"type":"string"},"Jylo.Projects.Models.Chat.CitationReadModel":{"required":["quote"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"quote":{"type":"string","nullable":true},"documentObjectIdentifier":{"type":"string","format":"uuid"},"messageObjectIdentifier":{"type":"string","format":"uuid"}},"additionalProperties":false},"Jylo.Projects.Models.Chat.CitationResponseModel":{"required":["citations"],"type":"object","properties":{"citations":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.Citation"},"nullable":true}},"additionalProperties":false},"Jylo.Projects.Models.Chat.Citation":{"required":["assertion","evidence"],"type":"object","properties":{"assertion":{"type":"string","nullable":true},"evidence":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.Evidence"},"nullable":true}},"additionalProperties":false},"Jylo.Projects.Models.Chat.Evidence":{"required":["document","quote"],"type":"object","properties":{"document":{"type":"string","format":"uuid"},"quote":{"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}/assistants/{assistantIdentifier}/messages/{objectIdentifier}":{"put":{"tags":["Messages"],"summary":"Updates a message by its object identifier.","description":"Updates a message by its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","description":"The unique identifier of the message to update.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"assistantIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The updated message data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.MessageWriteModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.MessageWriteModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.MessageWriteModel"}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.MessageReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.MessageReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.MessageReadModel"}}}},"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"}}}},"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"}}}},"404":{"description":"Not Found","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"}}}}}}}}}
```

## Deletes a message by its object identifier.

> Deletes a message by its object identifier.

```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}/assistants/{assistantIdentifier}/messages/{objectIdentifier}":{"delete":{"tags":["Messages"],"summary":"Deletes a message by its object identifier.","description":"Deletes a message by its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","description":"The unique identifier of the message to delete.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"assistantIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"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"}}}},"404":{"description":"Not Found","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"}}}}}}}}}
```

## Uploads a document to be attached to a message.

> Uploads a document to be attached to a message.

```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.Toolkit.API.Models.Documents.DocumentReadModel":{"required":["documentUploadObjectIdentifier","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"isDirectory":{"type":"boolean"},"documentUploadObjectIdentifier":{"type":"string","format":"uuid"},"contentType":{"type":"string","nullable":true},"size":{"type":"integer","format":"int64","nullable":true},"objectIdentifier":{"type":"string","format":"uuid"},"dateAdded":{"type":"string","format":"date-time"},"uploadSuccessful":{"type":"boolean","nullable":true},"tokenCount":{"type":"integer","format":"int64","nullable":true},"metadataTokenCount":{"type":"integer","format":"int64","nullable":true},"unsupportedFileType":{"type":"boolean","nullable":true},"unPackingComplete":{"type":"boolean","nullable":true},"unPackingFailed":{"type":"boolean","nullable":true},"uploadInProgress":{"type":"boolean","nullable":true},"url":{"type":"string","nullable":true},"hasChildren":{"type":"boolean","nullable":true},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"}},"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},"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}/assistants/{assistantIdentifier}/messages/document":{"post":{"tags":["Messages"],"summary":"Uploads a document to be attached to a message.","description":"Uploads a document to be attached to a message.","parameters":[{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"assistantIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","description":"The file to upload.","format":"binary"}}},"encoding":{"file":{"style":"form"}}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}}}},"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"}}}},"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"}}}}}}}}}
```
