API reference
Editing over the API
Create and change pages, links and poplinks over the API with an edit key, and what needs an explicit confirm.
#An edit key
Make one at Dashboard › API and choose Read and edit. Only the account owner can. Thirty changes an hour per key, inside the sixty requests. Bodies are JSON. A field we do not know is refused rather than ignored, so a typo cannot look like a save.
#Pages
| Call | What it does |
|---|---|
POST /api/v1/pages | A new page from {"slug": "..."} plus any page fields. Always a draft. Counts against the plan's pages |
GET /api/v1/pages/:page | The page in full. :page is its id or slug |
PATCH /api/v1/pages/:page | Change fields. Send only the ones that change |
POST /api/v1/pages/:page/duplicate | A paused copy at slug-copy |
Page fields: name, handle, bio, hero,
theme, font, shape, colours
({bg, ink, button, button_text}, or null to clear),
capture, capture_label, listed,
countdown ({at, label, done}), iab_mode,
preview, geo_block, geo_mode,
human_check, deeplink, stars,
translate, followers_on, badge,
smart_loc, verified, tags, iab_title, iab_hero,
and links and socials as arrays of
{id?, label, url, adult}: with an id it changes that one, without it adds one.
These need "confirm": true, because they can take a page offline or change
who can see it: slug, status (live or
paused), domain (one of yours, from
/api/v1/domains), shield and crawler_mode. Without
it you get a 409 naming them, and nothing changes.
curl -X PATCH https://peekin.bio/api/v1/pages/yourname -H "Authorization: Bearer pk_live_YOUR_EDIT_KEY" -H "Content-Type: application/json" -d '{"bio": "New shoot every Friday", "status": "live", "confirm": true}'#Links
| Call | What it does |
|---|---|
POST /api/v1/pages/:page/links | {"label", "url", "kind": "primary" or "social", "adult"}. The paid link cap applies |
PATCH /api/v1/links/:id | Any of label, url, kind, adult, and live to hide or show it |
DELETE /api/v1/links/:id | Takes it off the page |
POST /api/v1/links/bulk | One link on every page at once. {"match": {"platform": "fansly"} or {"url": "..."}, plus an optional "tag"}, "url": "https://..."}. Without "confirm": true it only lists what would change; with it, up to 50 links per call |
#Poplinks
| Call | What it does |
|---|---|
GET /api/v1/poplinks | Every poplink |
POST /api/v1/poplinks | {"host", "slug", "label", "url"}, plus title, deeplink, shield, splash, adult, human_check, geo_block. The host must be one of your live domains |
PATCH /api/v1/poplinks/:id | The same fields except the address, and live. A change to shield needs "confirm": true |
#Analytics, domains, slugs
| Call | What it returns |
|---|---|
GET /api/v1/analytics?page=&link=&days= | Per page: days[] of views, paid taps, social taps and people, and links[] with taps per link. days is 1, 7, 28 or 90 |
GET /api/v1/domains | Each domain, its status and the page it shows |
GET /api/v1/slug-check?slug= | {"ok": true} when the address is free |
#The audit log
Every change made with a key is written to the account's audit log with the key's id, next to the changes people make in the dashboard. Owners and Admins read it on Team.