Fetch Recent Messages
curl --request GET \
--url 'https://api.vida.dev/api/v2/messages/recent?token='import requests
url = "https://api.vida.dev/api/v2/messages/recent?token="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.vida.dev/api/v2/messages/recent?token=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vida.dev/api/v2/messages/recent?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vida.dev/api/v2/messages/recent?token="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.vida.dev/api/v2/messages/recent?token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vida.dev/api/v2/messages/recent?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"from": 1234567890,
"fromUser": "user_test",
"to": 878589,
"toUser": "support2",
"timestamp": 1718463395,
"date": "2024-06-15T14:56:35.000Z",
"message": "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": "text/plain",
"disposition-notification": null,
"roomId": "1:878589",
"status": "success",
"attachments": [
{
"content-type": "audio/mp3",
"filename": "mp3",
"content-url": "https://example.com/media/recording.mp3",
"attachmentType": "call"
}
],
"isLive": false,
"aiAgent": true,
"aiLeadRating": null,
"aiLeadRatingReason": null,
"aiAgentOverride": null,
"source": "email",
"uuid": "a4977f49-80a6-41f0-9add-93a270cdd781",
"fromNumber": "+15125551234",
"toNumber": "+15125559876",
"notify": false,
"targetInbox": "inbox",
"type": "call",
"duration": 9,
"direction": "inbound",
"missedCall": false,
"bypassAgent": false,
"cnamSpam": false,
"selfCall": true,
"callingUserIsContact": false,
"agentOutcome": null,
"summary": null,
"callDialog": [
{
"role": "assistant",
"content": "Hello! This is the answering assistant. How can I help you?"
}
],
"chatDialog": [
{
"role": "assistant",
"content": "Hello! This is the answering assistant. How can I help you?"
}
],
"agentReplyCount": 10,
"campaign": true,
"diversion": null,
"voicemailRecording": null,
"eventType": "inbound-call",
"forcedCampaign": true
}
]Messaging
Fetch Recent Messages
Fetch recent messages across all inboxes.
GET
/
api
/
v2
/
messages
/
recent
Fetch Recent Messages
curl --request GET \
--url 'https://api.vida.dev/api/v2/messages/recent?token='import requests
url = "https://api.vida.dev/api/v2/messages/recent?token="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.vida.dev/api/v2/messages/recent?token=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vida.dev/api/v2/messages/recent?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vida.dev/api/v2/messages/recent?token="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.vida.dev/api/v2/messages/recent?token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vida.dev/api/v2/messages/recent?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"from": 1234567890,
"fromUser": "user_test",
"to": 878589,
"toUser": "support2",
"timestamp": 1718463395,
"date": "2024-06-15T14:56:35.000Z",
"message": "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": "text/plain",
"disposition-notification": null,
"roomId": "1:878589",
"status": "success",
"attachments": [
{
"content-type": "audio/mp3",
"filename": "mp3",
"content-url": "https://example.com/media/recording.mp3",
"attachmentType": "call"
}
],
"isLive": false,
"aiAgent": true,
"aiLeadRating": null,
"aiLeadRatingReason": null,
"aiAgentOverride": null,
"source": "email",
"uuid": "a4977f49-80a6-41f0-9add-93a270cdd781",
"fromNumber": "+15125551234",
"toNumber": "+15125559876",
"notify": false,
"targetInbox": "inbox",
"type": "call",
"duration": 9,
"direction": "inbound",
"missedCall": false,
"bypassAgent": false,
"cnamSpam": false,
"selfCall": true,
"callingUserIsContact": false,
"agentOutcome": null,
"summary": null,
"callDialog": [
{
"role": "assistant",
"content": "Hello! This is the answering assistant. How can I help you?"
}
],
"chatDialog": [
{
"role": "assistant",
"content": "Hello! This is the answering assistant. How can I help you?"
}
],
"agentReplyCount": 10,
"campaign": true,
"diversion": null,
"voicemailRecording": null,
"eventType": "inbound-call",
"forcedCampaign": true
}
]Response
200 - application/json
Successful response