Skip to main content
The HTTP contract of the fragment endpoint, the canonical AI-agent markers, and the abc.txt format.

Fragment endpoint

GET https://api.shftd2.com/fragment is served directly by doubleshift. It authenticates with your API key, selects a card, and returns it. The response depends only on the page and context, never on the visitor’s User-Agent (the UA is read only for reporting), so every 200/204 is cacheable by URL with no Vary: User-Agent. The previous host, app.shftd2.com/fragment, keeps serving identically as a legacy alias (it is not redirected). Use api.shftd2.com for new integrations.

Parameters

The endpoint also accepts the legacy placement_id as a deprecated alias for fragment_id.

Response codes

Success and no-fill responses carry Cache-Control: public, s-maxage=120, stale-while-revalidate=240; error responses are Cache-Control: no-store. A successful html response is Content-Type: text/html; charset=UTF-8.

Known AI agents (v0.1)

Your edge gates card requests on these markers, matched word-boundary, case-insensitive against the request User-Agent. Only a match triggers a card request; everyone else gets the page unchanged. Robots.txt-only control tokens (e.g. Google-Extended) are deliberately excluded, since they never appear in a request’s User-Agent. Purpose axis: query (real-time fetch for a user asking now), search (building/refreshing an AI search index), training (bulk crawl for a training corpus), unknown (mixed or undocumented). The canonical, machine-readable list is schema/agents.json on brandedcontent.dev Keep your edge regex in sync with it.

abc.txt format

abc.txt
  • One line per provider: provider_domain, account_id, relationship.
  • relationship is DIRECT (you control the account) or RESELLER (a partner resells on your behalf).
  • text/plain, ASCII; # starts a comment. Unknown fields are ignored, so the format can grow.
  • Served at https://<your-domain>/abc.txt. Optional: cards are delivered without it.
Where these definitions come fromThe live GET /fragment route defines the endpoint contract. brandedcontent.dev defines the agent registry and the abc.txt format.