Decline Opportunity
Decline one opportunity. AIclicks stops all work on it, charges nothing and does not offer that page again in the campaign unless you reconsider.
curl --request POST \
--url https://api.aiclicks.io/api/v1/outreach/opportunities/1c0d9e8f-7a6b-4c5d-9e3f-2b1c0d9e8f7a/decline \
--header 'Authorization: Bearer ak_live_xxx' \
--header 'Content-Type: application/json' \
--data '{
"reason": "not_relevant",
"note": "Client does not want to appear on coupon sites.",
"block_domain": true
}'
import httpx, os
resp = httpx.post(
"https://api.aiclicks.io/api/v1/outreach/opportunities/1c0d9e8f-7a6b-4c5d-9e3f-2b1c0d9e8f7a/decline",
headers={"Authorization": f"Bearer {os.environ['AICLICKS_API_KEY']}"},
json={"reason": "not_relevant", "block_domain": True},
)
resp.raise_for_status()
print(resp.json()["data"]["status"]) # declined
const resp = await fetch(
"https://api.aiclicks.io/api/v1/outreach/opportunities/1c0d9e8f-7a6b-4c5d-9e3f-2b1c0d9e8f7a/decline",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AICLICKS_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ reason: "not_relevant", block_domain: true }),
},
);
const { data } = await resp.json();
console.log(data.status); // declined
{
"data": {
"id": "1c0d9e8f-7a6b-4c5d-9e3f-2b1c0d9e8f7a",
"external_id": "opp_99122",
"status": "declined",
"declined_by": "client",
"action_required": false,
"decline_reason": "not_relevant",
"domain_blocked": true,
"updated_at": "2026-12-04T09:50:02.000Z"
},
"generated_at": "2026-12-04T09:50:02.090Z"
}
{
"detail": "Opportunity is 'completed' and cannot be declined."
}
Declines one opportunity for you. Its status becomes declined with declined_by: "client". The decline stays in place until you reconsider it:
- AIclicks stops all contact with the publisher about this page.
- Nothing is charged. If money was reserved, it goes back to the deposit.
- AIclicks does not offer the same URL to you again in this campaign. A later Send Sources call with the same URL returns
reason: "previously_declined". - With
block_domain: true, AIclicks also adds the domain tocriteria.excluded_domainsof the campaign, so that no other page of that site is used for this client.
You can decline an opportunity in any status except completed and declined. You do not have to wait for action_needed.
Path parameters
UUID of the opportunity.
Body parameters
too_expensive, low_quality, not_relevant, competitor, client_declined or other. AIclicks uses the reasons to improve the next opportunities for the client.
Free text, max 2,000 characters.
true adds source_domain to the excluded domains of the campaign. Default false.
Errors
The opportunity does not exist.
The opportunity is completed or declined. A repeat decline on an opportunity that you already declined returns 200 with the current state and domain_blocked: false. An opportunity that the publisher declined returns 409.