openapi: 3.0.1 info: title: Whippy Public Campaigns Conversations API description: The Whippy Public API is a RESTful API for the Whippy AI customer communication platform. It uses standard HTTP methods and JSON request / response bodies and is authenticated with an API key supplied in the X-WHIPPY-KEY header (OAuth bearer tokens are also supported). The API covers messaging (SMS / MMS, email, fax), contacts, conversations and messages, campaigns, automated sequences, channels, and webhook / custom events. termsOfService: https://www.whippy.ai/terms-of-service contact: name: Whippy Support url: https://docs.whippy.ai version: '1.0' servers: - url: https://api.whippy.co/v1 description: Whippy Public API v1 security: - WhippyApiKey: [] tags: - name: Conversations description: List, search, and update conversations and their messages. paths: /conversations: get: operationId: getConversations tags: - Conversations summary: List conversations parameters: - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Offset' - name: status[] in: query description: Filter by conversation status. schema: type: array items: type: string enum: - open - closed - spam - automated - name: type[] in: query description: Filter by conversation type. schema: type: array items: type: string enum: - phone - email - fax responses: '200': description: A page of conversations content: application/json: schema: $ref: '#/components/schemas/ConversationList' '401': $ref: '#/components/responses/Unauthorized' /conversations/{id}: parameters: - $ref: '#/components/parameters/PathId' get: operationId: getConversation tags: - Conversations summary: Show a conversation responses: '200': description: A single conversation content: application/json: schema: $ref: '#/components/schemas/ConversationResponse' '401': $ref: '#/components/responses/Unauthorized' put: operationId: updateConversation tags: - Conversations summary: Update a conversation requestBody: required: true content: application/json: schema: type: object properties: status: type: string enum: - open - closed - spam - automated assigned_user_id: type: integer assigned_team_id: type: string format: uuid responses: '200': description: Conversation updated content: application/json: schema: $ref: '#/components/schemas/ConversationResponse' '401': $ref: '#/components/responses/Unauthorized' /conversations/search: post: operationId: searchConversations tags: - Conversations summary: Search conversations requestBody: required: true content: application/json: schema: type: object properties: query: type: string limit: type: integer offset: type: integer responses: '200': description: Matching conversations content: application/json: schema: $ref: '#/components/schemas/ConversationList' '401': $ref: '#/components/responses/Unauthorized' /conversations/{id}/messages: parameters: - $ref: '#/components/parameters/PathId' get: operationId: listMessages tags: - Conversations summary: List messages in a conversation parameters: - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Offset' responses: '200': description: A page of messages content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Message' total: type: integer '401': $ref: '#/components/responses/Unauthorized' components: parameters: Limit: name: limit in: query description: Number of results per page (default 50, max 500). schema: type: integer default: 50 maximum: 500 Offset: name: offset in: query description: Number of results to skip for pagination. schema: type: integer default: 0 PathId: name: id in: path required: true description: Resource UUID. schema: type: string format: uuid responses: Unauthorized: description: Not authenticated content: application/json: schema: $ref: '#/components/schemas/Error' schemas: ConversationList: type: object properties: data: type: array items: $ref: '#/components/schemas/Conversation' total: type: integer Conversation: type: object properties: id: type: string format: uuid assigned_team_id: type: string format: uuid assigned_user_id: type: integer channel_id: type: string format: uuid channel_type: type: string enum: - phone - email - fax contact_id: type: string format: uuid status: type: string enum: - open - closed - automated - spam unread_count: type: integer last_message_date: type: string format: date-time created_at: type: string format: date-time updated_at: type: string format: date-time ConversationResponse: type: object properties: data: $ref: '#/components/schemas/Conversation' Message: type: object properties: id: type: string format: uuid conversation_id: type: string format: uuid body: type: string from: type: string to: type: string direction: type: string enum: - INBOUND - OUTBOUND delivery_status: type: string attachments: type: array items: type: string created_at: type: string format: date-time Error: type: object properties: error: type: string status: type: integer securitySchemes: WhippyApiKey: type: apiKey in: header name: X-WHIPPY-KEY description: Organization API key. Generated in the Whippy app under Settings > Developers. OAuth 2.0 bearer tokens are also accepted via the Authorization header.