Fetch a specific task
curl --request GET \
--url 'https://api.vida.dev/api/v2/tasks/{taskId}?token='import requests
url = "https://api.vida.dev/api/v2/tasks/{taskId}?token="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.vida.dev/api/v2/tasks/{taskId}?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/tasks/{taskId}?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/tasks/{taskId}?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/tasks/{taskId}?token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vida.dev/api/v2/tasks/{taskId}?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{
"success": true,
"task": {
"id": "task1",
"batchId": "f52b1e01-5cbc-483c-9939-3bf7d37e1426",
"externalTaskId": "lead-42",
"type": "call",
"state": "finished",
"target": "+15551234567",
"goal": {
"completionCriteria": "The contact agrees to a meeting"
},
"retryPolicy": {
"delaysSeconds": [
86400
],
"retryOn": [
"no_answer",
"goal_incomplete"
]
},
"attemptHistory": [
{
"id": "attempt-id",
"number": 1,
"state": "resolved",
"channel": "call",
"disposition": "goal_met",
"scheduledAt": 1712345678,
"dispatchedAt": 1712345680,
"resolvedAt": 1712345900,
"convoUUID": "conversation-uuid",
"outcomes": [
{
"type": "task_goal",
"status": "evaluated",
"value": true,
"terminal": true
}
],
"logsRef": {
"taskId": "task1",
"attemptId": "attempt-id",
"href": "/api/v2/tasks/task1/logs?attemptId=attempt-id"
}
}
],
"result": {
"disposition": "goal_met",
"terminalReason": "goal_met"
},
"chatRef": {
"roomId": "room-id",
"targetAccountId": 3026480,
"href": "/api/v2/messages/room-id?targetAccountId=3026480"
},
"logsRef": {
"taskId": "task1",
"href": "/api/v2/tasks/task1/logs"
}
}
}Tasks
Fetch a specific task
Retrieve one Task and all of its attempts. When the Task has an associated room, chatRef links directly to its scoped Vida chat. attemptHistory includes each attempt’s channel, timing, disposition, evaluation, outcomes, experiment assignment, provider reference, voicemail or delivery details, and conversation UUID when available. The Task and each attempt include logsRef; conversationRef links directly to one available communication conversation and transcript.
GET
/
api
/
v2
/
tasks
/
{taskId}
Fetch a specific task
curl --request GET \
--url 'https://api.vida.dev/api/v2/tasks/{taskId}?token='import requests
url = "https://api.vida.dev/api/v2/tasks/{taskId}?token="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.vida.dev/api/v2/tasks/{taskId}?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/tasks/{taskId}?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/tasks/{taskId}?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/tasks/{taskId}?token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vida.dev/api/v2/tasks/{taskId}?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{
"success": true,
"task": {
"id": "task1",
"batchId": "f52b1e01-5cbc-483c-9939-3bf7d37e1426",
"externalTaskId": "lead-42",
"type": "call",
"state": "finished",
"target": "+15551234567",
"goal": {
"completionCriteria": "The contact agrees to a meeting"
},
"retryPolicy": {
"delaysSeconds": [
86400
],
"retryOn": [
"no_answer",
"goal_incomplete"
]
},
"attemptHistory": [
{
"id": "attempt-id",
"number": 1,
"state": "resolved",
"channel": "call",
"disposition": "goal_met",
"scheduledAt": 1712345678,
"dispatchedAt": 1712345680,
"resolvedAt": 1712345900,
"convoUUID": "conversation-uuid",
"outcomes": [
{
"type": "task_goal",
"status": "evaluated",
"value": true,
"terminal": true
}
],
"logsRef": {
"taskId": "task1",
"attemptId": "attempt-id",
"href": "/api/v2/tasks/task1/logs?attemptId=attempt-id"
}
}
],
"result": {
"disposition": "goal_met",
"terminalReason": "goal_met"
},
"chatRef": {
"roomId": "room-id",
"targetAccountId": 3026480,
"href": "/api/v2/messages/room-id?targetAccountId=3026480"
},
"logsRef": {
"taskId": "task1",
"href": "/api/v2/tasks/task1/logs"
}
}
}⌘I