Chili Piper Chat API

The chat API from Chili Piper — 1 operation(s) for chat.

OpenAPI Specification

chili-piper-chat-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Chili Piper — Conversation Inspector Actions Chat API
  version: 1.287.2
  description: GPT Actions for the chat-conversation-inspector GPT — a subset of the Chili Piper Edge API. Authenticate with a Bearer API key (Admin Center → API Keys).
servers:
- url: https://fire.chilipiper.com/api/fire-edge
  description: Production
security:
- apiKeyAuth: []
tags:
- name: chat
paths:
  /v1/org/chat/logs:
    get:
      tags:
      - chat
      summary: Reads Chat Conversation Logs
      description: "[operation: chat-logs]\n\n\n\nREAD-ONLY\n\n\n\nReads a workspace's Chat AI conversation logs over a time window — the read-only audit trail of who chatted, how they were routed, and what got booked. Each entry carries the full bot/guest transcript, the routing outcome, and any meetings booked. Use it to inspect or debug live chat routing after the fact. The start/end window (ISO-8601) spans at most 30 days. Pass playbookId (repeatable) to restrict to specific chat playbooks. Narrow to a specific guest or rule with guestEmail (case-insensitive exact match), guestId (exact match), ruleId (exact match on any routing rule executed in the session; stable across rule renames), and/or ruleName (exact match on any routing rule executed in the session). Pages start at 0; pageSize defaults to 10, max 50.\n\n→\n\n    {results: [{guestId, sessionId, playbookId, guestEmail, startedAt, endedAt, ended, targetedUrl, respondedUrl, routingOutcome, ruleId, ruleName, conversationAssigneeId, routedAt, repJoined, chatAiStarted, meetingBooked, meetings: [{assigneeId, origin, scheduledAt}], messages: [{role, content, timestamp}]}], total, page, pageSize}\n\n  Note: routingOutcome is one of Routed | NotRouted | Abandoned; role is one of Bot | Guest; meetings[N].origin is one of Journey | Inbox | NoMeeting\n\nsee: workspace-list (find workspaceId)"
      operationId: chatLogs
      parameters:
      - name: workspaceId
        in: query
        description: Id of the workspace
        required: true
        schema:
          type: string
          pattern: '[^\s\\/]+'
      - name: start
        in: query
        description: time of start such as 2025-01-08T13:46:18.681Z (ISO8601 format)
        required: true
        schema:
          type: string
          format: date-time
      - name: end
        in: query
        description: time of end such as 2025-01-14T13:46:18.681Z (ISO8601 format)
        required: true
        schema:
          type: string
          format: date-time
      - name: playbookId
        in: query
        description: Optional chat playbook id(s) to restrict the logs to; repeatable. When omitted, all playbooks in the workspace are considered.
        required: false
        schema:
          type: array
          items:
            type: string
            format: uuid
      - name: guestEmail
        in: query
        description: Optional guest email to filter logs by (case-insensitive exact match). When omitted, all guests are considered.
        required: false
        schema:
          type: string
          pattern: .+@.+
      - name: guestId
        in: query
        description: Optional guest id to filter logs by (exact match). When omitted, all guests are considered.
        required: false
        schema:
          type: string
          format: uuid
      - name: ruleId
        in: query
        description: Optional routing-rule id to filter logs by (exact match on any rule executed in the session). Stable across rule renames. When omitted, all rules are considered.
        required: false
        schema:
          type: string
          pattern: '[^\s\\/]+'
      - name: ruleName
        in: query
        description: Optional routing-rule name to filter logs by (exact match on any rule executed in the session). When omitted, all rules are considered.
        required: false
        schema:
          type: string
      - name: page
        in: query
        description: Page number. First page has index 0.
        required: false
        schema:
          default: 0
          type: integer
          format: int64
          minimum: 0
        example: 0
      - name: pageSize
        in: query
        description: Number of items per page. Maximum is 50
        required: false
        schema:
          default: 10
          type: integer
          format: int64
          exclusiveMinimum: 0
        example: 10
      responses:
        '200':
          description: ''
          headers:
            Cache-Control:
              required: true
              schema:
                type: string
            X-Robots-Tag:
              required: true
              schema:
                type: string
            Pragma:
              required: true
              schema:
                type: string
            Expires:
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResult_ChatConversationLog'
        '400':
          description: 'Invalid value for: query parameter workspaceId, Invalid value for: query parameter start, Invalid value for: query parameter end, Invalid value for: query parameter guestEmail, Invalid value for: query parameter guestId, Invalid value for: query parameter ruleId, Invalid value for: query parameter page, Invalid value for: query parameter pageSize'
          content:
            text/plain:
              schema:
                type: string
        default:
          description: ''
          headers:
            Location:
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                - errorCode
                - errorMessage
                properties:
                  errorCode:
                    type: string
                  errorMessage:
                    type: string
                  arguments:
                    $ref: '#/components/schemas/Map_String'
      security:
      - apiKeyAuth: []
      X-Chili-Required-Permissions:
      - logs.read
components:
  schemas:
    ChatConversationLog:
      title: ChatConversationLog
      type: object
      required:
      - guestId
      - sessionId
      - playbookId
      - startedAt
      - ended
      - targetedUrl
      - routingOutcome
      - repJoined
      - chatAiStarted
      - meetingBooked
      properties:
        guestId:
          type: string
          format: uuid
        sessionId:
          type: integer
          format: int64
        playbookId:
          type: string
          format: uuid
        guestEmail:
          type: string
          pattern: .+@.+
        startedAt:
          type: string
          format: date-time
        endedAt:
          type: string
          format: date-time
        ended:
          type: boolean
        targetedUrl:
          type: string
        respondedUrl:
          type: string
        routingOutcome:
          $ref: '#/components/schemas/ChatRoutingOutcome'
        ruleId:
          type: string
          pattern: '[^\s\\/]+'
        ruleName:
          type: string
        conversationAssigneeId:
          type: string
          pattern: '[^\s\\/]+'
        routedAt:
          type: string
          format: date-time
        repJoined:
          type: boolean
        chatAiStarted:
          type: boolean
        meetingBooked:
          type: boolean
        meetings:
          type: array
          items:
            $ref: '#/components/schemas/ChatConversationMeeting'
        messages:
          type: array
          items:
            $ref: '#/components/schemas/ChatConversationMessage'
    Map_String:
      title: Map_String
      type: object
      additionalProperties:
        type: string
    ChatRoutingOutcome:
      title: ChatRoutingOutcome
      type: string
      enum:
      - Routed
      - NotRouted
      - Abandoned
    ChatConversationMessage:
      title: ChatConversationMessage
      type: object
      required:
      - role
      - content
      - timestamp
      properties:
        role:
          $ref: '#/components/schemas/ChatMessageRole'
        content:
          type: string
        timestamp:
          type: string
          format: date-time
    ChatConversationMeeting:
      title: ChatConversationMeeting
      type: object
      required:
      - assigneeId
      - origin
      - scheduledAt
      properties:
        assigneeId:
          $ref: '#/components/schemas/UserId'
        origin:
          type: string
        scheduledAt:
          type: string
          format: date-time
    PaginatedResult_ChatConversationLog:
      title: PaginatedResult_ChatConversationLog
      type: object
      required:
      - total
      - page
      - pageSize
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/ChatConversationLog'
        total:
          type: integer
          format: int64
        page:
          type: integer
          format: int64
          minimum: 0
        pageSize:
          type: integer
          format: int64
          exclusiveMinimum: 0
    ChatMessageRole:
      title: ChatMessageRole
      type: string
      enum:
      - Bot
      - Guest
    UserId:
      title: UserId
      examples:
      - 64ee0722-c7c6-4b48-bc89-356c99f1d25d
      type: string
      pattern: '[^\s\\/]+'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      description: 'API key in Authorization header. Format: ''Authorization: Bearer <api-key>'' — the word ''Bearer'' followed by a space and the key is required. Sending the key without the Bearer prefix returns 401.'
      name: Authorization
      in: header