curl --request POST \
--url https://api.instantly.ai/api/v2/ai-agents/sales/{id}/activities/{activity_id}/reject \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rejection_reason": "Not aligned with current strategy"
}
'import requests
url = "https://api.instantly.ai/api/v2/ai-agents/sales/{id}/activities/{activity_id}/reject"
payload = { "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({rejection_reason: 'Not aligned with current strategy'})
};
fetch('https://api.instantly.ai/api/v2/ai-agents/sales/{id}/activities/{activity_id}/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/{activity_id}/reject")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\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/{activity_id}/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([
'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/{activity_id}/reject"
payload := strings.NewReader("{\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))
}{
"id": "01a08b36-6a3c-75f7-9fe7-c8126769608a",
"ai_sdr_id": "01a08b36-6a3c-75f7-9fe7-c814bf1205bf",
"workspace_id": "01a08b36-6a3c-75f7-9fe7-c816e9ac7307",
"action_type": "create_campaign",
"action_status": "pending",
"timestamp_created": "2026-09-10T12:06:34.300Z",
"timestamp_updated": "2026-09-10T12:06:34.300Z",
"action_payload": {},
"action_output": {},
"email_id": "01a08b36-6a3c-75f7-9fe7-c8171d77ea8c",
"approved_by": "01a08b36-6a3c-75f7-9fe7-c81962446202",
"approved_at": "2026-09-10T12:06:34.300Z",
"rejected_by": "01a08b36-6a3c-75f7-9fe7-c81bfd2a91d1",
"rejected_at": "2026-09-10T12:06:34.300Z",
"rejection_reason": "Not aligned with current strategy",
"ai_reasoning": "This lead matches the ICP criteria and has shown interest",
"ai_confidence": 0.85,
"result": {},
"error_message": "Failed to create campaign: Invalid email list",
"error_code": "insufficient_credits",
"timestamp_executed": "2026-09-10T12:06:34.300Z",
"timestamp_completed": "2026-09-10T12:06:34.300Z"
}{
"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"
}Reject an AI Sales Agent activity
Reject a pending AI Sales Agent activity action. Returns 404 when the activity does not exist or is not pending.
Requires one of the following scopes: ai_sdr:update, ai_sdr:all, all:update, all:all
curl --request POST \
--url https://api.instantly.ai/api/v2/ai-agents/sales/{id}/activities/{activity_id}/reject \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rejection_reason": "Not aligned with current strategy"
}
'import requests
url = "https://api.instantly.ai/api/v2/ai-agents/sales/{id}/activities/{activity_id}/reject"
payload = { "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({rejection_reason: 'Not aligned with current strategy'})
};
fetch('https://api.instantly.ai/api/v2/ai-agents/sales/{id}/activities/{activity_id}/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/{activity_id}/reject")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\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/{activity_id}/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([
'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/{activity_id}/reject"
payload := strings.NewReader("{\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))
}{
"id": "01a08b36-6a3c-75f7-9fe7-c8126769608a",
"ai_sdr_id": "01a08b36-6a3c-75f7-9fe7-c814bf1205bf",
"workspace_id": "01a08b36-6a3c-75f7-9fe7-c816e9ac7307",
"action_type": "create_campaign",
"action_status": "pending",
"timestamp_created": "2026-09-10T12:06:34.300Z",
"timestamp_updated": "2026-09-10T12:06:34.300Z",
"action_payload": {},
"action_output": {},
"email_id": "01a08b36-6a3c-75f7-9fe7-c8171d77ea8c",
"approved_by": "01a08b36-6a3c-75f7-9fe7-c81962446202",
"approved_at": "2026-09-10T12:06:34.300Z",
"rejected_by": "01a08b36-6a3c-75f7-9fe7-c81bfd2a91d1",
"rejected_at": "2026-09-10T12:06:34.300Z",
"rejection_reason": "Not aligned with current strategy",
"ai_reasoning": "This lead matches the ICP criteria and has shown interest",
"ai_confidence": 0.85,
"result": {},
"error_message": "Failed to create campaign: Invalid email list",
"error_code": "insufficient_credits",
"timestamp_executed": "2026-09-10T12:06:34.300Z",
"timestamp_completed": "2026-09-10T12:06:34.300Z"
}{
"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
"01a08b36-b27f-768a-b450-8bb0a6b95701"
Activity ID
"01a08b36-b27f-768a-b450-8bb167772837"
Body
Reason for rejecting the activity
"Not aligned with current strategy"
Response
The rejected activity
An activity performed by an AI Sales Agent
Unique identifier for the activity
"01a08b36-6a3c-75f7-9fe7-c8126769608a"
ID of the AI Sales Agent that performed this activity
"01a08b36-6a3c-75f7-9fe7-c814bf1205bf"
Workspace ID that owns this activity
"01a08b36-6a3c-75f7-9fe7-c816e9ac7307"
Type of action performed
create_campaign, edit_campaign, stop_campaign, pause_campaign, enrich_leads, push_lead, recommend_lead, warning, initial_setup_scrape, initial_setup_campaigns, initial_setup_enrich, email_sent, lead_meeting_booked, lead_closed, email_opened, reply_received, opportunity_received, campaign_completed, imported_leads "create_campaign"
Status of the activity
pending, approved, rejected, in_progress, completed, failed "pending"
Timestamp when the activity was created
"2026-09-10T12:06:34.300Z"
Timestamp when the activity was last updated
"2026-09-10T12:06:34.300Z"
Payload data for the activity action
Output data for frontend display (e.g., lead_email, campaign_name, etc.)
"01a08b36-6a3c-75f7-9fe7-c8171d77ea8c"
User ID who approved this activity
"01a08b36-6a3c-75f7-9fe7-c81962446202"
Timestamp when the activity was approved
"2026-09-10T12:06:34.300Z"
User ID who rejected this activity
"01a08b36-6a3c-75f7-9fe7-c81bfd2a91d1"
Timestamp when the activity was rejected
"2026-09-10T12:06:34.300Z"
Reason for rejecting the activity
"Not aligned with current strategy"
AI reasoning for this activity
"This lead matches the ICP criteria and has shown interest"
AI confidence score for this activity (0-1)
0.85
Result data from executing the activity
Error message if the activity failed
"Failed to create campaign: Invalid email list"
Stable error category if the activity failed
insufficient_credits, insufficient_upload_limit, no_leads_with_email, scrape_site_not_supported, campaign_operation_failed, lead_move_failed, enrichment_failed, configuration_error, master_list_missing, temporary_failure, prospecting_incomplete, internal_error "insufficient_credits"
Timestamp when the activity was executed
"2026-09-10T12:06:34.300Z"
Timestamp when the activity was completed
"2026-09-10T12:06:34.300Z"