Reject multiple AI Sales Agent activities
curl --request POST \
--url https://api.instantly.ai/api/v2/ai-agents/sales/{id}/activities/reject \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"activity_ids": [
"01a0206f-f030-771f-8a7a-7eba98b13231",
"01a0206f-f030-771f-8a7a-7ebbb72585f1"
],
"rejection_reason": "Not aligned with current strategy"
}
'import requests
url = "https://api.instantly.ai/api/v2/ai-agents/sales/{id}/activities/reject"
payload = {
"activity_ids": ["01a0206f-f030-771f-8a7a-7eba98b13231", "01a0206f-f030-771f-8a7a-7ebbb72585f1"],
"rejection_reason": "Not aligned with current strategy"
}
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({
activity_ids: ['01a0206f-f030-771f-8a7a-7eba98b13231', '01a0206f-f030-771f-8a7a-7ebbb72585f1'],
rejection_reason: 'Not aligned with current strategy'
})
};
fetch('https://api.instantly.ai/api/v2/ai-agents/sales/{id}/activities/reject', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.instantly.ai/api/v2/ai-agents/sales/{id}/activities/reject")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"activity_ids\": [\n \"01a0206f-f030-771f-8a7a-7eba98b13231\",\n \"01a0206f-f030-771f-8a7a-7ebbb72585f1\"\n ],\n \"rejection_reason\": \"Not aligned with current strategy\"\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.instantly.ai/api/v2/ai-agents/sales/{id}/activities/reject",
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([
'activity_ids' => [
'01a0206f-f030-771f-8a7a-7eba98b13231',
'01a0206f-f030-771f-8a7a-7ebbb72585f1'
],
'rejection_reason' => 'Not aligned with current strategy'
]),
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.instantly.ai/api/v2/ai-agents/sales/{id}/activities/reject"
payload := strings.NewReader("{\n \"activity_ids\": [\n \"01a0206f-f030-771f-8a7a-7eba98b13231\",\n \"01a0206f-f030-771f-8a7a-7ebbb72585f1\"\n ],\n \"rejection_reason\": \"Not aligned with current strategy\"\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))
}{
"rejected": 2
}{
"statusCode": 400,
"error": "Bad Request",
"message": "body must have required property 'name'"
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Missing Authorization header"
}{
"statusCode": 402,
"error": "Payment Required",
"message": "Workspace does not have an active paid plan"
}{
"statusCode": 404,
"error": "Not Found",
"message": "Resource not found"
}{
"statusCode": 429,
"error": "Too Many Requests",
"message": "Rate limit exceeded"
}AI Sales Agent
Reject multiple AI Sales Agent activities
Reject multiple pending AI Sales Agent activity actions. Returns 404 when none of the activities exist or none are pending.
Requires one of the following scopes: ai_sdr:update, ai_sdr:all, all:update, all:all
POST
/
api
/
v2
/
ai-agents
/
sales
/
{id}
/
activities
/
reject
Reject multiple AI Sales Agent activities
curl --request POST \
--url https://api.instantly.ai/api/v2/ai-agents/sales/{id}/activities/reject \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"activity_ids": [
"01a0206f-f030-771f-8a7a-7eba98b13231",
"01a0206f-f030-771f-8a7a-7ebbb72585f1"
],
"rejection_reason": "Not aligned with current strategy"
}
'import requests
url = "https://api.instantly.ai/api/v2/ai-agents/sales/{id}/activities/reject"
payload = {
"activity_ids": ["01a0206f-f030-771f-8a7a-7eba98b13231", "01a0206f-f030-771f-8a7a-7ebbb72585f1"],
"rejection_reason": "Not aligned with current strategy"
}
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({
activity_ids: ['01a0206f-f030-771f-8a7a-7eba98b13231', '01a0206f-f030-771f-8a7a-7ebbb72585f1'],
rejection_reason: 'Not aligned with current strategy'
})
};
fetch('https://api.instantly.ai/api/v2/ai-agents/sales/{id}/activities/reject', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.instantly.ai/api/v2/ai-agents/sales/{id}/activities/reject")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"activity_ids\": [\n \"01a0206f-f030-771f-8a7a-7eba98b13231\",\n \"01a0206f-f030-771f-8a7a-7ebbb72585f1\"\n ],\n \"rejection_reason\": \"Not aligned with current strategy\"\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.instantly.ai/api/v2/ai-agents/sales/{id}/activities/reject",
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([
'activity_ids' => [
'01a0206f-f030-771f-8a7a-7eba98b13231',
'01a0206f-f030-771f-8a7a-7ebbb72585f1'
],
'rejection_reason' => 'Not aligned with current strategy'
]),
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.instantly.ai/api/v2/ai-agents/sales/{id}/activities/reject"
payload := strings.NewReader("{\n \"activity_ids\": [\n \"01a0206f-f030-771f-8a7a-7eba98b13231\",\n \"01a0206f-f030-771f-8a7a-7ebbb72585f1\"\n ],\n \"rejection_reason\": \"Not aligned with current strategy\"\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))
}{
"rejected": 2
}{
"statusCode": 400,
"error": "Bad Request",
"message": "body must have required property 'name'"
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Missing Authorization header"
}{
"statusCode": 402,
"error": "Payment Required",
"message": "Workspace does not have an active paid plan"
}{
"statusCode": 404,
"error": "Not Found",
"message": "Resource not found"
}{
"statusCode": 429,
"error": "Too Many Requests",
"message": "Rate limit exceeded"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
AI Sales Agent ID
Example:
"01a0206f-e414-76cf-8ce7-a2439b5bad4c"
Body
application/json
Array of activity IDs to reject (at most 100 per request)
Required array length:
1 - 100 elementsExample:
[
"01a0206f-f030-771f-8a7a-7eba98b13231",
"01a0206f-f030-771f-8a7a-7ebbb72585f1"
]
Reason for rejecting the activities
Example:
"Not aligned with current strategy"
Response
The number of activities rejected
Number of activities rejected
Example:
2
⌘I