Queues a bulk run for the authorized lead audience.
curl --request POST \
--url https://api.leadping.ai/automations/{id}/run-for-audience \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"audience": {
"organizationId": "<string>",
"assignedToUserId": "<string>",
"selectedAt": "2023-11-07T05:31:56Z",
"includeDemo": true,
"count": 123
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"excludedLeadIds": [
"<string>"
]
}
'import requests
url = "https://api.leadping.ai/automations/{id}/run-for-audience"
payload = {
"audience": {
"organizationId": "<string>",
"assignedToUserId": "<string>",
"selectedAt": "2023-11-07T05:31:56Z",
"includeDemo": True,
"count": 123
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"excludedLeadIds": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.leadping.ai/automations/{id}/run-for-audience");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"audience\": {\n \"organizationId\": \"<string>\",\n \"assignedToUserId\": \"<string>\",\n \"selectedAt\": \"2023-11-07T05:31:56Z\",\n \"includeDemo\": true,\n \"count\": 123\n },\n \"requestId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"excludedLeadIds\": [\n \"<string>\"\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://api.leadping.ai/automations/{id}/run-for-audience")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"audience\": {\n \"organizationId\": \"<string>\",\n \"assignedToUserId\": \"<string>\",\n \"selectedAt\": \"2023-11-07T05:31:56Z\",\n \"includeDemo\": true,\n \"count\": 123\n },\n \"requestId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"excludedLeadIds\": [\n \"<string>\"\n ]\n}")
.asString();const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
audience: {
organizationId: '<string>',
assignedToUserId: '<string>',
selectedAt: '2023-11-07T05:31:56Z',
includeDemo: true,
count: 123
},
requestId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
excludedLeadIds: ['<string>']
})
};
fetch('https://api.leadping.ai/automations/{id}/run-for-audience', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.leadping.ai/automations/{id}/run-for-audience"
payload := strings.NewReader("{\n \"audience\": {\n \"organizationId\": \"<string>\",\n \"assignedToUserId\": \"<string>\",\n \"selectedAt\": \"2023-11-07T05:31:56Z\",\n \"includeDemo\": true,\n \"count\": 123\n },\n \"requestId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"excludedLeadIds\": [\n \"<string>\"\n ]\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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.leadping.ai/automations/{id}/run-for-audience",
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([
'audience' => [
'organizationId' => '<string>',
'assignedToUserId' => '<string>',
'selectedAt' => '2023-11-07T05:31:56Z',
'includeDemo' => true,
'count' => 123
],
'requestId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'excludedLeadIds' => [
'<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;
}true{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Forbidden",
"status": 403,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Too Many Requests",
"status": 429,
"detail": "The request could not be completed."
}Automations
Queues a bulk run for the authorized lead audience.
Queue a Leadping automation for a group of leads in one request. The bulk run uses the lead audience the current user is authorized to select.
POST
/
automations
/
{id}
/
run-for-audience
Queues a bulk run for the authorized lead audience.
curl --request POST \
--url https://api.leadping.ai/automations/{id}/run-for-audience \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"audience": {
"organizationId": "<string>",
"assignedToUserId": "<string>",
"selectedAt": "2023-11-07T05:31:56Z",
"includeDemo": true,
"count": 123
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"excludedLeadIds": [
"<string>"
]
}
'import requests
url = "https://api.leadping.ai/automations/{id}/run-for-audience"
payload = {
"audience": {
"organizationId": "<string>",
"assignedToUserId": "<string>",
"selectedAt": "2023-11-07T05:31:56Z",
"includeDemo": True,
"count": 123
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"excludedLeadIds": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.leadping.ai/automations/{id}/run-for-audience");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"audience\": {\n \"organizationId\": \"<string>\",\n \"assignedToUserId\": \"<string>\",\n \"selectedAt\": \"2023-11-07T05:31:56Z\",\n \"includeDemo\": true,\n \"count\": 123\n },\n \"requestId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"excludedLeadIds\": [\n \"<string>\"\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://api.leadping.ai/automations/{id}/run-for-audience")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"audience\": {\n \"organizationId\": \"<string>\",\n \"assignedToUserId\": \"<string>\",\n \"selectedAt\": \"2023-11-07T05:31:56Z\",\n \"includeDemo\": true,\n \"count\": 123\n },\n \"requestId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"excludedLeadIds\": [\n \"<string>\"\n ]\n}")
.asString();const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
audience: {
organizationId: '<string>',
assignedToUserId: '<string>',
selectedAt: '2023-11-07T05:31:56Z',
includeDemo: true,
count: 123
},
requestId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
excludedLeadIds: ['<string>']
})
};
fetch('https://api.leadping.ai/automations/{id}/run-for-audience', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.leadping.ai/automations/{id}/run-for-audience"
payload := strings.NewReader("{\n \"audience\": {\n \"organizationId\": \"<string>\",\n \"assignedToUserId\": \"<string>\",\n \"selectedAt\": \"2023-11-07T05:31:56Z\",\n \"includeDemo\": true,\n \"count\": 123\n },\n \"requestId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"excludedLeadIds\": [\n \"<string>\"\n ]\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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.leadping.ai/automations/{id}/run-for-audience",
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([
'audience' => [
'organizationId' => '<string>',
'assignedToUserId' => '<string>',
'selectedAt' => '2023-11-07T05:31:56Z',
'includeDemo' => true,
'count' => 123
],
'requestId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'excludedLeadIds' => [
'<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;
}true{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Forbidden",
"status": 403,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Too Many Requests",
"status": 429,
"detail": "The request could not be completed."
}Authorizations
Body
application/jsontext/jsonapplication/*+json
Response
Accepted
The response is of type boolean.

