Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/geremyjampiersalasgarcia-eng/Caso_Practico_Semillero_IA/llms.txt

Use this file to discover all available pages before exploring further.

Conversation history for Mesa de Ayuda IA is persisted in PostgreSQL across two tables: conversations (session metadata — UUID, title, timestamps) and messages (individual turns, including role, content, attached image data, RAG sources, and the agents that answered). These three endpoints allow the Next.js frontend — and any other API client — to retrieve, display, and manage chat sessions. Messages within a conversation are always returned sorted by created_at ascending so they appear in chronological order regardless of insertion order.

GET /api/v1/conversations/

Returns a paginated list of conversation sessions, ordered by most recently updated.

Query Parameters

skip
integer
default:"0"
Number of conversations to skip (offset for pagination).
limit
integer
default:"100"
Maximum number of conversations to return. Reduce this value when displaying a shorter sidebar list.

Response

Returns an array of ConversationListResponse objects:
FieldTypeDescription
idstringUUID of the conversation
titlestring | nullAuto-generated title (first message snippet), or null
updated_atdatetimeISO 8601 timestamp of the last message in this conversation

Example

curl http://localhost:8000/api/v1/conversations/?skip=0&limit=10

GET /api/v1/conversations/

Returns the full detail of a single conversation, including all messages sorted by created_at.

Path Parameters

conversation_id
string
required
The UUID of the conversation to retrieve. Returns HTTP 404 if no conversation with that ID exists.

Response

Returns a ConversationDetailResponse object:
FieldTypeDescription
idstringUUID of the conversation
titlestring | nullAuto-generated title or null
created_atdatetimeISO 8601 timestamp when the conversation was created
updated_atdatetimeISO 8601 timestamp of the last activity
messagesMessageResponse[]Ordered array of all messages in the conversation
Each MessageResponse in the messages array contains:
FieldTypeDescription
idstringUUID of the message
role"user" | "assistant"Who authored the message
contentstringThe text of the message
image_datastring | nullBase64 image attached to this message, or null
sourcesobject[]RAG source documents used to generate this assistant message
agents_usedstring[]Agents that contributed to this assistant message
created_atdatetimeISO 8601 timestamp when this message was stored

Example

curl http://localhost:8000/api/v1/conversations/a1b2c3d4-e5f6-7890-abcd-ef1234567890

DELETE /api/v1/conversations/

Permanently deletes a conversation and all of its messages from PostgreSQL.

Path Parameters

conversation_id
string
required
The UUID of the conversation to delete. Returns HTTP 404 if the conversation does not exist.

Response

Returns HTTP 200 with a confirmation message on success:
{
  "message": "Conversation deleted successfully"
}
Returns HTTP 404 if the conversation was not found:
{
  "detail": "Conversation not found"
}

Example

curl -X DELETE http://localhost:8000/api/v1/conversations/a1b2c3d4-e5f6-7890-abcd-ef1234567890

The meta.conversation_id returned by every POST /chat/ response is the same UUID used by these endpoints. Pass it back in the conversation_id field of subsequent chat requests to maintain context across multiple turns — the backend will load the stored message history from PostgreSQL and inject it into the agent prompts automatically.

Build docs developers (and LLMs) love