Skip to main content
POST
/
api
/
v2
/
conversation
/
batch
Fetch multiple conversations
curl --request POST \
  --url 'https://api.vida.dev/api/v2/conversation/batch?token=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "items": [
    {
      "roomId": "2236859:2550714",
      "uuid": "bf0011ed-8175-458a-8fba-1e62ddc77567:1770763782"
    },
    {
      "roomId": "2236859:2535655",
      "uuid": "edf65410-9f78-4d5e-82d2-2ee773ad4a49:1770765260"
    }
  ]
}
'
import requests

url = "https://api.vida.dev/api/v2/conversation/batch?token="

payload = { "items": [
{
"roomId": "2236859:2550714",
"uuid": "bf0011ed-8175-458a-8fba-1e62ddc77567:1770763782"
},
{
"roomId": "2236859:2535655",
"uuid": "edf65410-9f78-4d5e-82d2-2ee773ad4a49:1770765260"
}
] }
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
items: [
{
roomId: '2236859:2550714',
uuid: 'bf0011ed-8175-458a-8fba-1e62ddc77567:1770763782'
},
{
roomId: '2236859:2535655',
uuid: 'edf65410-9f78-4d5e-82d2-2ee773ad4a49:1770765260'
}
]
})
};

fetch('https://api.vida.dev/api/v2/conversation/batch?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/conversation/batch?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
'roomId' => '2236859:2550714',
'uuid' => 'bf0011ed-8175-458a-8fba-1e62ddc77567:1770763782'
],
[
'roomId' => '2236859:2535655',
'uuid' => 'edf65410-9f78-4d5e-82d2-2ee773ad4a49:1770765260'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.vida.dev/api/v2/conversation/batch?token="

payload := strings.NewReader("{\n \"items\": [\n {\n \"roomId\": \"2236859:2550714\",\n \"uuid\": \"bf0011ed-8175-458a-8fba-1e62ddc77567:1770763782\"\n },\n {\n \"roomId\": \"2236859:2535655\",\n \"uuid\": \"edf65410-9f78-4d5e-82d2-2ee773ad4a49:1770765260\"\n }\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.vida.dev/api/v2/conversation/batch?token=")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"roomId\": \"2236859:2550714\",\n \"uuid\": \"bf0011ed-8175-458a-8fba-1e62ddc77567:1770763782\"\n },\n {\n \"roomId\": \"2236859:2535655\",\n \"uuid\": \"edf65410-9f78-4d5e-82d2-2ee773ad4a49:1770765260\"\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.vida.dev/api/v2/conversation/batch?token=")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"roomId\": \"2236859:2550714\",\n \"uuid\": \"bf0011ed-8175-458a-8fba-1e62ddc77567:1770763782\"\n },\n {\n \"roomId\": \"2236859:2535655\",\n \"uuid\": \"edf65410-9f78-4d5e-82d2-2ee773ad4a49:1770765260\"\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "message": "Success",
  "stats": {
    "requested": 2,
    "ok": 2,
    "failed": 0
  },
  "results": [
    {
      "success": true,
      "roomId": "2236859:2550714",
      "uuid": "bf0011ed-8175-458a-8fba-1e62ddc77567:1770763782",
      "message": "Success",
      "conversation": [
        {}
      ]
    }
  ]
}
{
"success": false,
"message": "items array is required"
}
"Unauthorized Request"

Authorizations

token
string
query
required

Vida API Token

Body

application/json
items
object[]
required

List of conversation lookup items (max 200).

Response

Batch lookup complete. Each item includes per-item success/failure.

success
boolean
Example:

true

message
string
Example:

"Success"

stats
object
results
object[]