openapi: 3.1.0 info: title: Reference Chat Conversations Messages API description: Reference OpenAPI definition describing the typical shape of a chat platform API. Captures the vocabulary used for conversations, messages, and participants and serves as a profiling baseline for cataloguing concrete chat platform APIs. version: '1.0' contact: name: API Evangelist url: https://apievangelist.com/ servers: - url: https://api.example.com/v1/chat description: Reference Production security: - bearerAuth: [] tags: - name: Messages paths: /conversations/{conversationId}/messages: get: operationId: listMessages summary: List messages in a conversation tags: - Messages parameters: - $ref: '#/components/parameters/conversationId' - name: cursor in: query schema: type: string - name: limit in: query schema: type: integer default: 50 responses: '200': description: Messages page content: application/json: schema: type: object properties: messages: type: array items: $ref: '#/components/schemas/Message' nextCursor: type: string post: operationId: sendMessage summary: Send a message tags: - Messages parameters: - $ref: '#/components/parameters/conversationId' requestBody: required: true content: application/json: schema: type: object required: - content properties: content: type: string contentType: type: string enum: - text - markdown - html metadata: type: object responses: '201': description: Message sent content: application/json: schema: $ref: '#/components/schemas/Message' components: parameters: conversationId: name: conversationId in: path required: true schema: type: string schemas: Message: type: object required: - id - content properties: id: type: string conversationId: type: string senderId: type: string content: type: string contentType: type: string enum: - text - markdown - html sentAt: type: string format: date-time editedAt: type: string format: date-time metadata: type: object securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT