Fetch Recent Messages
Fetch recent messages across all inboxes.
OpenAPI
````yaml get /api/v2/messages/recent
openapi: 3.0.0
info:
version: 2.0.0
title: GetVoiceBot API
description: GetVoiceBot API Documentation
servers:
- url: https://api.getvoicebot.com
description: GetVoiceBot Production
variables:
baseUrl:
default: api.getvoicebot.com
description: Production API Root
security: []
tags:
- name: Agents
- name: Inbound Email
description: Control which senders may create inbound email work for an Agent.
- name: Features
description: Inspect capabilities available within an account hierarchy.
- name: Conversation Logs
description: Query conversation activity and calculate account-level metrics.
- name: Computer Agents
description: Set up, configure, inspect, and manage GetVoiceBot Computer Agents.
- name: Computer Agent Sessions
description: View and reset Computer Agent sessions.
- name: Accounts
- name: Agent Templates
description: Create, manage, and apply reusable Agent configurations.
paths:
/api/v2/messages/recent:
get:
tags:
- Messaging
summary: Fetch Recent Messages
description: Fetch recent messages across all inboxes.
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: array
items:
type: object
properties:
from:
description: From User Id
type: number
example: 1234567890
fromUser:
description: From User Name
type: string
example: user_test
to:
description: To User Id
type: number
example: 878589
toUser:
description: To User Name
type: string
example: support2
timestamp:
description: Epoch of the last message's timestamp
type: number
example: 1718463395
date:
description: Friendly Date
type: string
example: '2024-06-15T14:56:35.000Z'
message:
description: Message text
type: string
example: >-
Hi there! Lyle is currently unavailable. Could you
please let me know the nature of your call or message
and any specific details you'd like me to pass on to
him? Thanks!
content-type:
description: Content type of the message
type: string
example: text/plain
disposition-notification:
description: Disposition notification status
type: string
example: null
roomId:
description: Room Id
type: string
example: '1:878589'
status:
description: Status of the message
type: string
example: success
attachments:
description: Array of media attachment URLs
type: array
items:
type: object
properties:
content-type:
type: string
example: audio/mp3
filename:
type: string
example: mp3
content-url:
type: string
example: https://example.com/media/recording.mp3
attachmentType:
type: string
example: call
isLive:
description: Whether the message is live
type: boolean
example: false
aiAgent:
description: Whether an AI agent is involved
type: boolean
example: true
aiLeadRating:
description: AI lead rating
type: number
example: null
aiLeadRatingReason:
description: Reason for AI lead rating
type: string
example: null
aiAgentOverride:
description: AI agent override status
type: string
example: null
source:
description: Source medium for the message
type: string
example: email
uuid:
description: Unique ID for message
type: string
example: a4977f49-80a6-41f0-9add-93a270cdd781
fromNumber:
description: Phone number of the sender
type: string
example: '+15125551234'
toNumber:
description: Phone number of the recipient
type: string
example: '+15125559876'
notify:
description: Notification flag
type: boolean
example: false
targetInbox:
description: Target inbox
type: string
example: inbox
type:
description: Type of message
type: string
example: call
duration:
description: Duration of the call
type: number
example: 9
direction:
description: Direction of the call
type: string
example: inbound
missedCall:
description: Whether it was a missed call
type: boolean
example: false
bypassAgent:
description: Whether the agent was bypassed
type: boolean
example: false
cnamSpam:
description: Whether the call was marked as spam by CNAM
type: boolean
example: false
selfCall:
description: Whether the call was self-initiated
type: boolean
example: true
callingUserIsContact:
description: Whether the calling user is a contact
type: boolean
example: false
agentOutcome:
description: Outcome from the agent
type: string
example: null
summary:
description: Summary of the message
type: string
example: null
callDialog:
description: >-
Array of dialog entries with roles and contents for
Calls
type: array
items:
type: object
properties:
role:
type: string
example: assistant
content:
type: string
example: >-
Hello! This is the answering assistant. How can I
help you?
chatDialog:
description: >-
Array of dialog entries with roles and contents for
Chats
type: array
items:
type: object
properties:
role:
type: string
example: assistant
content:
type: string
example: >-
Hello! This is the answering assistant. How can I
help you?
agentReplyCount:
description: >-
The number of agent responses in the conversation.
Useful for billing.
type: number
example: 10
campaign:
description: Campaign status
type: boolean
example: true
diversion:
description: Diversion status
type: string
example: null
voicemailRecording:
description: Voicemail recording details
type: string
example: null
eventType:
description: Type of event
type: string
example: inbound-call
forcedCampaign:
description: Forced campaign flag
type: boolean
example: true
security:
- apiKeyAuth: []
components:
securitySchemes:
apiKeyAuth:
type: apiKey
in: query
name: token
description: GetVoiceBot API Token
````
