TruVideo Messages API
The Messages API from TruVideo — 3 operation(s) for messages.
The Messages API from TruVideo — 3 operation(s) for messages.
openapi: 3.0.3
info:
title: TruVideo Platform Authentication Messages 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: Messages
paths:
/api/v2/{accountId}/messages/conversations:
get:
tags:
- Messages
operationId: searchConversations
summary: Search conversations
parameters:
- $ref: '#/components/parameters/accountId'
- name: orderId
in: query
schema:
type: integer
format: int64
- name: customerId
in: query
schema:
type: integer
format: int64
- name: status
in: query
schema:
type: string
enum:
- ACTIVE
- RESPONDED
- CLOSED
- name: searchTerm
in: query
schema:
type: string
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/size'
responses:
'200':
description: Paged conversations
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Page'
- type: object
properties:
content:
type: array
items:
$ref: '#/components/schemas/Conversation'
/api/v2/{accountId}/messages/conversations/{conversationId}:
get:
tags:
- Messages
operationId: getConversation
summary: Get messages by conversation
parameters:
- $ref: '#/components/parameters/accountId'
- name: conversationId
in: path
required: true
schema:
type: integer
format: int64
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/size'
responses:
'200':
description: Conversation with paged messages
content:
application/json:
schema:
$ref: '#/components/schemas/Conversation'
/api/v2/{accountId}/messages:
post:
tags:
- Messages
operationId: createMessage
summary: Create message for conversation
description: Create a new message. When conversationId is null a new conversation is started; otherwise the message is appended to the referenced conversation.
parameters:
- $ref: '#/components/parameters/accountId'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- message
- mobile
properties:
conversationId:
type: integer
format: int64
nullable: true
source:
type: string
example: CONVERSATION
sender:
type: integer
format: int64
order:
type: integer
format: int64
mobile:
type: string
message:
type: string
responses:
'203':
description: Created (Location header points to the conversation)
headers:
Location:
schema:
type: string
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
accountId:
name: accountId
in: path
required: true
description: Dealer / account id. Present on all account-scoped requests.
schema:
type: integer
format: int64
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
Conversation:
type: object
properties:
id:
type: integer
format: int64
accountId:
type: integer
format: int64
accountName:
type: string
ownerId:
type: integer
format: int64
ownerName:
type: string
orderId:
type: integer
format: int64
orderDescription:
type: string
customerId:
type: integer
format: int64
customerMobile:
type: string
customerName:
type: string
status:
type: string
example: Open
type:
type: string
example: REPAIR_ORDER
lastTextMessage:
$ref: '#/components/schemas/TextMessage'
messages:
allOf:
- $ref: '#/components/schemas/Page'
- type: object
properties:
content:
type: array
items:
$ref: '#/components/schemas/TextMessage'
TextMessage:
type: object
properties:
id:
type: integer
format: int64
direction:
type: string
enum:
- inbound
- outbound
sender:
type: string
receiver:
type: string
timestamp:
type: string
format: date-time
message:
type: string
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: JWT bearer token obtained from POST /api/v2/authentication/login.