curl --request POST \
--url 'https://api.vida.dev/api/v2/agent/outboundEmail?token=' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"target": "person@example.com",
"to": "<unknown>",
"cc": "<unknown>",
"bcc": "<unknown>",
"subject": "<string>",
"attachments": "<array>",
"context": "<string>",
"taskContext": "<string>",
"accountId": 123,
"agentId": 123,
"roomId": "<string>",
"replyToMessageUuid": "<string>",
"scheduledFor": 123,
"meta": {},
"externalTaskId": "<string>",
"contactListName": "<string>"
}
'import requests
url = "https://api.vida.dev/api/v2/agent/outboundEmail?token="
payload = {
"content": "<string>",
"target": "person@example.com",
"to": "<unknown>",
"cc": "<unknown>",
"bcc": "<unknown>",
"subject": "<string>",
"attachments": "<array>",
"context": "<string>",
"taskContext": "<string>",
"accountId": 123,
"agentId": 123,
"roomId": "<string>",
"replyToMessageUuid": "<string>",
"scheduledFor": 123,
"meta": {},
"externalTaskId": "<string>",
"contactListName": "<string>"
}
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({
content: '<string>',
target: 'person@example.com',
to: '<unknown>',
cc: '<unknown>',
bcc: '<unknown>',
subject: '<string>',
attachments: '<array>',
context: '<string>',
taskContext: '<string>',
accountId: 123,
agentId: 123,
roomId: '<string>',
replyToMessageUuid: '<string>',
scheduledFor: 123,
meta: {},
externalTaskId: '<string>',
contactListName: '<string>'
})
};
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([
'content' => '<string>',
'target' => 'person@example.com',
'to' => '<unknown>',
'cc' => '<unknown>',
'bcc' => '<unknown>',
'subject' => '<string>',
'attachments' => '<array>',
'context' => '<string>',
'taskContext' => '<string>',
'accountId' => 123,
'agentId' => 123,
'roomId' => '<string>',
'replyToMessageUuid' => '<string>',
'scheduledFor' => 123,
'meta' => [
],
'externalTaskId' => '<string>',
'contactListName' => '<string>'
]),
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 \"content\": \"<string>\",\n \"target\": \"person@example.com\",\n \"to\": \"<unknown>\",\n \"cc\": \"<unknown>\",\n \"bcc\": \"<unknown>\",\n \"subject\": \"<string>\",\n \"attachments\": \"<array>\",\n \"context\": \"<string>\",\n \"taskContext\": \"<string>\",\n \"accountId\": 123,\n \"agentId\": 123,\n \"roomId\": \"<string>\",\n \"replyToMessageUuid\": \"<string>\",\n \"scheduledFor\": 123,\n \"meta\": {},\n \"externalTaskId\": \"<string>\",\n \"contactListName\": \"<string>\"\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 \"content\": \"<string>\",\n \"target\": \"person@example.com\",\n \"to\": \"<unknown>\",\n \"cc\": \"<unknown>\",\n \"bcc\": \"<unknown>\",\n \"subject\": \"<string>\",\n \"attachments\": \"<array>\",\n \"context\": \"<string>\",\n \"taskContext\": \"<string>\",\n \"accountId\": 123,\n \"agentId\": 123,\n \"roomId\": \"<string>\",\n \"replyToMessageUuid\": \"<string>\",\n \"scheduledFor\": 123,\n \"meta\": {},\n \"externalTaskId\": \"<string>\",\n \"contactListName\": \"<string>\"\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 \"content\": \"<string>\",\n \"target\": \"person@example.com\",\n \"to\": \"<unknown>\",\n \"cc\": \"<unknown>\",\n \"bcc\": \"<unknown>\",\n \"subject\": \"<string>\",\n \"attachments\": \"<array>\",\n \"context\": \"<string>\",\n \"taskContext\": \"<string>\",\n \"accountId\": 123,\n \"agentId\": 123,\n \"roomId\": \"<string>\",\n \"replyToMessageUuid\": \"<string>\",\n \"scheduledFor\": 123,\n \"meta\": {},\n \"externalTaskId\": \"<string>\",\n \"contactListName\": \"<string>\"\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.
curl --request POST \
--url 'https://api.vida.dev/api/v2/agent/outboundEmail?token=' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"target": "person@example.com",
"to": "<unknown>",
"cc": "<unknown>",
"bcc": "<unknown>",
"subject": "<string>",
"attachments": "<array>",
"context": "<string>",
"taskContext": "<string>",
"accountId": 123,
"agentId": 123,
"roomId": "<string>",
"replyToMessageUuid": "<string>",
"scheduledFor": 123,
"meta": {},
"externalTaskId": "<string>",
"contactListName": "<string>"
}
'import requests
url = "https://api.vida.dev/api/v2/agent/outboundEmail?token="
payload = {
"content": "<string>",
"target": "person@example.com",
"to": "<unknown>",
"cc": "<unknown>",
"bcc": "<unknown>",
"subject": "<string>",
"attachments": "<array>",
"context": "<string>",
"taskContext": "<string>",
"accountId": 123,
"agentId": 123,
"roomId": "<string>",
"replyToMessageUuid": "<string>",
"scheduledFor": 123,
"meta": {},
"externalTaskId": "<string>",
"contactListName": "<string>"
}
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({
content: '<string>',
target: 'person@example.com',
to: '<unknown>',
cc: '<unknown>',
bcc: '<unknown>',
subject: '<string>',
attachments: '<array>',
context: '<string>',
taskContext: '<string>',
accountId: 123,
agentId: 123,
roomId: '<string>',
replyToMessageUuid: '<string>',
scheduledFor: 123,
meta: {},
externalTaskId: '<string>',
contactListName: '<string>'
})
};
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([
'content' => '<string>',
'target' => 'person@example.com',
'to' => '<unknown>',
'cc' => '<unknown>',
'bcc' => '<unknown>',
'subject' => '<string>',
'attachments' => '<array>',
'context' => '<string>',
'taskContext' => '<string>',
'accountId' => 123,
'agentId' => 123,
'roomId' => '<string>',
'replyToMessageUuid' => '<string>',
'scheduledFor' => 123,
'meta' => [
],
'externalTaskId' => '<string>',
'contactListName' => '<string>'
]),
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 \"content\": \"<string>\",\n \"target\": \"person@example.com\",\n \"to\": \"<unknown>\",\n \"cc\": \"<unknown>\",\n \"bcc\": \"<unknown>\",\n \"subject\": \"<string>\",\n \"attachments\": \"<array>\",\n \"context\": \"<string>\",\n \"taskContext\": \"<string>\",\n \"accountId\": 123,\n \"agentId\": 123,\n \"roomId\": \"<string>\",\n \"replyToMessageUuid\": \"<string>\",\n \"scheduledFor\": 123,\n \"meta\": {},\n \"externalTaskId\": \"<string>\",\n \"contactListName\": \"<string>\"\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 \"content\": \"<string>\",\n \"target\": \"person@example.com\",\n \"to\": \"<unknown>\",\n \"cc\": \"<unknown>\",\n \"bcc\": \"<unknown>\",\n \"subject\": \"<string>\",\n \"attachments\": \"<array>\",\n \"context\": \"<string>\",\n \"taskContext\": \"<string>\",\n \"accountId\": 123,\n \"agentId\": 123,\n \"roomId\": \"<string>\",\n \"replyToMessageUuid\": \"<string>\",\n \"scheduledFor\": 123,\n \"meta\": {},\n \"externalTaskId\": \"<string>\",\n \"contactListName\": \"<string>\"\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 \"content\": \"<string>\",\n \"target\": \"person@example.com\",\n \"to\": \"<unknown>\",\n \"cc\": \"<unknown>\",\n \"bcc\": \"<unknown>\",\n \"subject\": \"<string>\",\n \"attachments\": \"<array>\",\n \"context\": \"<string>\",\n \"taskContext\": \"<string>\",\n \"accountId\": 123,\n \"agentId\": 123,\n \"roomId\": \"<string>\",\n \"replyToMessageUuid\": \"<string>\",\n \"scheduledFor\": 123,\n \"meta\": {},\n \"externalTaskId\": \"<string>\",\n \"contactListName\": \"<string>\"\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 metadata
Reusable customer correlation/grouping ID; not an idempotency key
Optional Contact List to enroll the contact into
Response
Queued successfully