List messages
Retrieve all messages for a project, ordered by creation date (oldest first).Input parameters
Unique project identifier
Response
Returns an array of message objects:Unique message identifier
ID of the parent project
Message role (e.g., “user”, “assistant”, “system”)
Message content
Message creation timestamp
Example
Request
Response
Schema details
Input validation
The messages API uses Zod for input validation:Database model
Messages are stored with the following Prisma schema:Key features
- Messages are automatically deleted when their parent project is deleted (cascade)
- Messages are indexed by
projectIdfor efficient querying - Messages are returned in chronological order (oldest first)
- The
rolefield typically contains values like “user”, “assistant”, or “system” to distinguish between different message types