SleekFlow Conversations API

Read conversations and update conversation assignment.

OpenAPI Specification

sleekflow-conversations-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: SleekFlow Platform Companies Conversations API
  description: The SleekFlow Platform API lets you build custom integrations on top of the SleekFlow omnichannel messaging platform. It exposes contacts, conversations and messaging (WhatsApp and other channels), companies, lists, staff and teams, and webhooks. Authentication uses a Platform API key issued from the SleekFlow Integrations dashboard (Admin access required), passed in the X-Sleekflow-ApiKey request header. Endpoint paths in this document follow SleekFlow's documented Platform API resources; verify exact paths and request/response shapes against the live reference at apidoc.sleekflow.io during reconciliation.
  termsOfService: https://sleekflow.io/terms-of-service
  contact:
    name: SleekFlow Support
    url: https://help.sleekflow.io
  version: '1.0'
servers:
- url: https://api.sleekflow.io
  description: SleekFlow Platform API
security:
- ApiKeyAuth: []
tags:
- name: Conversations
  description: Read conversations and update conversation assignment.
paths:
  /v1/conversations:
    get:
      operationId: getConversations
      tags:
      - Conversations
      summary: Get conversations
      description: Returns conversations, optionally filtered by assignee, team, status, channel, and date range, for analytics and inbox integrations.
      parameters:
      - name: assignedTo
        in: query
        schema:
          type: string
      - name: teamId
        in: query
        schema:
          type: string
      - name: status
        in: query
        schema:
          type: string
          enum:
          - open
          - pending
          - closed
      - name: limit
        in: query
        schema:
          type: integer
          default: 50
      responses:
        '200':
          description: A list of conversations.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Conversation'
  /v1/conversations/{conversationId}/messages:
    get:
      operationId: getMessages
      tags:
      - Conversations
      summary: Get messages
      description: Returns the messages within a conversation.
      parameters:
      - name: conversationId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: A list of messages.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Message'
  /v1/conversations/{conversationId}/assignee:
    put:
      operationId: updateConversationAssignee
      tags:
      - Conversations
      summary: Update conversation's assignee
      description: Updates the staff member or team assigned to a conversation.
      parameters:
      - name: conversationId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssigneeUpdate'
      responses:
        '200':
          description: The updated conversation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conversation'
components:
  schemas:
    AssigneeUpdate:
      type: object
      properties:
        assignedToStaffId:
          type: string
        teamId:
          type: string
    Conversation:
      type: object
      properties:
        id:
          type: string
        contactId:
          type: string
        channel:
          type: string
        status:
          type: string
          enum:
          - open
          - pending
          - closed
        assignedTo:
          type: string
        teamId:
          type: string
        updatedAt:
          type: string
          format: date-time
    Message:
      type: object
      properties:
        id:
          type: string
        conversationId:
          type: string
        contactId:
          type: string
        channel:
          type: string
        direction:
          type: string
          enum:
          - inbound
          - outbound
        messageType:
          type: string
        message:
          type: string
        createdAt:
          type: string
          format: date-time
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Sleekflow-ApiKey
      description: Platform API key issued from the SleekFlow Integrations dashboard (Admin access required).