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

  1. Collect or receive a customer website URL.
  2. Call POST /api/v1/scans with an idempotency key.
  3. Poll GET /api/v1/scans/{agent_request_id}.
  4. Transform client_brief, client_safe_report, sales_talking_points, developer_tasks, evidence_summary, confidence, and rescan_comparison into 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.

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.

Open Agent docs View action schema