curl --request POST \
--url 'https://api.vida.dev/api/v2/tasks?token=' \
--header 'Content-Type: application/json' \
--data '
{
"type": "call",
"target": "+15551234567",
"accountId": 1234,
"title": "<string>",
"context": "<string>",
"taskContext": "Confirm whether the customer wants a renewal quote.",
"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": {
"contact": {
"name": "Example Person",
"title": "<string>",
"email": "lead@example.com",
"phone": "+15551234567",
"cnam": "<string>",
"mobile": "<string>",
"birthday": "<string>",
"gender": "<string>",
"image": "<string>",
"address": {
"street": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "07101",
"country": "<string>"
},
"company": {
"name": "<string>",
"industry": "<string>",
"position": "<string>",
"website": "<string>",
"address": "<string>"
},
"preferredContactMethod": "<string>",
"marketingOptIn": true,
"contactSource": "<string>",
"socialMedia": {
"linkedin": "<string>",
"twitter": "<string>",
"facebook": "<string>",
"instagram": "<string>"
},
"leadSource": "<string>",
"status": "<string>",
"tags": [
"<string>"
],
"notes": "<string>",
"agentContext": "<string>",
"customFields": {
"vendorLeadCode": "lead-123",
"source": "website"
},
"lastTask": {
"taskId": "<string>",
"listId": "<string>",
"timestamp": 123,
"success": true
},
"lists": [
{
"label": "<string>",
"timestamp": 123
}
],
"appointments": [
{}
]
}
},
"greeting": "<string>",
"waitToGreet": true
}
'import requests
url = "https://api.vida.dev/api/v2/tasks?token="
payload = {
"type": "call",
"target": "+15551234567",
"accountId": 1234,
"title": "<string>",
"context": "<string>",
"taskContext": "Confirm whether the customer wants a renewal quote.",
"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": { "contact": {
"name": "Example Person",
"title": "<string>",
"email": "lead@example.com",
"phone": "+15551234567",
"cnam": "<string>",
"mobile": "<string>",
"birthday": "<string>",
"gender": "<string>",
"image": "<string>",
"address": {
"street": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "07101",
"country": "<string>"
},
"company": {
"name": "<string>",
"industry": "<string>",
"position": "<string>",
"website": "<string>",
"address": "<string>"
},
"preferredContactMethod": "<string>",
"marketingOptIn": True,
"contactSource": "<string>",
"socialMedia": {
"linkedin": "<string>",
"twitter": "<string>",
"facebook": "<string>",
"instagram": "<string>"
},
"leadSource": "<string>",
"status": "<string>",
"tags": ["<string>"],
"notes": "<string>",
"agentContext": "<string>",
"customFields": {
"vendorLeadCode": "lead-123",
"source": "website"
},
"lastTask": {
"taskId": "<string>",
"listId": "<string>",
"timestamp": 123,
"success": True
},
"lists": [
{
"label": "<string>",
"timestamp": 123
}
],
"appointments": [{}]
} },
"greeting": "<string>",
"waitToGreet": True
}
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',
accountId: 1234,
title: '<string>',
context: '<string>',
taskContext: 'Confirm whether the customer wants a renewal quote.',
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: {
contact: {
name: 'Example Person',
title: '<string>',
email: 'lead@example.com',
phone: '+15551234567',
cnam: '<string>',
mobile: '<string>',
birthday: '<string>',
gender: '<string>',
image: '<string>',
address: {
street: '<string>',
city: '<string>',
state: '<string>',
zip: '07101',
country: '<string>'
},
company: {
name: '<string>',
industry: '<string>',
position: '<string>',
website: '<string>',
address: '<string>'
},
preferredContactMethod: '<string>',
marketingOptIn: true,
contactSource: '<string>',
socialMedia: {
linkedin: '<string>',
twitter: '<string>',
facebook: '<string>',
instagram: '<string>'
},
leadSource: '<string>',
status: '<string>',
tags: ['<string>'],
notes: '<string>',
agentContext: '<string>',
customFields: {vendorLeadCode: 'lead-123', source: 'website'},
lastTask: {taskId: '<string>', listId: '<string>', timestamp: 123, success: true},
lists: [{label: '<string>', timestamp: 123}],
appointments: [{}]
}
},
greeting: '<string>',
waitToGreet: true
})
};
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',
'accountId' => 1234,
'title' => '<string>',
'context' => '<string>',
'taskContext' => 'Confirm whether the customer wants a renewal quote.',
'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' => [
'contact' => [
'name' => 'Example Person',
'title' => '<string>',
'email' => 'lead@example.com',
'phone' => '+15551234567',
'cnam' => '<string>',
'mobile' => '<string>',
'birthday' => '<string>',
'gender' => '<string>',
'image' => '<string>',
'address' => [
'street' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip' => '07101',
'country' => '<string>'
],
'company' => [
'name' => '<string>',
'industry' => '<string>',
'position' => '<string>',
'website' => '<string>',
'address' => '<string>'
],
'preferredContactMethod' => '<string>',
'marketingOptIn' => true,
'contactSource' => '<string>',
'socialMedia' => [
'linkedin' => '<string>',
'twitter' => '<string>',
'facebook' => '<string>',
'instagram' => '<string>'
],
'leadSource' => '<string>',
'status' => '<string>',
'tags' => [
'<string>'
],
'notes' => '<string>',
'agentContext' => '<string>',
'customFields' => [
'vendorLeadCode' => 'lead-123',
'source' => 'website'
],
'lastTask' => [
'taskId' => '<string>',
'listId' => '<string>',
'timestamp' => 123,
'success' => true
],
'lists' => [
[
'label' => '<string>',
'timestamp' => 123
]
],
'appointments' => [
[
]
]
]
],
'greeting' => '<string>',
'waitToGreet' => true
]),
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 \"accountId\": 1234,\n \"title\": \"<string>\",\n \"context\": \"<string>\",\n \"taskContext\": \"Confirm whether the customer wants a renewal quote.\",\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 \"contact\": {\n \"name\": \"Example Person\",\n \"title\": \"<string>\",\n \"email\": \"lead@example.com\",\n \"phone\": \"+15551234567\",\n \"cnam\": \"<string>\",\n \"mobile\": \"<string>\",\n \"birthday\": \"<string>\",\n \"gender\": \"<string>\",\n \"image\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"07101\",\n \"country\": \"<string>\"\n },\n \"company\": {\n \"name\": \"<string>\",\n \"industry\": \"<string>\",\n \"position\": \"<string>\",\n \"website\": \"<string>\",\n \"address\": \"<string>\"\n },\n \"preferredContactMethod\": \"<string>\",\n \"marketingOptIn\": true,\n \"contactSource\": \"<string>\",\n \"socialMedia\": {\n \"linkedin\": \"<string>\",\n \"twitter\": \"<string>\",\n \"facebook\": \"<string>\",\n \"instagram\": \"<string>\"\n },\n \"leadSource\": \"<string>\",\n \"status\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"notes\": \"<string>\",\n \"agentContext\": \"<string>\",\n \"customFields\": {\n \"vendorLeadCode\": \"lead-123\",\n \"source\": \"website\"\n },\n \"lastTask\": {\n \"taskId\": \"<string>\",\n \"listId\": \"<string>\",\n \"timestamp\": 123,\n \"success\": true\n },\n \"lists\": [\n {\n \"label\": \"<string>\",\n \"timestamp\": 123\n }\n ],\n \"appointments\": [\n {}\n ]\n }\n },\n \"greeting\": \"<string>\",\n \"waitToGreet\": true\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 \"accountId\": 1234,\n \"title\": \"<string>\",\n \"context\": \"<string>\",\n \"taskContext\": \"Confirm whether the customer wants a renewal quote.\",\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 \"contact\": {\n \"name\": \"Example Person\",\n \"title\": \"<string>\",\n \"email\": \"lead@example.com\",\n \"phone\": \"+15551234567\",\n \"cnam\": \"<string>\",\n \"mobile\": \"<string>\",\n \"birthday\": \"<string>\",\n \"gender\": \"<string>\",\n \"image\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"07101\",\n \"country\": \"<string>\"\n },\n \"company\": {\n \"name\": \"<string>\",\n \"industry\": \"<string>\",\n \"position\": \"<string>\",\n \"website\": \"<string>\",\n \"address\": \"<string>\"\n },\n \"preferredContactMethod\": \"<string>\",\n \"marketingOptIn\": true,\n \"contactSource\": \"<string>\",\n \"socialMedia\": {\n \"linkedin\": \"<string>\",\n \"twitter\": \"<string>\",\n \"facebook\": \"<string>\",\n \"instagram\": \"<string>\"\n },\n \"leadSource\": \"<string>\",\n \"status\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"notes\": \"<string>\",\n \"agentContext\": \"<string>\",\n \"customFields\": {\n \"vendorLeadCode\": \"lead-123\",\n \"source\": \"website\"\n },\n \"lastTask\": {\n \"taskId\": \"<string>\",\n \"listId\": \"<string>\",\n \"timestamp\": 123,\n \"success\": true\n },\n \"lists\": [\n {\n \"label\": \"<string>\",\n \"timestamp\": 123\n }\n ],\n \"appointments\": [\n {}\n ]\n }\n },\n \"greeting\": \"<string>\",\n \"waitToGreet\": true\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 \"accountId\": 1234,\n \"title\": \"<string>\",\n \"context\": \"<string>\",\n \"taskContext\": \"Confirm whether the customer wants a renewal quote.\",\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 \"contact\": {\n \"name\": \"Example Person\",\n \"title\": \"<string>\",\n \"email\": \"lead@example.com\",\n \"phone\": \"+15551234567\",\n \"cnam\": \"<string>\",\n \"mobile\": \"<string>\",\n \"birthday\": \"<string>\",\n \"gender\": \"<string>\",\n \"image\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"07101\",\n \"country\": \"<string>\"\n },\n \"company\": {\n \"name\": \"<string>\",\n \"industry\": \"<string>\",\n \"position\": \"<string>\",\n \"website\": \"<string>\",\n \"address\": \"<string>\"\n },\n \"preferredContactMethod\": \"<string>\",\n \"marketingOptIn\": true,\n \"contactSource\": \"<string>\",\n \"socialMedia\": {\n \"linkedin\": \"<string>\",\n \"twitter\": \"<string>\",\n \"facebook\": \"<string>\",\n \"instagram\": \"<string>\"\n },\n \"leadSource\": \"<string>\",\n \"status\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"notes\": \"<string>\",\n \"agentContext\": \"<string>\",\n \"customFields\": {\n \"vendorLeadCode\": \"lead-123\",\n \"source\": \"website\"\n },\n \"lastTask\": {\n \"taskId\": \"<string>\",\n \"listId\": \"<string>\",\n \"timestamp\": 123,\n \"success\": true\n },\n \"lists\": [\n {\n \"label\": \"<string>\",\n \"timestamp\": 123\n }\n ],\n \"appointments\": [\n {}\n ]\n }\n },\n \"greeting\": \"<string>\",\n \"waitToGreet\": true\n}"
response = http.request(request)
puts response.read_bodyCreate a new task
Creates communication, scheduled, or Computer Agent work. Computer Tasks run only on provisioned Computer Agents and preserve their complete work in a linked conversation.
curl --request POST \
--url 'https://api.vida.dev/api/v2/tasks?token=' \
--header 'Content-Type: application/json' \
--data '
{
"type": "call",
"target": "+15551234567",
"accountId": 1234,
"title": "<string>",
"context": "<string>",
"taskContext": "Confirm whether the customer wants a renewal quote.",
"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": {
"contact": {
"name": "Example Person",
"title": "<string>",
"email": "lead@example.com",
"phone": "+15551234567",
"cnam": "<string>",
"mobile": "<string>",
"birthday": "<string>",
"gender": "<string>",
"image": "<string>",
"address": {
"street": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "07101",
"country": "<string>"
},
"company": {
"name": "<string>",
"industry": "<string>",
"position": "<string>",
"website": "<string>",
"address": "<string>"
},
"preferredContactMethod": "<string>",
"marketingOptIn": true,
"contactSource": "<string>",
"socialMedia": {
"linkedin": "<string>",
"twitter": "<string>",
"facebook": "<string>",
"instagram": "<string>"
},
"leadSource": "<string>",
"status": "<string>",
"tags": [
"<string>"
],
"notes": "<string>",
"agentContext": "<string>",
"customFields": {
"vendorLeadCode": "lead-123",
"source": "website"
},
"lastTask": {
"taskId": "<string>",
"listId": "<string>",
"timestamp": 123,
"success": true
},
"lists": [
{
"label": "<string>",
"timestamp": 123
}
],
"appointments": [
{}
]
}
},
"greeting": "<string>",
"waitToGreet": true
}
'import requests
url = "https://api.vida.dev/api/v2/tasks?token="
payload = {
"type": "call",
"target": "+15551234567",
"accountId": 1234,
"title": "<string>",
"context": "<string>",
"taskContext": "Confirm whether the customer wants a renewal quote.",
"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": { "contact": {
"name": "Example Person",
"title": "<string>",
"email": "lead@example.com",
"phone": "+15551234567",
"cnam": "<string>",
"mobile": "<string>",
"birthday": "<string>",
"gender": "<string>",
"image": "<string>",
"address": {
"street": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "07101",
"country": "<string>"
},
"company": {
"name": "<string>",
"industry": "<string>",
"position": "<string>",
"website": "<string>",
"address": "<string>"
},
"preferredContactMethod": "<string>",
"marketingOptIn": True,
"contactSource": "<string>",
"socialMedia": {
"linkedin": "<string>",
"twitter": "<string>",
"facebook": "<string>",
"instagram": "<string>"
},
"leadSource": "<string>",
"status": "<string>",
"tags": ["<string>"],
"notes": "<string>",
"agentContext": "<string>",
"customFields": {
"vendorLeadCode": "lead-123",
"source": "website"
},
"lastTask": {
"taskId": "<string>",
"listId": "<string>",
"timestamp": 123,
"success": True
},
"lists": [
{
"label": "<string>",
"timestamp": 123
}
],
"appointments": [{}]
} },
"greeting": "<string>",
"waitToGreet": True
}
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',
accountId: 1234,
title: '<string>',
context: '<string>',
taskContext: 'Confirm whether the customer wants a renewal quote.',
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: {
contact: {
name: 'Example Person',
title: '<string>',
email: 'lead@example.com',
phone: '+15551234567',
cnam: '<string>',
mobile: '<string>',
birthday: '<string>',
gender: '<string>',
image: '<string>',
address: {
street: '<string>',
city: '<string>',
state: '<string>',
zip: '07101',
country: '<string>'
},
company: {
name: '<string>',
industry: '<string>',
position: '<string>',
website: '<string>',
address: '<string>'
},
preferredContactMethod: '<string>',
marketingOptIn: true,
contactSource: '<string>',
socialMedia: {
linkedin: '<string>',
twitter: '<string>',
facebook: '<string>',
instagram: '<string>'
},
leadSource: '<string>',
status: '<string>',
tags: ['<string>'],
notes: '<string>',
agentContext: '<string>',
customFields: {vendorLeadCode: 'lead-123', source: 'website'},
lastTask: {taskId: '<string>', listId: '<string>', timestamp: 123, success: true},
lists: [{label: '<string>', timestamp: 123}],
appointments: [{}]
}
},
greeting: '<string>',
waitToGreet: true
})
};
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',
'accountId' => 1234,
'title' => '<string>',
'context' => '<string>',
'taskContext' => 'Confirm whether the customer wants a renewal quote.',
'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' => [
'contact' => [
'name' => 'Example Person',
'title' => '<string>',
'email' => 'lead@example.com',
'phone' => '+15551234567',
'cnam' => '<string>',
'mobile' => '<string>',
'birthday' => '<string>',
'gender' => '<string>',
'image' => '<string>',
'address' => [
'street' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip' => '07101',
'country' => '<string>'
],
'company' => [
'name' => '<string>',
'industry' => '<string>',
'position' => '<string>',
'website' => '<string>',
'address' => '<string>'
],
'preferredContactMethod' => '<string>',
'marketingOptIn' => true,
'contactSource' => '<string>',
'socialMedia' => [
'linkedin' => '<string>',
'twitter' => '<string>',
'facebook' => '<string>',
'instagram' => '<string>'
],
'leadSource' => '<string>',
'status' => '<string>',
'tags' => [
'<string>'
],
'notes' => '<string>',
'agentContext' => '<string>',
'customFields' => [
'vendorLeadCode' => 'lead-123',
'source' => 'website'
],
'lastTask' => [
'taskId' => '<string>',
'listId' => '<string>',
'timestamp' => 123,
'success' => true
],
'lists' => [
[
'label' => '<string>',
'timestamp' => 123
]
],
'appointments' => [
[
]
]
]
],
'greeting' => '<string>',
'waitToGreet' => true
]),
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 \"accountId\": 1234,\n \"title\": \"<string>\",\n \"context\": \"<string>\",\n \"taskContext\": \"Confirm whether the customer wants a renewal quote.\",\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 \"contact\": {\n \"name\": \"Example Person\",\n \"title\": \"<string>\",\n \"email\": \"lead@example.com\",\n \"phone\": \"+15551234567\",\n \"cnam\": \"<string>\",\n \"mobile\": \"<string>\",\n \"birthday\": \"<string>\",\n \"gender\": \"<string>\",\n \"image\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"07101\",\n \"country\": \"<string>\"\n },\n \"company\": {\n \"name\": \"<string>\",\n \"industry\": \"<string>\",\n \"position\": \"<string>\",\n \"website\": \"<string>\",\n \"address\": \"<string>\"\n },\n \"preferredContactMethod\": \"<string>\",\n \"marketingOptIn\": true,\n \"contactSource\": \"<string>\",\n \"socialMedia\": {\n \"linkedin\": \"<string>\",\n \"twitter\": \"<string>\",\n \"facebook\": \"<string>\",\n \"instagram\": \"<string>\"\n },\n \"leadSource\": \"<string>\",\n \"status\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"notes\": \"<string>\",\n \"agentContext\": \"<string>\",\n \"customFields\": {\n \"vendorLeadCode\": \"lead-123\",\n \"source\": \"website\"\n },\n \"lastTask\": {\n \"taskId\": \"<string>\",\n \"listId\": \"<string>\",\n \"timestamp\": 123,\n \"success\": true\n },\n \"lists\": [\n {\n \"label\": \"<string>\",\n \"timestamp\": 123\n }\n ],\n \"appointments\": [\n {}\n ]\n }\n },\n \"greeting\": \"<string>\",\n \"waitToGreet\": true\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 \"accountId\": 1234,\n \"title\": \"<string>\",\n \"context\": \"<string>\",\n \"taskContext\": \"Confirm whether the customer wants a renewal quote.\",\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 \"contact\": {\n \"name\": \"Example Person\",\n \"title\": \"<string>\",\n \"email\": \"lead@example.com\",\n \"phone\": \"+15551234567\",\n \"cnam\": \"<string>\",\n \"mobile\": \"<string>\",\n \"birthday\": \"<string>\",\n \"gender\": \"<string>\",\n \"image\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"07101\",\n \"country\": \"<string>\"\n },\n \"company\": {\n \"name\": \"<string>\",\n \"industry\": \"<string>\",\n \"position\": \"<string>\",\n \"website\": \"<string>\",\n \"address\": \"<string>\"\n },\n \"preferredContactMethod\": \"<string>\",\n \"marketingOptIn\": true,\n \"contactSource\": \"<string>\",\n \"socialMedia\": {\n \"linkedin\": \"<string>\",\n \"twitter\": \"<string>\",\n \"facebook\": \"<string>\",\n \"instagram\": \"<string>\"\n },\n \"leadSource\": \"<string>\",\n \"status\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"notes\": \"<string>\",\n \"agentContext\": \"<string>\",\n \"customFields\": {\n \"vendorLeadCode\": \"lead-123\",\n \"source\": \"website\"\n },\n \"lastTask\": {\n \"taskId\": \"<string>\",\n \"listId\": \"<string>\",\n \"timestamp\": 123,\n \"success\": true\n },\n \"lists\": [\n {\n \"label\": \"<string>\",\n \"timestamp\": 123\n }\n ],\n \"appointments\": [\n {}\n ]\n }\n },\n \"greeting\": \"<string>\",\n \"waitToGreet\": true\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 \"accountId\": 1234,\n \"title\": \"<string>\",\n \"context\": \"<string>\",\n \"taskContext\": \"Confirm whether the customer wants a renewal quote.\",\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 \"contact\": {\n \"name\": \"Example Person\",\n \"title\": \"<string>\",\n \"email\": \"lead@example.com\",\n \"phone\": \"+15551234567\",\n \"cnam\": \"<string>\",\n \"mobile\": \"<string>\",\n \"birthday\": \"<string>\",\n \"gender\": \"<string>\",\n \"image\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"07101\",\n \"country\": \"<string>\"\n },\n \"company\": {\n \"name\": \"<string>\",\n \"industry\": \"<string>\",\n \"position\": \"<string>\",\n \"website\": \"<string>\",\n \"address\": \"<string>\"\n },\n \"preferredContactMethod\": \"<string>\",\n \"marketingOptIn\": true,\n \"contactSource\": \"<string>\",\n \"socialMedia\": {\n \"linkedin\": \"<string>\",\n \"twitter\": \"<string>\",\n \"facebook\": \"<string>\",\n \"instagram\": \"<string>\"\n },\n \"leadSource\": \"<string>\",\n \"status\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"notes\": \"<string>\",\n \"agentContext\": \"<string>\",\n \"customFields\": {\n \"vendorLeadCode\": \"lead-123\",\n \"source\": \"website\"\n },\n \"lastTask\": {\n \"taskId\": \"<string>\",\n \"listId\": \"<string>\",\n \"timestamp\": 123,\n \"success\": true\n },\n \"lists\": [\n {\n \"label\": \"<string>\",\n \"timestamp\": 123\n }\n ],\n \"appointments\": [\n {}\n ]\n }\n },\n \"greeting\": \"<string>\",\n \"waitToGreet\": true\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Vida API Token
Body
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
call Phone number, email address, or supported Vida username for this Task type.
"+15551234567"
Agent account that performs the Task.
1234
Contact context supplied to the Agent.
Instructions for the Agent performing this Task.
"Confirm whether the customer wants a renewal quote."
Unix timestamp for the first attempt or Computer Agent run.
1712350000
Reusable caller-defined correlation ID; not an idempotency key.
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.
Show child attributes
Show child attributes
Metadata retained for filtering and reporting; it is not added to the Agent prompt.
Show child attributes
Show child attributes
Call greeting. Prefix with prompt: to generate it from an instruction.
Response
Task created successfully