curl --request POST \
--url 'https://api.vida.dev/api/v2/tasks/batches?token=' \
--header 'Content-Type: application/json' \
--data '
{
"tasks": [
{
"target": "<string>",
"accountId": 123,
"context": "<string>",
"taskContext": "<string>",
"greeting": "<string>",
"waitToGreet": true,
"message": "<string>",
"scheduledFor": 123,
"externalTaskId": "<string>",
"contactListName": "<string>",
"goal": {},
"retryPolicy": {},
"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": [
{}
]
}
}
}
],
"contactListName": "<string>",
"task": {}
}
'import requests
url = "https://api.vida.dev/api/v2/tasks/batches?token="
payload = {
"tasks": [
{
"target": "<string>",
"accountId": 123,
"context": "<string>",
"taskContext": "<string>",
"greeting": "<string>",
"waitToGreet": True,
"message": "<string>",
"scheduledFor": 123,
"externalTaskId": "<string>",
"contactListName": "<string>",
"goal": {},
"retryPolicy": {},
"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": [{}]
} }
}
],
"contactListName": "<string>",
"task": {}
}
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({
tasks: [
{
target: '<string>',
accountId: 123,
context: '<string>',
taskContext: '<string>',
greeting: '<string>',
waitToGreet: true,
message: '<string>',
scheduledFor: 123,
externalTaskId: '<string>',
contactListName: '<string>',
goal: {},
retryPolicy: {},
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: [{}]
}
}
}
],
contactListName: '<string>',
task: {}
})
};
fetch('https://api.vida.dev/api/v2/tasks/batches?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/batches?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([
'tasks' => [
[
'target' => '<string>',
'accountId' => 123,
'context' => '<string>',
'taskContext' => '<string>',
'greeting' => '<string>',
'waitToGreet' => true,
'message' => '<string>',
'scheduledFor' => 123,
'externalTaskId' => '<string>',
'contactListName' => '<string>',
'goal' => [
],
'retryPolicy' => [
],
'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' => [
[
]
]
]
]
]
],
'contactListName' => '<string>',
'task' => [
]
]),
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/batches?token="
payload := strings.NewReader("{\n \"tasks\": [\n {\n \"target\": \"<string>\",\n \"accountId\": 123,\n \"context\": \"<string>\",\n \"taskContext\": \"<string>\",\n \"greeting\": \"<string>\",\n \"waitToGreet\": true,\n \"message\": \"<string>\",\n \"scheduledFor\": 123,\n \"externalTaskId\": \"<string>\",\n \"contactListName\": \"<string>\",\n \"goal\": {},\n \"retryPolicy\": {},\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 }\n ],\n \"contactListName\": \"<string>\",\n \"task\": {}\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/batches?token=")
.header("Content-Type", "application/json")
.body("{\n \"tasks\": [\n {\n \"target\": \"<string>\",\n \"accountId\": 123,\n \"context\": \"<string>\",\n \"taskContext\": \"<string>\",\n \"greeting\": \"<string>\",\n \"waitToGreet\": true,\n \"message\": \"<string>\",\n \"scheduledFor\": 123,\n \"externalTaskId\": \"<string>\",\n \"contactListName\": \"<string>\",\n \"goal\": {},\n \"retryPolicy\": {},\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 }\n ],\n \"contactListName\": \"<string>\",\n \"task\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vida.dev/api/v2/tasks/batches?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 \"tasks\": [\n {\n \"target\": \"<string>\",\n \"accountId\": 123,\n \"context\": \"<string>\",\n \"taskContext\": \"<string>\",\n \"greeting\": \"<string>\",\n \"waitToGreet\": true,\n \"message\": \"<string>\",\n \"scheduledFor\": 123,\n \"externalTaskId\": \"<string>\",\n \"contactListName\": \"<string>\",\n \"goal\": {},\n \"retryPolicy\": {},\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 }\n ],\n \"contactListName\": \"<string>\",\n \"task\": {}\n}"
response = http.request(request)
puts response.read_bodyCreate a task batch
Create up to 10,000 Tasks from either an explicit tasks array or a Contact List plus one Task template. Each Task uses the same fields and retry contract as POST /api/v2/tasks. Submissions over 1,000 Tasks require Idempotency-Key and return 202 while they are created.
curl --request POST \
--url 'https://api.vida.dev/api/v2/tasks/batches?token=' \
--header 'Content-Type: application/json' \
--data '
{
"tasks": [
{
"target": "<string>",
"accountId": 123,
"context": "<string>",
"taskContext": "<string>",
"greeting": "<string>",
"waitToGreet": true,
"message": "<string>",
"scheduledFor": 123,
"externalTaskId": "<string>",
"contactListName": "<string>",
"goal": {},
"retryPolicy": {},
"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": [
{}
]
}
}
}
],
"contactListName": "<string>",
"task": {}
}
'import requests
url = "https://api.vida.dev/api/v2/tasks/batches?token="
payload = {
"tasks": [
{
"target": "<string>",
"accountId": 123,
"context": "<string>",
"taskContext": "<string>",
"greeting": "<string>",
"waitToGreet": True,
"message": "<string>",
"scheduledFor": 123,
"externalTaskId": "<string>",
"contactListName": "<string>",
"goal": {},
"retryPolicy": {},
"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": [{}]
} }
}
],
"contactListName": "<string>",
"task": {}
}
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({
tasks: [
{
target: '<string>',
accountId: 123,
context: '<string>',
taskContext: '<string>',
greeting: '<string>',
waitToGreet: true,
message: '<string>',
scheduledFor: 123,
externalTaskId: '<string>',
contactListName: '<string>',
goal: {},
retryPolicy: {},
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: [{}]
}
}
}
],
contactListName: '<string>',
task: {}
})
};
fetch('https://api.vida.dev/api/v2/tasks/batches?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/batches?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([
'tasks' => [
[
'target' => '<string>',
'accountId' => 123,
'context' => '<string>',
'taskContext' => '<string>',
'greeting' => '<string>',
'waitToGreet' => true,
'message' => '<string>',
'scheduledFor' => 123,
'externalTaskId' => '<string>',
'contactListName' => '<string>',
'goal' => [
],
'retryPolicy' => [
],
'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' => [
[
]
]
]
]
]
],
'contactListName' => '<string>',
'task' => [
]
]),
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/batches?token="
payload := strings.NewReader("{\n \"tasks\": [\n {\n \"target\": \"<string>\",\n \"accountId\": 123,\n \"context\": \"<string>\",\n \"taskContext\": \"<string>\",\n \"greeting\": \"<string>\",\n \"waitToGreet\": true,\n \"message\": \"<string>\",\n \"scheduledFor\": 123,\n \"externalTaskId\": \"<string>\",\n \"contactListName\": \"<string>\",\n \"goal\": {},\n \"retryPolicy\": {},\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 }\n ],\n \"contactListName\": \"<string>\",\n \"task\": {}\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/batches?token=")
.header("Content-Type", "application/json")
.body("{\n \"tasks\": [\n {\n \"target\": \"<string>\",\n \"accountId\": 123,\n \"context\": \"<string>\",\n \"taskContext\": \"<string>\",\n \"greeting\": \"<string>\",\n \"waitToGreet\": true,\n \"message\": \"<string>\",\n \"scheduledFor\": 123,\n \"externalTaskId\": \"<string>\",\n \"contactListName\": \"<string>\",\n \"goal\": {},\n \"retryPolicy\": {},\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 }\n ],\n \"contactListName\": \"<string>\",\n \"task\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vida.dev/api/v2/tasks/batches?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 \"tasks\": [\n {\n \"target\": \"<string>\",\n \"accountId\": 123,\n \"context\": \"<string>\",\n \"taskContext\": \"<string>\",\n \"greeting\": \"<string>\",\n \"waitToGreet\": true,\n \"message\": \"<string>\",\n \"scheduledFor\": 123,\n \"externalTaskId\": \"<string>\",\n \"contactListName\": \"<string>\",\n \"goal\": {},\n \"retryPolicy\": {},\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 }\n ],\n \"contactListName\": \"<string>\",\n \"task\": {}\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Vida API Token
Headers
Required for submissions over 1,000 Tasks. Repeating the same key and payload safely resumes or returns that submission; reusing it for a different payload returns 409.
Show child attributes
Show child attributes
Body
Explicit Task objects. Each requires type; call, text, and email also require target.
1 - 10000 elementsShow child attributes
Show child attributes
Create one Task for every eligible Contact List member
Task template without target for the selected Contact List. Supports call, text, and email and the same goal/retryPolicy fields as POST /api/v2/tasks.
Response
Task batch created