curl -X PUT https://okl.ink/api/v1/pages/cly1019283749/theme \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"preset": "midnight",
"accent": "#a855f7",
"typography": "geist",
"radius": "soft",
"density": "airy"
}'
{
"success": true
}
Pages
Get & Set Theme
Retrieve or update the visual theme configuration for a page.
PUT
/
api
/
v1
/
pages
/
{id}
/
theme
curl -X PUT https://okl.ink/api/v1/pages/cly1019283749/theme \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"preset": "midnight",
"accent": "#a855f7",
"typography": "geist",
"radius": "soft",
"density": "airy"
}'
{
"success": true
}
Page Theme
Retrieve (GET) or set (PUT) the complete styling and layout token configuration for an okl.ink page.
1. Get Theme (GET /api/v1/pages/{id}/theme)
Requires pages:read scope.
Response
Returns the storedThemeConfig JSON object or null.
2. Set Theme (PUT /api/v1/pages/{id}/theme)
Requires pages:write scope.
Request Body
string
required
One of:
oklink, midnight, paper, vivid, lofi.string | null
Optional custom hex background (e.g.
#111827).string | null
Optional custom hex accent color (e.g.
#10b981).string
default:"rounded"
One of:
rounded, pill, outline, filled, minimal.string
default:"modern"
One of:
modern, editorial, mono, geist.string
default:"rounded"
One of:
sharp, rounded, soft, pill.string
default:"comfortable"
One of:
compact, comfortable, airy.string
default:"duotone"
One of:
duotone, filled, colored.string
default:"grid"
grid or list.boolean
default:"true"
Whether to render the creator avatar and byline in header.
Response
boolean
Returns
true when the theme update succeeds.curl -X PUT https://okl.ink/api/v1/pages/cly1019283749/theme \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"preset": "midnight",
"accent": "#a855f7",
"typography": "geist",
"radius": "soft",
"density": "airy"
}'
{
"success": true
}