viakite
Dashboard

API/Public pages/Create a public page or a share token

Create a public page or a share token

POST/v1/projects/{project}/shares

A token's st_… value is in this answer once and never again. A page counts against the plan's public pages: on Free a second page answers page_limit_reached (402); on a paid plan pages beyond the plan's are billed by the day, unless a spend cap set to stop was reached (spend_cap_reached, 402).

Secret keyNeeds analytics.shareapi.vk.viabio.me

Path parameters

projectstringrequired
The project's id (prj_…).

Body

kindstringrequired
page: a public page on its own subdomain; token: an st_… token for components.
pagetoken
titlestringrequiredup to 100 chars
slugstring
A page's subdomain: 3 to 40 lower-case letters, digits or dashes.
allowed_reportsstring[]requiredat least 1 item
A report a share can allow.
overviewrealtimesourcespagesjourneyslocationsdevicesgoalsfunnels
allowed_dimensionsstring[]up to 40 items
passwordstring
A page's password, 8 to 200 characters; none when empty.
expires_atstring · date-time | null
is_indexedboolean
viewer_limitinteger | null
at_limitstring
What a page does for a new viewer past its viewer limit.
keep_showingpause

Responses

The new share; token is set for a share token.

idstringrequired
A prefixed ULID; the prefix names the kind (prj_… a project, org_… an organization).
project_idstringrequired
A prefixed ULID; the prefix names the kind (prj_… a project, org_… an organization).
kindstringrequired
page: a public page on its own subdomain; token: an st_… token for components.
pagetoken
titlestringrequired
slugstring
A page's subdomain.
urlstring
A page's address: its verified custom domain, else its subdomain.
tokenstring
A share token's whole value; only in the answer to create.
token_hintstring
A share token's last four characters.
allowed_reportsstring[]required
A report a share can allow.
overviewrealtimesourcespagesjourneyslocationsdevicesgoalsfunnels
allowed_dimensionsstring[]required
has_passwordbooleanrequired
expires_atstring · date-time | nullrequired
is_indexedbooleanrequired
viewer_limitinteger | nullrequired
at_limitstringrequired
What a page does for a new viewer past its viewer limit.
keep_showingpause
custom_domainobject | nullrequired
Show 6 fields
domainstringrequired
cname_targetstringrequired
The host the domain's CNAME record must point to.
statusstringrequired
pending: its CNAME not seen yet. active: it points to Viakite and the page is served there. failed: it stopped pointing to Viakite (three checks in a row), or never did within 72 hours of being added; checks go on, and it is active again once its CNAME is right.
pendingactivefailed
verified_atstring · date-time | nullrequired
When the domain was first seen pointing to Viakite.
checked_atstring · date-time | nullrequired
The last DNS check; null before the first.
foundstringrequired
What the domain pointed to at the last check that didn't find Viakite; empty when it had no record or the check passed.
disabled_atstring · date-time | nullrequired
When Viakite staff turned the page or token off; it is not served while set (share_disabled, 410).
created_atstring · date-timerequired
A time in UTC, ISO 8601.
updated_atstring · date-timerequired
A time in UTC, ISO 8601.
Example response
1{
2 "id": "shr_01JD8Q2M4W9XK3T7B5",
3 "project_id": "prj_01JD8Q2M4W9XK3T7B5",
4 "kind": "page",
5 "title": "string",
6 "slug": "string",
7 "url": "https://example.com/hooks/viakite",
8 "token": "string",
9 "token_hint": "string",
10 "allowed_reports": [
11 "overview"
12 ],
13 "allowed_dimensions": [
14 "string"
15 ],
16 "has_password": true,
17 "expires_at": "2026-11-21T09:30:00Z",
18 "is_indexed": true,
19 "viewer_limit": 1,
20 "at_limit": "keep_showing",
21 "custom_domain": {
22 "domain": "stats.example.com",
23 "cname_target": "cname.p.vk.viabio.me",
24 "status": "pending",
25 "verified_at": "2026-11-21T09:30:00Z",
26 "checked_at": "2026-11-21T09:30:00Z",
27 "found": "string"
28 },
29 "disabled_at": "2026-11-21T09:30:00Z",
30 "created_at": "2026-11-21T09:30:00Z",
31 "updated_at": "2026-11-21T09:30:00Z"
32}

Errors

Every error has the same shape: error.code, a message for people and details.

StatusCode
422validation_error
409slug_taken
402page_limit_reached
402spend_cap_reached
403forbidden
404not_found