TruVideo Chat API

The Chat API from TruVideo — 4 operation(s) for chat.

OpenAPI Specification

truvideo-chat-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: TruVideo Platform Authentication Chat API
  version: v2
  description: 'REST API for the TruVideo omnichannel video-and-messaging platform for service businesses (built for the automotive service market: dealers, service advisors, technicians, repair orders and customers). Covers authentication, users, dealers, repair orders, videos, messaging conversations, customers, files, in-app chat, reporting and support. Faithfully reconstructed from TruVideo''s published API documentation (github.com/Truvideo/Documentation); TruVideo does not publish a machine readable OpenAPI definition of its own.'
  contact:
    name: TruVideo Developer Team
    email: devmgr+git@truvideo.com
    url: https://truvideo.com/software-partnerships/
  x-generated-by: api-evangelist-enrichment
  x-source: https://github.com/Truvideo/Documentation
servers:
- url: https://app.truvideo.com
  description: Production
- url: https://dev.truvideo.com
  description: Sandbox / test (requires a TruVideo Sandbox account; may be gated)
security:
- bearerAuth: []
tags:
- name: Chat
paths:
  /chat/authentication/{deviceId}:
    get:
      tags:
      - Chat
      operationId: getChatToken
      summary: Get chat token
      description: Returns a custom authentication token for the device id.
      parameters:
      - name: deviceId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Chat token
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
  /chats/contacts:
    get:
      tags:
      - Chat
      operationId: getChatContacts
      summary: Get contacts
      parameters:
      - name: searchTerm
        in: query
        schema:
          type: string
      - name: deviceId
        in: query
        schema:
          type: string
      - name: userId
        in: query
        schema:
          type: string
      - name: dealerId
        in: query
        schema:
          type: integer
          format: int64
      - name: status
        in: query
        schema:
          type: string
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/size'
      responses:
        '200':
          description: Paged contacts
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Page'
                - type: object
                  properties:
                    content:
                      type: array
                      items:
                        $ref: '#/components/schemas/Contact'
  /chat/channel:
    post:
      tags:
      - Chat
      operationId: createChatChannel
      summary: Create channel
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChannelInput'
      responses:
        '200':
          description: Created channel
          content:
            application/json:
              schema:
                type: object
                properties:
                  channelId:
                    type: integer
                    format: int64
  /chat/channel/{id}:
    post:
      tags:
      - Chat
      operationId: updateChatChannel
      summary: Update channel
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChannelInput'
      responses:
        '200':
          description: Updated channel
          content:
            application/json:
              schema:
                type: object
                properties:
                  channelId:
                    type: integer
                    format: int64
components:
  parameters:
    size:
      name: size
      in: query
      required: false
      description: Records per page (default 25).
      schema:
        type: integer
        default: 25
    page:
      name: page
      in: query
      required: false
      description: Zero-based page number (default 0).
      schema:
        type: integer
        default: 0
  schemas:
    Page:
      type: object
      description: Spring-style pagination envelope wrapping a content array.
      properties:
        totalPages:
          type: integer
        totalElements:
          type: integer
        last:
          type: boolean
        first:
          type: boolean
        size:
          type: integer
        number:
          type: integer
        numberOfElements:
          type: integer
        sort:
          type: object
          nullable: true
    ChannelInput:
      type: object
      properties:
        channelInfo:
          type: object
          properties:
            name:
              type: string
            admin:
              type: string
        member:
          type: array
          items:
            type: string
    Contact:
      type: object
      properties:
        userId:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        avatar_url:
          type: string
        title:
          type: string
        status:
          type: object
          properties:
            inOnline:
              type: boolean
            timestamp:
              type: integer
              format: int64
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT bearer token obtained from POST /api/v2/authentication/login.