curl --request POST \
--url 'https://api.vida.dev/api/v2/tasks?token=' \
--header 'Content-Type: application/json' \
--data '
{
"type": "call",
"target": "+15551234567",
"message": "Hello, are you available to talk?",
"title": "<string>",
"context": "Existing customer in Texas",
"taskContext": "Confirm whether the customer wants a renewal quote",
"greeting": "prompt:Greet the customer by name and mention their renewal",
"waitToGreet": true,
"accountId": 1234,
"scheduledFor": 1712350000,
"externalTaskId": "<string>",
"contactListName": "<string>",
"goal": {
"completionCriteria": "<string>",
"description": "<string>"
},
"retryPolicy": {
"retryOn": [],
"delaysSeconds": [
1296030
],
"steps": [
{
"offsetSeconds": 3888030,
"target": "<string>",
"responseTimeoutSeconds": 302430,
"content": {}
}
],
"responseTimeoutSeconds": 302430
},
"meta": {
"email": {
"subject": "Follow-up from Vida",
"attachments": [
{
"filename": "report.pdf",
"type": "application/pdf",
"content": "BASE64_CONTENT",
"disposition": "attachment"
}
]
}
}
}
'import requests
url = "https://api.vida.dev/api/v2/tasks?token="
payload = {
"type": "call",
"target": "+15551234567",
"message": "Hello, are you available to talk?",
"title": "<string>",
"context": "Existing customer in Texas",
"taskContext": "Confirm whether the customer wants a renewal quote",
"greeting": "prompt:Greet the customer by name and mention their renewal",
"waitToGreet": True,
"accountId": 1234,
"scheduledFor": 1712350000,
"externalTaskId": "<string>",
"contactListName": "<string>",
"goal": {
"completionCriteria": "<string>",
"description": "<string>"
},
"retryPolicy": {
"retryOn": [],
"delaysSeconds": [1296030],
"steps": [
{
"offsetSeconds": 3888030,
"target": "<string>",
"responseTimeoutSeconds": 302430,
"content": {}
}
],
"responseTimeoutSeconds": 302430
},
"meta": { "email": {
"subject": "Follow-up from Vida",
"attachments": [
{
"filename": "report.pdf",
"type": "application/pdf",
"content": "BASE64_CONTENT",
"disposition": "attachment"
}
]
} }
}
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({
type: 'call',
target: '+15551234567',
message: 'Hello, are you available to talk?',
title: '<string>',
context: 'Existing customer in Texas',
taskContext: 'Confirm whether the customer wants a renewal quote',
greeting: 'prompt:Greet the customer by name and mention their renewal',
waitToGreet: true,
accountId: 1234,
scheduledFor: 1712350000,
externalTaskId: '<string>',
contactListName: '<string>',
goal: {completionCriteria: '<string>', description: '<string>'},
retryPolicy: {
retryOn: [],
delaysSeconds: [1296030],
steps: [
{
offsetSeconds: 3888030,
target: '<string>',
responseTimeoutSeconds: 302430,
content: {}
}
],
responseTimeoutSeconds: 302430
},
meta: {
email: {
subject: 'Follow-up from Vida',
attachments: [
{
filename: 'report.pdf',
type: 'application/pdf',
content: 'BASE64_CONTENT',
disposition: 'attachment'
}
]
}
}
})
};
fetch('https://api.vida.dev/api/v2/tasks?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?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([
'type' => 'call',
'target' => '+15551234567',
'message' => 'Hello, are you available to talk?',
'title' => '<string>',
'context' => 'Existing customer in Texas',
'taskContext' => 'Confirm whether the customer wants a renewal quote',
'greeting' => 'prompt:Greet the customer by name and mention their renewal',
'waitToGreet' => true,
'accountId' => 1234,
'scheduledFor' => 1712350000,
'externalTaskId' => '<string>',
'contactListName' => '<string>',
'goal' => [
'completionCriteria' => '<string>',
'description' => '<string>'
],
'retryPolicy' => [
'retryOn' => [
],
'delaysSeconds' => [
1296030
],
'steps' => [
[
'offsetSeconds' => 3888030,
'target' => '<string>',
'responseTimeoutSeconds' => 302430,
'content' => [
]
]
],
'responseTimeoutSeconds' => 302430
],
'meta' => [
'email' => [
'subject' => 'Follow-up from Vida',
'attachments' => [
[
'filename' => 'report.pdf',
'type' => 'application/pdf',
'content' => 'BASE64_CONTENT',
'disposition' => 'attachment'
]
]
]
]
]),
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/tasks?token="
payload := strings.NewReader("{\n \"type\": \"call\",\n \"target\": \"+15551234567\",\n \"message\": \"Hello, are you available to talk?\",\n \"title\": \"<string>\",\n \"context\": \"Existing customer in Texas\",\n \"taskContext\": \"Confirm whether the customer wants a renewal quote\",\n \"greeting\": \"prompt:Greet the customer by name and mention their renewal\",\n \"waitToGreet\": true,\n \"accountId\": 1234,\n \"scheduledFor\": 1712350000,\n \"externalTaskId\": \"<string>\",\n \"contactListName\": \"<string>\",\n \"goal\": {\n \"completionCriteria\": \"<string>\",\n \"description\": \"<string>\"\n },\n \"retryPolicy\": {\n \"retryOn\": [],\n \"delaysSeconds\": [\n 1296030\n ],\n \"steps\": [\n {\n \"offsetSeconds\": 3888030,\n \"target\": \"<string>\",\n \"responseTimeoutSeconds\": 302430,\n \"content\": {}\n }\n ],\n \"responseTimeoutSeconds\": 302430\n },\n \"meta\": {\n \"email\": {\n \"subject\": \"Follow-up from Vida\",\n \"attachments\": [\n {\n \"filename\": \"report.pdf\",\n \"type\": \"application/pdf\",\n \"content\": \"BASE64_CONTENT\",\n \"disposition\": \"attachment\"\n }\n ]\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/tasks?token=")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"call\",\n \"target\": \"+15551234567\",\n \"message\": \"Hello, are you available to talk?\",\n \"title\": \"<string>\",\n \"context\": \"Existing customer in Texas\",\n \"taskContext\": \"Confirm whether the customer wants a renewal quote\",\n \"greeting\": \"prompt:Greet the customer by name and mention their renewal\",\n \"waitToGreet\": true,\n \"accountId\": 1234,\n \"scheduledFor\": 1712350000,\n \"externalTaskId\": \"<string>\",\n \"contactListName\": \"<string>\",\n \"goal\": {\n \"completionCriteria\": \"<string>\",\n \"description\": \"<string>\"\n },\n \"retryPolicy\": {\n \"retryOn\": [],\n \"delaysSeconds\": [\n 1296030\n ],\n \"steps\": [\n {\n \"offsetSeconds\": 3888030,\n \"target\": \"<string>\",\n \"responseTimeoutSeconds\": 302430,\n \"content\": {}\n }\n ],\n \"responseTimeoutSeconds\": 302430\n },\n \"meta\": {\n \"email\": {\n \"subject\": \"Follow-up from Vida\",\n \"attachments\": [\n {\n \"filename\": \"report.pdf\",\n \"type\": \"application/pdf\",\n \"content\": \"BASE64_CONTENT\",\n \"disposition\": \"attachment\"\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vida.dev/api/v2/tasks?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 \"type\": \"call\",\n \"target\": \"+15551234567\",\n \"message\": \"Hello, are you available to talk?\",\n \"title\": \"<string>\",\n \"context\": \"Existing customer in Texas\",\n \"taskContext\": \"Confirm whether the customer wants a renewal quote\",\n \"greeting\": \"prompt:Greet the customer by name and mention their renewal\",\n \"waitToGreet\": true,\n \"accountId\": 1234,\n \"scheduledFor\": 1712350000,\n \"externalTaskId\": \"<string>\",\n \"contactListName\": \"<string>\",\n \"goal\": {\n \"completionCriteria\": \"<string>\",\n \"description\": \"<string>\"\n },\n \"retryPolicy\": {\n \"retryOn\": [],\n \"delaysSeconds\": [\n 1296030\n ],\n \"steps\": [\n {\n \"offsetSeconds\": 3888030,\n \"target\": \"<string>\",\n \"responseTimeoutSeconds\": 302430,\n \"content\": {}\n }\n ],\n \"responseTimeoutSeconds\": 302430\n },\n \"meta\": {\n \"email\": {\n \"subject\": \"Follow-up from Vida\",\n \"attachments\": [\n {\n \"filename\": \"report.pdf\",\n \"type\": \"application/pdf\",\n \"content\": \"BASE64_CONTENT\",\n \"disposition\": \"attachment\"\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_bodyCreate a new task
Submit one Task. Call, text, and email Tasks require target. Omitted or null goal and retryPolicy values independently inherit configured organization defaults; otherwise the Task runs once. A new retryable Task is rejected while another active retryable Task exists for the same agent and contact.
curl --request POST \
--url 'https://api.vida.dev/api/v2/tasks?token=' \
--header 'Content-Type: application/json' \
--data '
{
"type": "call",
"target": "+15551234567",
"message": "Hello, are you available to talk?",
"title": "<string>",
"context": "Existing customer in Texas",
"taskContext": "Confirm whether the customer wants a renewal quote",
"greeting": "prompt:Greet the customer by name and mention their renewal",
"waitToGreet": true,
"accountId": 1234,
"scheduledFor": 1712350000,
"externalTaskId": "<string>",
"contactListName": "<string>",
"goal": {
"completionCriteria": "<string>",
"description": "<string>"
},
"retryPolicy": {
"retryOn": [],
"delaysSeconds": [
1296030
],
"steps": [
{
"offsetSeconds": 3888030,
"target": "<string>",
"responseTimeoutSeconds": 302430,
"content": {}
}
],
"responseTimeoutSeconds": 302430
},
"meta": {
"email": {
"subject": "Follow-up from Vida",
"attachments": [
{
"filename": "report.pdf",
"type": "application/pdf",
"content": "BASE64_CONTENT",
"disposition": "attachment"
}
]
}
}
}
'import requests
url = "https://api.vida.dev/api/v2/tasks?token="
payload = {
"type": "call",
"target": "+15551234567",
"message": "Hello, are you available to talk?",
"title": "<string>",
"context": "Existing customer in Texas",
"taskContext": "Confirm whether the customer wants a renewal quote",
"greeting": "prompt:Greet the customer by name and mention their renewal",
"waitToGreet": True,
"accountId": 1234,
"scheduledFor": 1712350000,
"externalTaskId": "<string>",
"contactListName": "<string>",
"goal": {
"completionCriteria": "<string>",
"description": "<string>"
},
"retryPolicy": {
"retryOn": [],
"delaysSeconds": [1296030],
"steps": [
{
"offsetSeconds": 3888030,
"target": "<string>",
"responseTimeoutSeconds": 302430,
"content": {}
}
],
"responseTimeoutSeconds": 302430
},
"meta": { "email": {
"subject": "Follow-up from Vida",
"attachments": [
{
"filename": "report.pdf",
"type": "application/pdf",
"content": "BASE64_CONTENT",
"disposition": "attachment"
}
]
} }
}
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({
type: 'call',
target: '+15551234567',
message: 'Hello, are you available to talk?',
title: '<string>',
context: 'Existing customer in Texas',
taskContext: 'Confirm whether the customer wants a renewal quote',
greeting: 'prompt:Greet the customer by name and mention their renewal',
waitToGreet: true,
accountId: 1234,
scheduledFor: 1712350000,
externalTaskId: '<string>',
contactListName: '<string>',
goal: {completionCriteria: '<string>', description: '<string>'},
retryPolicy: {
retryOn: [],
delaysSeconds: [1296030],
steps: [
{
offsetSeconds: 3888030,
target: '<string>',
responseTimeoutSeconds: 302430,
content: {}
}
],
responseTimeoutSeconds: 302430
},
meta: {
email: {
subject: 'Follow-up from Vida',
attachments: [
{
filename: 'report.pdf',
type: 'application/pdf',
content: 'BASE64_CONTENT',
disposition: 'attachment'
}
]
}
}
})
};
fetch('https://api.vida.dev/api/v2/tasks?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?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([
'type' => 'call',
'target' => '+15551234567',
'message' => 'Hello, are you available to talk?',
'title' => '<string>',
'context' => 'Existing customer in Texas',
'taskContext' => 'Confirm whether the customer wants a renewal quote',
'greeting' => 'prompt:Greet the customer by name and mention their renewal',
'waitToGreet' => true,
'accountId' => 1234,
'scheduledFor' => 1712350000,
'externalTaskId' => '<string>',
'contactListName' => '<string>',
'goal' => [
'completionCriteria' => '<string>',
'description' => '<string>'
],
'retryPolicy' => [
'retryOn' => [
],
'delaysSeconds' => [
1296030
],
'steps' => [
[
'offsetSeconds' => 3888030,
'target' => '<string>',
'responseTimeoutSeconds' => 302430,
'content' => [
]
]
],
'responseTimeoutSeconds' => 302430
],
'meta' => [
'email' => [
'subject' => 'Follow-up from Vida',
'attachments' => [
[
'filename' => 'report.pdf',
'type' => 'application/pdf',
'content' => 'BASE64_CONTENT',
'disposition' => 'attachment'
]
]
]
]
]),
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/tasks?token="
payload := strings.NewReader("{\n \"type\": \"call\",\n \"target\": \"+15551234567\",\n \"message\": \"Hello, are you available to talk?\",\n \"title\": \"<string>\",\n \"context\": \"Existing customer in Texas\",\n \"taskContext\": \"Confirm whether the customer wants a renewal quote\",\n \"greeting\": \"prompt:Greet the customer by name and mention their renewal\",\n \"waitToGreet\": true,\n \"accountId\": 1234,\n \"scheduledFor\": 1712350000,\n \"externalTaskId\": \"<string>\",\n \"contactListName\": \"<string>\",\n \"goal\": {\n \"completionCriteria\": \"<string>\",\n \"description\": \"<string>\"\n },\n \"retryPolicy\": {\n \"retryOn\": [],\n \"delaysSeconds\": [\n 1296030\n ],\n \"steps\": [\n {\n \"offsetSeconds\": 3888030,\n \"target\": \"<string>\",\n \"responseTimeoutSeconds\": 302430,\n \"content\": {}\n }\n ],\n \"responseTimeoutSeconds\": 302430\n },\n \"meta\": {\n \"email\": {\n \"subject\": \"Follow-up from Vida\",\n \"attachments\": [\n {\n \"filename\": \"report.pdf\",\n \"type\": \"application/pdf\",\n \"content\": \"BASE64_CONTENT\",\n \"disposition\": \"attachment\"\n }\n ]\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/tasks?token=")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"call\",\n \"target\": \"+15551234567\",\n \"message\": \"Hello, are you available to talk?\",\n \"title\": \"<string>\",\n \"context\": \"Existing customer in Texas\",\n \"taskContext\": \"Confirm whether the customer wants a renewal quote\",\n \"greeting\": \"prompt:Greet the customer by name and mention their renewal\",\n \"waitToGreet\": true,\n \"accountId\": 1234,\n \"scheduledFor\": 1712350000,\n \"externalTaskId\": \"<string>\",\n \"contactListName\": \"<string>\",\n \"goal\": {\n \"completionCriteria\": \"<string>\",\n \"description\": \"<string>\"\n },\n \"retryPolicy\": {\n \"retryOn\": [],\n \"delaysSeconds\": [\n 1296030\n ],\n \"steps\": [\n {\n \"offsetSeconds\": 3888030,\n \"target\": \"<string>\",\n \"responseTimeoutSeconds\": 302430,\n \"content\": {}\n }\n ],\n \"responseTimeoutSeconds\": 302430\n },\n \"meta\": {\n \"email\": {\n \"subject\": \"Follow-up from Vida\",\n \"attachments\": [\n {\n \"filename\": \"report.pdf\",\n \"type\": \"application/pdf\",\n \"content\": \"BASE64_CONTENT\",\n \"disposition\": \"attachment\"\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vida.dev/api/v2/tasks?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 \"type\": \"call\",\n \"target\": \"+15551234567\",\n \"message\": \"Hello, are you available to talk?\",\n \"title\": \"<string>\",\n \"context\": \"Existing customer in Texas\",\n \"taskContext\": \"Confirm whether the customer wants a renewal quote\",\n \"greeting\": \"prompt:Greet the customer by name and mention their renewal\",\n \"waitToGreet\": true,\n \"accountId\": 1234,\n \"scheduledFor\": 1712350000,\n \"externalTaskId\": \"<string>\",\n \"contactListName\": \"<string>\",\n \"goal\": {\n \"completionCriteria\": \"<string>\",\n \"description\": \"<string>\"\n },\n \"retryPolicy\": {\n \"retryOn\": [],\n \"delaysSeconds\": [\n 1296030\n ],\n \"steps\": [\n {\n \"offsetSeconds\": 3888030,\n \"target\": \"<string>\",\n \"responseTimeoutSeconds\": 302430,\n \"content\": {}\n }\n ],\n \"responseTimeoutSeconds\": 302430\n },\n \"meta\": {\n \"email\": {\n \"subject\": \"Follow-up from Vida\",\n \"attachments\": [\n {\n \"filename\": \"report.pdf\",\n \"type\": \"application/pdf\",\n \"content\": \"BASE64_CONTENT\",\n \"disposition\": \"attachment\"\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Vida API Token
Body
call, text, email, ping "call"
Phone number, email address, or supported Vida username for the selected Task type
"+15551234567"
Initial text message or email body
"Hello, are you available to talk?"
Optional Task title
Context about this contact, included in the normal agent context
"Existing customer in Texas"
Operational instructions specific to this Task. Later retries also receive prior-attempt context.
"Confirm whether the customer wants a renewal quote"
Call greeting. Prefix with prompt: to generate it from the supplied instruction.
"prompt:Greet the customer by name and mention their renewal"
For call Tasks, wait for remote speech before delivering the greeting
true
Agent account that performs the Task
1234
Unix timestamp for the first attempt
1712350000
Reusable caller-defined correlation/grouping ID; it is not an idempotency key
Optional Contact List to enroll the Task contact into
Task-specific outcome definition. Omit or pass null to inherit the organization default.
Show child attributes
Show child attributes
Task-specific cadence. Omit or pass null to inherit the organization default. Use delaysSeconds or steps, never both. A maximum of 10 retries and a 90-day total horizon are allowed.
Show child attributes
Show child attributes
Metadata stored and returned with the Task for filtering and reporting. Metadata is not added to the agent prompt; use context or taskContext for agent-visible information. Call Tasks may use bridgeAfterAnswer with destination and optional monitor.
{
"email": {
"subject": "Follow-up from Vida",
"attachments": [
{
"filename": "report.pdf",
"type": "application/pdf",
"content": "BASE64_CONTENT",
"disposition": "attachment"
}
]
}
}
Response
Task created successfully