openapi: 3.0.3 info: title: Rainbow Messaging API description: >- REST API for sending and receiving messages, managing conversations, and handling chat bubbles (group rooms) within the Rainbow CPaaS platform by Alcatel-Lucent Enterprise. Supports one-to-one chat, group bubbles, file sharing, and message history retrieval. version: '1.0' contact: url: https://developers.openrainbow.com/ x-tags: - Messaging - Chat - Conversations - Bubbles - CPaaS servers: - url: https://openrainbow.com/api/rainbow description: Rainbow Production API security: - BearerAuth: [] tags: - name: Messages description: Send and receive chat messages - name: Conversations description: Manage one-to-one and group conversations - name: Bubbles description: Manage group chat rooms (bubbles) paths: /enduser/v1.0/messages: post: operationId: sendMessage summary: Send Message description: >- Send a chat message to a contact or into a bubble (group room). Supports text messages and file attachments. tags: - Messages requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SendMessageRequest' responses: '200': description: Message sent successfully content: application/json: schema: $ref: '#/components/schemas/MessageResponse' '400': description: Bad Request - invalid message payload content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /enduser/v1.0/conversations: get: operationId: listConversations summary: List Conversations description: >- Returns the list of conversations for the authenticated user, ordered by most recent activity. tags: - Conversations parameters: - name: limit in: query required: false description: Maximum number of conversations to return schema: type: integer minimum: 1 maximum: 100 default: 25 - name: offset in: query required: false description: Pagination offset schema: type: integer default: 0 responses: '200': description: List of conversations content: application/json: schema: $ref: '#/components/schemas/ConversationListResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /enduser/v1.0/conversations/{conversationId}/messages: get: operationId: getConversationMessages summary: Get Conversation Messages description: >- Returns the message history for a specific conversation. tags: - Messages parameters: - name: conversationId in: path required: true description: Unique identifier of the conversation schema: type: string - name: limit in: query required: false description: Maximum number of messages to return schema: type: integer default: 50 maximum: 200 - name: before in: query required: false description: Return messages before this timestamp (ISO 8601) schema: type: string format: date-time responses: '200': description: Message history for the conversation content: application/json: schema: $ref: '#/components/schemas/MessageListResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Conversation not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /enduser/v1.0/bubbles: get: operationId: listBubbles summary: List Bubbles description: >- Returns the list of group chat rooms (bubbles) the authenticated user is a member of. tags: - Bubbles parameters: - name: limit in: query required: false description: Maximum number of bubbles to return schema: type: integer default: 25 - name: offset in: query required: false description: Pagination offset schema: type: integer default: 0 responses: '200': description: List of bubbles (group rooms) content: application/json: schema: $ref: '#/components/schemas/BubbleListResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' post: operationId: createBubble summary: Create Bubble description: >- Creates a new group chat room (bubble). The creator becomes the owner. tags: - Bubbles requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateBubbleRequest' responses: '200': description: Bubble created successfully content: application/json: schema: $ref: '#/components/schemas/BubbleResponse' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /enduser/v1.0/bubbles/{bubbleId}: get: operationId: getBubble summary: Get Bubble description: Returns details of a specific bubble (group room). tags: - Bubbles parameters: - name: bubbleId in: path required: true description: Unique identifier of the bubble schema: type: string responses: '200': description: Bubble details content: application/json: schema: $ref: '#/components/schemas/BubbleResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Bubble not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' components: securitySchemes: BearerAuth: type: http scheme: bearer description: Bearer token obtained via Rainbow OAuth2 authentication schemas: SendMessageRequest: type: object required: [content] properties: content: type: string description: Text content of the message to: type: string description: Recipient contact ID or bubble ID type: type: string enum: [chat, groupchat] default: chat description: Message type - chat for 1-to-1, groupchat for bubbles MessageResponse: type: object properties: id: type: string description: Unique message identifier content: type: string description: Message text content from: type: string description: Sender's contact ID to: type: string description: Recipient contact ID or bubble ID type: type: string enum: [chat, groupchat] timestamp: type: string format: date-time description: Message creation timestamp status: type: string enum: [sent, delivered, read] MessageListResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/MessageResponse' total: type: integer limit: type: integer offset: type: integer ConversationListResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/Conversation' total: type: integer limit: type: integer offset: type: integer Conversation: type: object properties: id: type: string description: Unique conversation identifier type: type: string enum: [user, bubble] peerId: type: string description: Contact ID or bubble ID lastMessage: $ref: '#/components/schemas/MessageResponse' unreadCount: type: integer description: Number of unread messages BubbleListResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/Bubble' total: type: integer CreateBubbleRequest: type: object required: [name] properties: name: type: string description: Name of the bubble topic: type: string description: Topic or description of the bubble users: type: array items: type: string description: Initial list of contact IDs to invite BubbleResponse: type: object properties: data: $ref: '#/components/schemas/Bubble' Bubble: type: object properties: id: type: string description: Unique bubble identifier name: type: string description: Bubble name topic: type: string description: Bubble topic owner: type: string description: Contact ID of the bubble owner users: type: array items: type: string description: List of member contact IDs createdAt: type: string format: date-time updatedAt: type: string format: date-time ErrorResponse: type: object properties: code: type: integer description: Error code msg: type: string description: Error message param: type: string description: Parameter that caused the error