> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shftd2.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Publishers integrate one API: GET https://api.shftd2.com/v1/fragment?partner_id=<account id>&page_url=<page URL>, called from their edge for AI-agent requests only, with the API key in the X-API-Key header, never in the query string.
> A 200 carries the card. A 204 means no card: serve the page unchanged.
> The management API (https://api.shftd2.com/v1/me, /v1/sites, /v1/cards, /v1/keys) is optional tooling for scripting setup. It takes its own management token (Authorization: Bearer ds_mgmt_…). Its limits (120 requests and 60 writes per minute per token) do not apply to the delivery API.
> Delivery logs reach doubleshift only through direct delivery logs (POST https://logs.shftd2.com/v1/beacon with a logs token; the edge library with a logsToken is its provided client, and a custom sender may use the same endpoint) or a Cloudflare Logpush job configured with doubleshift. Otherwise doubleshift sees only its own API activity.

# Changelog

> Dated changes to the delivery API, the edge library, the management API and the console, with each library version's SHA-256.

**2026-10-28 CloudFront, release candidate**

New integration path for Amazon CloudFront, as a release candidate: kit `0.1.0-rc.3`, a CloudFront Function that
sends AI-agent requests to a Lambda that reads the page through your distribution and runs the edge library 1.1.4.
Qualified on 28 October 2026 with the doubleshift API and reads by AI assistants. Download:
`https://api.shftd2.com/edge/cloudfront/doubleshift-cloudfront-kit-0.1.0-rc.3.zip`. The kit is © DS Technologies,
all rights reserved; its `LICENSE` grants doubleshift account holders the right to run it on their own
distributions. Installation: [Amazon CloudFront](https://docs.shftd2.com/integrate/cloudfront.md).

```text SHA-256 of the archive, kit 0.1.0-rc.3 theme={"theme":{"light":"css-variables","dark":"css-variables"}}
8120c973e8203cb499a06718d5a47500f281030a11139520a88ce1da12c1d7b7
```

```text SHA-256 of manifest.json, kit 0.1.0-rc.3 theme={"theme":{"light":"css-variables","dark":"css-variables"}}
7acf833bd67b0920052ed6a5b0daf084c14df6119ab3ff2e7c4ab27710ac4f34
```

**2026-10-20 Edge library 1.1.4**

Adds `scope`: `include` and `exclude` paths limit the pages the library works on; outside them, no call
and no record. The console's Worker code carries the paths of the routing rules you select.

```text SHA-256 theme={"theme":{"light":"css-variables","dark":"css-variables"}}
d4db890cbf27a2da1977d3ba76e0585ab3bf7cc78111eaddc71019527114e9d1
```

**2026-10-19 Documentation restructure**

The documentation now has two tabs. **Guides** holds 13 pages, from the Quickstart to verification.
**API reference** holds the delivery API, with a page generated for `GET /v1/fragment`, the edge
library, and the management API in its last group. This changelog is new. Five former URLs redirect
to their new pages.

**2026-10-19 Documentation brand**

The documentation now uses the doubleshift brand system: blue accent, Inter, the brand icons, and
diagrams in the brand colors. HTTP status codes appear as inline code. No page, URL or contract changed.

**2026-10-19 Where delivery records go**

Edge integration now says where delivery records go: direct delivery logs, Cloudflare Logpush (a logs
token for Logpush from doubleshift, a Logpush job on your account, Workers Paid plan), or your own logs
only. The Delivery logs API page is renamed **Direct delivery logs API**.

**2026-10-16 Edge library 1.1.3**

Adds direct delivery logs: with `logsToken` set, the library sends each delivery record to doubleshift in
the background. New options `quietInfo` and `skipIfEnriched`.

```text SHA-256 theme={"theme":{"light":"css-variables","dark":"css-variables"}}
5838c7455fb5b70057d446b9df8c30a58a5b931eff411d03ea2163174d682db0
```

**2026-10-16 Direct delivery logs endpoint**

`POST https://logs.shftd2.com/v1/beacon` receives one delivery record per request, authenticated by a logs
token that is separate from your API key. The library uses it from 1.1.3; a custom sender may use the
same contract. The reference page lists the record format and response codes.

**2026-10-16 Edge library 1.1.2**

The card no longer carries `role="complementary"`. When `deliveryCode` is enabled, the delivery code is
added to the in-content brand line.

```text SHA-256 theme={"theme":{"light":"css-variables","dark":"css-variables"}}
d58be3705ac019c087ac9f37766bd3641d6586c72de7119e458b97ffbdd4aa72
```

**2026-10-14 Edge library 1.1.1**

Adds delivery-record identifiers: each record carries `record_id`, and after an answer `status` and
`api_rid`; `card_written` once the card is inserted. The card's root carries its delivery number in
`data-ds-delivery`.

```text SHA-256 theme={"theme":{"light":"css-variables","dark":"css-variables"}}
9ff1eb413b1ba865890e65cb97a606f9cffb8f8243cf7af55b2f36302b4c25e0
```

**2026-10-14 Delivery number on every response**

Every response of `GET /v1/fragment`, whatever its status, carries its delivery
number in `X-Request-Id`. An `X-DS-Record-Id` request header holding a UUID is kept with the delivery;
any other value is ignored.

**2026-09-30 Edge library 1.1.0**

One pass over the page. The card is built at the edge from the JSON answer. On any outcome without a
card, the origin page is returned as is.

```text SHA-256 theme={"theme":{"light":"css-variables","dark":"css-variables"}}
5f8ea234d5420b3f29b98a81e781cb4e8a809aadda1f666436d6687b22063a95
```

**2026-09-30 Edge library 1.0.0**

First release of `doubleshift-edge.v1.js`, one file for a Cloudflare Worker. It calls `GET /v1/fragment`
for AI agents only, inserts the card before the first content container, and serves the page unchanged
if anything fails.

```text SHA-256 theme={"theme":{"light":"css-variables","dark":"css-variables"}}
ec8353ac11ee5ad27004473a6f2c37f04a00877da23559315eb952897c76bfb1
```

**2026-09-26 Management API**

New management API on `https://api.shftd2.com/v1`: create and update sites, fragments, the site default,
routing rules, card eligibility and API keys from a script. Calls use a management token
(`Authorization: Bearer`) that an organisation owner creates in **Settings → Management tokens**.

**2026-09-26 Card eligibility**

Cards are targeted by eligibility. A card with no fragment selected stays eligible everywhere in your
account; a card with fragments selected is eligible only on those. The console, the management API and
the docs call this "eligibility".

**2026-09-26 Universal call v1**

New `GET /v1/fragment`: send `partner_id` and `page_url`; doubleshift resolves the fragment from the page
(routing rule, then the site default). The key goes in `X-API-Key` only. Every response is
`Cache-Control: private, no-store`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.