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

# Misc

## Worked chains — pixels and redirects on your campaign

The root-mounted families below don't share a request envelope: each answers with its own content type, driven by what the caller's `Accept` header asks for. If the concept page's [public pixels, redirects, and short links](/concepts/public-pixels-redirects) is the contract, the three chains below are the wire.

### 1. Embed an open pixel and a referral redirect in one campaign template

In your email (or landing) template:

```html theme={null}
<img width="1" height="1"
     src="https://api.orbit.devotel.io/p/4b7c…9e2f.gif?m=msg_8kP2&t=tnt_ac4f2&ts=1788012345"
     alt="" />
<a href="https://api.orbit.devotel.io/r/Kz3mQa">Claim your offer</a>
```

The pixel answers with the transparent GIF and a body of no claim:

```http theme={null}
GET /p/4b7c…9e2f.gif?m=msg_8kP2&t=tnt_ac4f2&ts=1788012345
```

```
HTTP/1.1 200 OK
Content-Type: image/gif
Cache-Control: no-store, no-cache, must-revalidate, max-age=0
<43-byte transparent GIF>
```

A recipient following the link gets the redirect:

```http theme={null}
GET /r/Kz3mQa
Accept: text/html
```

```
HTTP/1.1 302 Found
Location: https://your-product.example/signup?ref_code=Kz3mQa
```

When the code is unknown, what comes back depends on the caller's `Accept`:

```
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
<branded error page>          (Accept: text/html)

HTTP/1.1 404 Not Found
{ "error": { "code": "LINK_NOT_FOUND", "message": "Unknown or malformed link", "status": 404 } }
                             (Accept: application/json)
```

### 2. Programmatic landing-page converts with `Idempotency-Key`

`POST /lp/:code/convert` is the family's one JSON-capable route. Send `Accept: application/json` plus a stable key:

```http theme={null}
POST /lp/k9Pq2/convert HTTP/1.1
Content-Type: application/json
Accept: application/json
X-API-Key: dv_live_sk_your_key_here
Idempotency-Key: form-k9Pq2-attempt-1

{ "kind": "opt_in", "email": "reader@example.com" }
```

```
HTTP/1.1 201 Created

{ "data": { "status": "recorded" }, "meta": { "timestamp": "2026-09-09T12:00:00Z" } }
```

Replay the same key plus credential and the cached response returns unchanged — the original envelope replays within the 24h retention with `Idempotency-Replay: true` on the response header:

```
HTTP/1.1 201 Created
Idempotency-Replay: true

{ "data": { "status": "recorded" }, "meta": { "timestamp": "2026-09-09T12:00:00Z" } }
```

The rendered opt-in form itself omits the header — the anonymous browser submit records once per submit; only a programmatic client sees the replay semantics.

### 3. Verify the HMAC on `/r/:sig/:target`

`/:target` is base64url JSON over the exact wire bytes; `/:sig` is the base64url HMAC-SHA256 of those bytes. A tampered (re-encoded) segment is rejected before any redirect.

Valid:

```http theme={null}
GET /r/X2kPv7…/eyJ0IjoidGVuYW50X2FjNGYyIiwibSI6Im1zZ184a1AyIiwidSI6Imh0dH…
```

```
HTTP/1.1 302 Found
Location: https://example.com/offer
Cache-Control: private, no-store
Referrer-Policy: no-referrer
```

Re-serialized (different key order, pretty-printed, normalized `ts`):

```
HTTP/1.1 400 Bad Request
Content-Type: text/plain; charset=utf-8
Cache-Control: private, no-store

This link is invalid or has expired.
```

The signature gate decides whether the engagement is recorded; it never changes what the recipient renders. Pixels render on every path, and the redirect accepts no malformed wire form.

<Tip>
  For the full signing model (which tuple each family signs) and the interaction with the delivery lifecycle, see [public pixels, redirects, and short links](/concepts/public-pixels-redirects) and [email delivery lifecycle](/concepts/email-delivery-lifecycle).
</Tip>
