/agents/:id/reference-linksAttach one or more URLs and queue their first crawl.
Attach reference links
Returns immediately with each link crawl_state = queued: a fifty-page crawl with embedding does not fit inside an HTTP request, and there is nothing to review until it has run. All or nothing. One bad URL rejects the whole request with a message naming it, rather than creating the others and leaving you to work out which ones landed.
Path & Query
1idstringrequiredThe agent the link belongs to.
Request body
3linksarrayrequiredThe links to attach. At least one, at most ten per request, and an agent carries at most ten in total.
links[].urlstringrequiredAn
httporhttpsURL. Normalised before it is stored: tracking parameters and the fragment are dropped, the host is lowercased. Two spellings of the same page therefore count as one link.links[].crawl_modestringoptionalpage(default) reads that one URL.sitealso follows its internal links, bounded by the global page and depth limits.
Errors
6The X-API-Key header was absent, malformed, or the key has been revoked.
Send a live key from your dashboard.
Reading links needs agents:read; attaching, approving, accepting and deleting need agents:write.
Use a key that carries the scope, or add it to this one.
No agent with that id exists on your account. Agents are scoped to the key's tenant, so another account's agent reads as absent.
Check the agent id.
This agent already has a link for one of these URLs. Because URLs are normalised first, /docs and /docs?utm_source=x collide here.
The error names the URLs. Drop them from the request, or re-crawl the existing link instead.
A URL is not http/https, carries credentials, contains control characters, or exceeds 2048 characters. The same request also fails if it lists one page twice.
The message names the offending URL. Fix it and resend the whole list.
An agent can carry at most ten reference links, and the request would take it past that.
Delete links you no longer need, or split the pages across agents.
