---
title: "Store your bookmaker link templates"
method: PUT
path: "/v1/link-templates"
tags: ["Account"]
---

# Store your bookmaker link templates

`PUT /v1/link-templates`

## Request

- Base URL: `https://api.puntersedge.online`
- URL: `https://api.puntersedge.online/v1/link-templates`
- Auth: API key in header `X-API-Key`

Cost: 0 credits. Store how every bookmaker link in your racing responses should be built.
A FULL replacement: send the whole document each time.

Once stored, every racing response that carries a bookmaker URL also carries a ready-made
twin built through your templates: `source_link` beside `source_url` (next-to-go legs,
best-odds quotes, markets), `betslip_win_link` / `betslip_place_link` beside the betslip
URLs (next-to-go, changes) and `betslip_link` beside `betslip_url` (best-odds). Put the
`*_link` value on your page. A twin is absent where there is nothing to link: the book gave
no URL, or your rule for that book is "none". The `*_url` fields are unchanged.

The document:

- `mode`: what a book without its own rule gets. `"source"` (default) links straight to the
  bookmaker's URL, `"template"` sends it through `template`, `"none"` gives no link.
- `template`: your tracking link with `{url}` where the bookmaker's URL goes
  (percent-encoded), or `{url_raw}` to insert it unencoded. Must start `https://`. Required
  when `mode` is `"template"`.
- `per_bookmaker`: a rule per bookmaker key (`ladbrokes_au`, `unibet`, `tab`, ...): a
  template, `"source"` or `"none"`. It beats `mode`. An unknown key is refused, so a typo
  cannot silently drop a book's link.

We append nothing of our own to any link. Whether a bookmaker's affiliate programme credits
a click, and whether it accepts a deep-link destination at all, is between you and that
programme. Prices shown to your users still need the visible "Prices by PuntersEdge"
credit your plan's licence requires (Terms 8.1 and 8.3); Platform's white-label widget is
the version without it.

Takes effect on your next request. Primary key only. Step-by-step guide with curl, Python and
JavaScript examples: https://puntersedge.online/developers/affiliate-links

## Headers

- `X-API-Key` string
- `X-RapidAPI-Proxy-Secret` string

## Request body

- object

## Response `200`

Successful Response

- unknown

## Other responses

- `401`: Missing or invalid API key. Send `X-API-Key`. See https://puntersedge.online/developers/errors
- `402`: Monthly credit allowance exhausted for this plan. Upgrade at https://puntersedge.online/api/pricing
- `403`: Stored link templates are a Plus entitlement, and only the account's primary key may change them.
- `422`: A field is invalid; the message names it.
- `429`: Rate limit exceeded for this plan. Honour the `Retry-After` header (seconds) before retrying. See https://puntersedge.online/developers/rate-limits
- `500`: Unexpected server error. Safe to retry with backoff.
- `503`: Link templates are not available yet.

---

[API](https://skmtc.dev/puntersedge/apis/puntersedge-odds-api.md) · [All operations](https://skmtc.dev/puntersedge/apis/puntersedge-odds-api/llms.txt) · [OpenAPI document](https://skmtc.dev/puntersedge/apis/puntersedge-odds-api/revisions/f35b6aab1946?raw)
