curl --request POST \
--url 'https://api.vida.dev/api/v2/agent/outboundEmail?token=' \
--header 'Content-Type: application/json' \
--data '
{
"target": "lead@example.com",
"subject": "Your requested information",
"content": "Here is the information you requested.",
"meta": {
"contact": {
"name": "Example Person",
"phone": "+15551234567",
"address": {
"state": "LA",
"zip": "71101"
},
"customFields": {
"vendorLeadCode": "lead-123"
}
}
}
}
'import requests
url = "https://api.vida.dev/api/v2/agent/outboundEmail?token="
payload = {
"target": "lead@example.com",
"subject": "Your requested information",
"content": "Here is the information you requested.",
"meta": { "contact": {
"name": "Example Person",
"phone": "+15551234567",
"address": {
"state": "LA",
"zip": "71101"
},
"customFields": { "vendorLeadCode": "lead-123" }
} }
}
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({
target: 'lead@example.com',
subject: 'Your requested information',
content: 'Here is the information you requested.',
meta: {
contact: {
name: 'Example Person',
phone: '+15551234567',
address: {state: 'LA', zip: '71101'},
customFields: {vendorLeadCode: 'lead-123'}
}
}
})
};
fetch('https://api.vida.dev/api/v2/agent/outboundEmail?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/agent/outboundEmail?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([
'target' => 'lead@example.com',
'subject' => 'Your requested information',
'content' => 'Here is the information you requested.',
'meta' => [
'contact' => [
'name' => 'Example Person',
'phone' => '+15551234567',
'address' => [
'state' => 'LA',
'zip' => '71101'
],
'customFields' => [
'vendorLeadCode' => 'lead-123'
]
]
]
]),
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/agent/outboundEmail?token="
payload := strings.NewReader("{\n \"target\": \"lead@example.com\",\n \"subject\": \"Your requested information\",\n \"content\": \"Here is the information you requested.\",\n \"meta\": {\n \"contact\": {\n \"name\": \"Example Person\",\n \"phone\": \"+15551234567\",\n \"address\": {\n \"state\": \"LA\",\n \"zip\": \"71101\"\n },\n \"customFields\": {\n \"vendorLeadCode\": \"lead-123\"\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/agent/outboundEmail?token=")
.header("Content-Type", "application/json")
.body("{\n \"target\": \"lead@example.com\",\n \"subject\": \"Your requested information\",\n \"content\": \"Here is the information you requested.\",\n \"meta\": {\n \"contact\": {\n \"name\": \"Example Person\",\n \"phone\": \"+15551234567\",\n \"address\": {\n \"state\": \"LA\",\n \"zip\": \"71101\"\n },\n \"customFields\": {\n \"vendorLeadCode\": \"lead-123\"\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vida.dev/api/v2/agent/outboundEmail?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 \"target\": \"lead@example.com\",\n \"subject\": \"Your requested information\",\n \"content\": \"Here is the information you requested.\",\n \"meta\": {\n \"contact\": {\n \"name\": \"Example Person\",\n \"phone\": \"+15551234567\",\n \"address\": {\n \"state\": \"LA\",\n \"zip\": \"71101\"\n },\n \"customFields\": {\n \"vendorLeadCode\": \"lead-123\"\n }\n }\n }\n}"
response = http.request(request)
puts response.read_bodyQueue outbound email(s) from your Agent
Queue email Tasks for an email-enabled agent account. Pass target or to/cc/bcc for one email, or use up to 10,000 targets for separate emails. Organization default goals and retries apply when configured; use POST /api/v2/tasks to supply a Task-specific goal or retry policy. Submissions over 1,000 targets require Idempotency-Key and return 202. Use meta.contact for structured Contact data such as name, email, address and customFields. In a batch, put lead-specific metadata on each target object. See Contact fields for the complete metadata field reference.
curl --request POST \
--url 'https://api.vida.dev/api/v2/agent/outboundEmail?token=' \
--header 'Content-Type: application/json' \
--data '
{
"target": "lead@example.com",
"subject": "Your requested information",
"content": "Here is the information you requested.",
"meta": {
"contact": {
"name": "Example Person",
"phone": "+15551234567",
"address": {
"state": "LA",
"zip": "71101"
},
"customFields": {
"vendorLeadCode": "lead-123"
}
}
}
}
'import requests
url = "https://api.vida.dev/api/v2/agent/outboundEmail?token="
payload = {
"target": "lead@example.com",
"subject": "Your requested information",
"content": "Here is the information you requested.",
"meta": { "contact": {
"name": "Example Person",
"phone": "+15551234567",
"address": {
"state": "LA",
"zip": "71101"
},
"customFields": { "vendorLeadCode": "lead-123" }
} }
}
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({
target: 'lead@example.com',
subject: 'Your requested information',
content: 'Here is the information you requested.',
meta: {
contact: {
name: 'Example Person',
phone: '+15551234567',
address: {state: 'LA', zip: '71101'},
customFields: {vendorLeadCode: 'lead-123'}
}
}
})
};
fetch('https://api.vida.dev/api/v2/agent/outboundEmail?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/agent/outboundEmail?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([
'target' => 'lead@example.com',
'subject' => 'Your requested information',
'content' => 'Here is the information you requested.',
'meta' => [
'contact' => [
'name' => 'Example Person',
'phone' => '+15551234567',
'address' => [
'state' => 'LA',
'zip' => '71101'
],
'customFields' => [
'vendorLeadCode' => 'lead-123'
]
]
]
]),
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/agent/outboundEmail?token="
payload := strings.NewReader("{\n \"target\": \"lead@example.com\",\n \"subject\": \"Your requested information\",\n \"content\": \"Here is the information you requested.\",\n \"meta\": {\n \"contact\": {\n \"name\": \"Example Person\",\n \"phone\": \"+15551234567\",\n \"address\": {\n \"state\": \"LA\",\n \"zip\": \"71101\"\n },\n \"customFields\": {\n \"vendorLeadCode\": \"lead-123\"\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/agent/outboundEmail?token=")
.header("Content-Type", "application/json")
.body("{\n \"target\": \"lead@example.com\",\n \"subject\": \"Your requested information\",\n \"content\": \"Here is the information you requested.\",\n \"meta\": {\n \"contact\": {\n \"name\": \"Example Person\",\n \"phone\": \"+15551234567\",\n \"address\": {\n \"state\": \"LA\",\n \"zip\": \"71101\"\n },\n \"customFields\": {\n \"vendorLeadCode\": \"lead-123\"\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vida.dev/api/v2/agent/outboundEmail?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 \"target\": \"lead@example.com\",\n \"subject\": \"Your requested information\",\n \"content\": \"Here is the information you requested.\",\n \"meta\": {\n \"contact\": {\n \"name\": \"Example Person\",\n \"phone\": \"+15551234567\",\n \"address\": {\n \"state\": \"LA\",\n \"zip\": \"71101\"\n },\n \"customFields\": {\n \"vendorLeadCode\": \"lead-123\"\n }\n }\n }\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Vida API Token
Headers
Required for submissions over 1,000 targets. Repeating the same key and payload safely resumes or returns that submission.
Show child attributes
Show child attributes
Body
- Option 1
- Option 2
Email body. Raw HTML is supported.
Destination email address
"person@example.com"
Destination email address or array of destination email addresses for one email
CC email address or array of CC email addresses for one email
BCC email address or array of BCC email addresses for one email
Email subject line
SendGrid-style attachment objects with base64 content
Optional context for the task
Task-specific context
Optional agent account id override
Optional campaign id override
Room id when replying to an existing email message
Email message uuid to reply to; used with roomId for thread headers
Unix seconds to schedule delivery
Optional Task metadata. meta.contact fills missing structured Contact fields at creation; existing values are preserved. For multiple targets, set contact data in meta.contact on each target object. Per-item meta replaces the entire top-level meta object; it is not deep-merged.
Show child attributes
Show child attributes
Reusable customer correlation/grouping ID; not an idempotency key
Optional Contact List to enroll the contact into
Response
Queued successfully