Agent Integrations
Connect website audits to AI workflows
ScanTheLink's Agent API pilot is designed for workflows where an agent needs website evidence before taking the next step. That can be a custom agent, n8n workflow, Make scenario, Zapier automation, CRM enrichment job, or agency reporting pipeline.
Integration Pattern
- Collect or receive a customer website URL.
- Call
POST /api/v1/scanswith an idempotency key. - Poll
GET /api/v1/scans/{agent_request_id}. - Transform
client_brief,client_safe_report,sales_talking_points,developer_tasks,evidence_summary,confidence, andrescan_comparisoninto your workflow output.
Copy-Paste Recipes
n8n HTTP Request
POST https://scanthelink.com/api/v1/scans
Authorization: Bearer {{$env.SCAN_THE_LINK_AGENT_KEY}}
Idempotency-Key: {{$json.customer_id}}-{{$json.website}}
Content-Type: application/json
{
"target": "{{$json.website}}",
"scan_type": "auto",
"scan_depth": "basic"
}
Store agent_request_id, wait or schedule a follow-up node, then call the returned status_url. Map client_brief.summary to the CRM note, sales_talking_points to the sales task, developer_tasks to the technical handoff, and rescan_comparison.summary to follow-up notes when history exists.
Make HTTP Module
Method: POST
URL: https://scanthelink.com/api/v1/scans
Headers:
Authorization = Bearer {{SCAN_THE_LINK_AGENT_KEY}}
Idempotency-Key = {{lead.id}}-{{lead.website}}
Body type: Raw JSON
Body:
{"target":"{{lead.website}}","scan_type":"auto","scan_depth":"basic"}
Use a second HTTP module for GET /api/v1/scans/{agent_request_id}. Route status=done into proposal or CRM enrichment, status=failed into retry/error handling, and pilot_credits_required or credits.event === "credits.low" into an operator task.
Zapier Webhooks
Webhook: Custom Request
Method: POST
URL: https://scanthelink.com/api/v1/scans
Headers:
Authorization: Bearer YOUR_AGENT_KEY
Idempotency-Key: {{Lead ID}}-{{Website}}
Data:
{"target":"{{Website}}","scan_type":"auto","scan_depth":"basic"}
For production Zaps, use a stable lead or deal ID in Idempotency-Key. Do not use the website alone if the same customer may request multiple scans for different decisions.
Retry And Operator Routing
Build explicit branches before the agent writes CRM notes or proposals. credits.low is an operator task, not a retry trigger.
400 invalid_target: fix or enrich the input URL/handle, then submit a new idempotency key.402 pilot_credits_required: pause the workflow and create a credit request task for the operator.403 agent_scope_required: route to manual access review, especially when a Deep/VIP scan was requested.429 agent_rate_limit_exceeded: wait forRetry-After, then retry with the same idempotency key.503 scan_queue_unavailable: back off and retry later with the same idempotency key.
Agent Output Mapping
{
"customer_note": "{{client_brief.summary}}",
"client_report": "{{client_safe_report}}",
"sales_next_steps": "{{sales_talking_points}}",
"technical_handoff": "{{developer_tasks}}",
"confidence_note": "{{confidence.grade}} - {{confidence.what_to_connect_next}}",
"follow_up_note": "{{rescan_comparison.summary}}",
"upgrade_hint": "{{upgrade_offer.offer_id}}"
}
Small Batch Option
Use POST /api/v1/scans/batch when your workflow receives several independent leads at once. Give every item its own stable idempotency_key. The response returns per-item accepted, reused, or rejected status so one bad target does not block the rest.
{
"source": "crm_agent",
"campaign_id": "june-leads",
"targets": [
{"target":"https://example.com","external_id":"lead-123","idempotency_key":"lead-123-example-com"},
{"target":"https://example.org","external_id":"lead-124","idempotency_key":"lead-124-example-org"}
]
}
Operational Notes
Keys are hashed, credits are tracked, repeated idempotency keys do not double-reserve credits, and stable error codes plus credits.low let the workflow decide whether to retry, ask for more credits, or fix the target.
Admin-configured pilot webhooks can send scan.completed, scan.failed, and credits.low to a public HTTPS endpoint. Use them for faster workflow routing, but keep status polling as the source of truth because webhook delivery is best-effort.
Test Phase Offer
During the test and build-out phase, approved agent accounts can request Agent VIP Scans for USD 1 per accepted VIP scan. Access is manual and capacity-limited.