Chicory AI
  • Introduction
    • Introduction to Chicory AI
    • Understanding Chicory
  • Getting Started
    • Quickstart Guide
    • OpenAPI Specification
      • Projects
      • Training
      • Data_sources
      • Messages
      • Chats
      • Health
      • Models
    • Platform - Managed Service
      • How to use?
Powered by GitBook
On this page
  1. Getting Started
  2. OpenAPI Specification

Messages

PreviousData_sourcesNextChats

Get Message

get

Get a specific message

Path parameters
project_idstringRequired
chat_idstringRequired
message_idstringRequired
Responses
200
Successful Response
application/json
422
Validation Error
application/json
get
GET /v1/projects/{project_id}/chats/{chat_id}/messages/{message_id} HTTP/1.1
Host: api.chicory.ai
Accept: */*
{
  "id": "text",
  "chat_id": "text",
  "project_id": "text",
  "role": "text",
  "content": "text",
  "status": "text",
  "metadata": {},
  "created_at": "2025-05-22T03:44:07.615Z",
  "completed_at": "2025-05-22T03:44:07.615Z"
}

Delete Message

delete

Delete a message

Path parameters
project_idstringRequired
chat_idstringRequired
message_idstringRequired
Responses
200
Successful Response
application/json
422
Validation Error
application/json
delete
DELETE /v1/projects/{project_id}/chats/{chat_id}/messages/{message_id} HTTP/1.1
Host: api.chicory.ai
Accept: */*
{
  "ANY_ADDITIONAL_PROPERTY": "text"
}

Stream Chat Response

get

Stream the AI's response using Server-Sent Events

Path parameters
project_idstringRequired
chat_idstringRequired
Responses
200
Successful Response
application/json
Responseany
422
Validation Error
application/json
get
GET /v1/projects/{project_id}/chats/{chat_id}/stream HTTP/1.1
Host: api.chicory.ai
Accept: */*

No content

  • GETGet Messages
  • POSTCreate Message
  • GETGet Message
  • DELETEDelete Message
  • GETStream Chat Response

Get Messages

get

Get messages from a chat with pagination

Path parameters
project_idstringRequired
chat_idstringRequired
Query parameters
limitintegerOptionalDefault: 50
beforestringOptional
afterstringOptional
Responses
200
Successful Response
application/json
422
Validation Error
application/json
get
GET /v1/projects/{project_id}/chats/{chat_id}/messages HTTP/1.1
Host: api.chicory.ai
Accept: */*
{
  "messages": [
    {
      "id": "text",
      "chat_id": "text",
      "project_id": "text",
      "role": "text",
      "content": "text",
      "status": "text",
      "metadata": {},
      "created_at": "2025-05-22T03:44:07.615Z",
      "completed_at": "2025-05-22T03:44:07.615Z"
    }
  ],
  "has_more": false
}

Create Message

post

Create a new message in a chat with project-level context

Path parameters
project_idstringRequired
chat_idstringRequired
Body

Schema for creating a message

contentstringRequired
metadataobject · MetadataOptional
Responses
201
Successful Response
application/json
422
Validation Error
application/json
post
POST /v1/projects/{project_id}/chats/{chat_id}/messages HTTP/1.1
Host: api.chicory.ai
Content-Type: application/json
Accept: */*
Content-Length: 32

{
  "content": "text",
  "metadata": {}
}
{
  "id": "text",
  "chat_id": "text",
  "project_id": "text",
  "role": "text",
  "content": "text",
  "status": "text",
  "metadata": {},
  "created_at": "2025-05-22T03:44:07.615Z",
  "completed_at": "2025-05-22T03:44:07.615Z"
}