cURL
curl --request POST \
--url https://api.erdo.ai/v1/outreach-batches/{batch}/actions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "<string>",
"action_ref": "<string>",
"expected_batch_state": "<string>",
"expected_batch_updated_at": "<string>",
"expected_eligible_count": 123,
"expected_message_hash": "<string>",
"expected_preview_revision": "<string>",
"expected_source_snapshot_ref": "<string>"
}
'import requests
url = "https://api.erdo.ai/v1/outreach-batches/{batch}/actions"
payload = {
"action": "<string>",
"action_ref": "<string>",
"expected_batch_state": "<string>",
"expected_batch_updated_at": "<string>",
"expected_eligible_count": 123,
"expected_message_hash": "<string>",
"expected_preview_revision": "<string>",
"expected_source_snapshot_ref": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
action: '<string>',
action_ref: '<string>',
expected_batch_state: '<string>',
expected_batch_updated_at: '<string>',
expected_eligible_count: 123,
expected_message_hash: '<string>',
expected_preview_revision: '<string>',
expected_source_snapshot_ref: '<string>'
})
};
fetch('https://api.erdo.ai/v1/outreach-batches/{batch}/actions', 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.erdo.ai/v1/outreach-batches/{batch}/actions",
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([
'action' => '<string>',
'action_ref' => '<string>',
'expected_batch_state' => '<string>',
'expected_batch_updated_at' => '<string>',
'expected_eligible_count' => 123,
'expected_message_hash' => '<string>',
'expected_preview_revision' => '<string>',
'expected_source_snapshot_ref' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.erdo.ai/v1/outreach-batches/{batch}/actions"
payload := strings.NewReader("{\n \"action\": \"<string>\",\n \"action_ref\": \"<string>\",\n \"expected_batch_state\": \"<string>\",\n \"expected_batch_updated_at\": \"<string>\",\n \"expected_eligible_count\": 123,\n \"expected_message_hash\": \"<string>\",\n \"expected_preview_revision\": \"<string>\",\n \"expected_source_snapshot_ref\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.erdo.ai/v1/outreach-batches/{batch}/actions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"<string>\",\n \"action_ref\": \"<string>\",\n \"expected_batch_state\": \"<string>\",\n \"expected_batch_updated_at\": \"<string>\",\n \"expected_eligible_count\": 123,\n \"expected_message_hash\": \"<string>\",\n \"expected_preview_revision\": \"<string>\",\n \"expected_source_snapshot_ref\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erdo.ai/v1/outreach-batches/{batch}/actions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"action\": \"<string>\",\n \"action_ref\": \"<string>\",\n \"expected_batch_state\": \"<string>\",\n \"expected_batch_updated_at\": \"<string>\",\n \"expected_eligible_count\": 123,\n \"expected_message_hash\": \"<string>\",\n \"expected_preview_revision\": \"<string>\",\n \"expected_source_snapshot_ref\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"acted_at": "2023-11-07T05:31:56Z",
"action": "<string>",
"action_ref": "<string>",
"batch": {
"armed_at": "2023-11-07T05:31:56Z",
"batch_slug": "<string>",
"cancelled_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"default_country": "<string>",
"delayed_by_days": 123,
"delayed_count": 123,
"delayed_until": "2023-11-07T05:31:56Z",
"eligible_count": 123,
"excluded_count": 123,
"immediate_count": 123,
"initiative_ref": "<string>",
"message_body": "<string>",
"message_hash": "<string>",
"message_version": "<string>",
"paused_at": "2023-11-07T05:31:56Z",
"preview_revision": "<string>",
"previewed_at": "2023-11-07T05:31:56Z",
"recipient_count": 123,
"sequence_step": "<string>",
"source_snapshot_ref": "<string>",
"state": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
},
"replayed": true,
"state": "<string>"
}{
"code": "not_found",
"details": {},
"message": "<string>"
}API Reference
Post v1outreach batches actions
POST
/
v1
/
outreach-batches
/
{batch}
/
actions
cURL
curl --request POST \
--url https://api.erdo.ai/v1/outreach-batches/{batch}/actions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "<string>",
"action_ref": "<string>",
"expected_batch_state": "<string>",
"expected_batch_updated_at": "<string>",
"expected_eligible_count": 123,
"expected_message_hash": "<string>",
"expected_preview_revision": "<string>",
"expected_source_snapshot_ref": "<string>"
}
'import requests
url = "https://api.erdo.ai/v1/outreach-batches/{batch}/actions"
payload = {
"action": "<string>",
"action_ref": "<string>",
"expected_batch_state": "<string>",
"expected_batch_updated_at": "<string>",
"expected_eligible_count": 123,
"expected_message_hash": "<string>",
"expected_preview_revision": "<string>",
"expected_source_snapshot_ref": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
action: '<string>',
action_ref: '<string>',
expected_batch_state: '<string>',
expected_batch_updated_at: '<string>',
expected_eligible_count: 123,
expected_message_hash: '<string>',
expected_preview_revision: '<string>',
expected_source_snapshot_ref: '<string>'
})
};
fetch('https://api.erdo.ai/v1/outreach-batches/{batch}/actions', 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.erdo.ai/v1/outreach-batches/{batch}/actions",
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([
'action' => '<string>',
'action_ref' => '<string>',
'expected_batch_state' => '<string>',
'expected_batch_updated_at' => '<string>',
'expected_eligible_count' => 123,
'expected_message_hash' => '<string>',
'expected_preview_revision' => '<string>',
'expected_source_snapshot_ref' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.erdo.ai/v1/outreach-batches/{batch}/actions"
payload := strings.NewReader("{\n \"action\": \"<string>\",\n \"action_ref\": \"<string>\",\n \"expected_batch_state\": \"<string>\",\n \"expected_batch_updated_at\": \"<string>\",\n \"expected_eligible_count\": 123,\n \"expected_message_hash\": \"<string>\",\n \"expected_preview_revision\": \"<string>\",\n \"expected_source_snapshot_ref\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.erdo.ai/v1/outreach-batches/{batch}/actions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"<string>\",\n \"action_ref\": \"<string>\",\n \"expected_batch_state\": \"<string>\",\n \"expected_batch_updated_at\": \"<string>\",\n \"expected_eligible_count\": 123,\n \"expected_message_hash\": \"<string>\",\n \"expected_preview_revision\": \"<string>\",\n \"expected_source_snapshot_ref\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erdo.ai/v1/outreach-batches/{batch}/actions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"action\": \"<string>\",\n \"action_ref\": \"<string>\",\n \"expected_batch_state\": \"<string>\",\n \"expected_batch_updated_at\": \"<string>\",\n \"expected_eligible_count\": 123,\n \"expected_message_hash\": \"<string>\",\n \"expected_preview_revision\": \"<string>\",\n \"expected_source_snapshot_ref\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"acted_at": "2023-11-07T05:31:56Z",
"action": "<string>",
"action_ref": "<string>",
"batch": {
"armed_at": "2023-11-07T05:31:56Z",
"batch_slug": "<string>",
"cancelled_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"default_country": "<string>",
"delayed_by_days": 123,
"delayed_count": 123,
"delayed_until": "2023-11-07T05:31:56Z",
"eligible_count": 123,
"excluded_count": 123,
"immediate_count": 123,
"initiative_ref": "<string>",
"message_body": "<string>",
"message_hash": "<string>",
"message_version": "<string>",
"paused_at": "2023-11-07T05:31:56Z",
"preview_revision": "<string>",
"previewed_at": "2023-11-07T05:31:56Z",
"recipient_count": 123,
"sequence_step": "<string>",
"source_snapshot_ref": "<string>",
"state": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
},
"replayed": true,
"state": "<string>"
}{
"code": "not_found",
"details": {},
"message": "<string>"
}Authorizations
An Erdo API key (erdo_api_...) or scoped token (erdo_token_...).
Path Parameters
Body
application/json

