curl -X POST https://okl.ink/api/v1/tokens \
-H "Content-Type: application/json" \
-d '{
"name": "GitHub Actions CI",
"ttlDays": 90,
"scopes": ["pages:read", "pages:write", "links:write"]
}'
{
"token": "4f9d8a1c7e2b6d5f0a3c9e8d7b6a5c4e3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c",
"id": "cmsh98127391823",
"scopes": ["pages:read", "pages:write", "links:write"],
"plan": "free",
"expiresAt": "2027-08-31T00:00:00.000Z"
}
API Tokens
Create API Token
Issue a new scoped API token for the currently authenticated user session.
POST
/
api
/
v1
/
tokens
curl -X POST https://okl.ink/api/v1/tokens \
-H "Content-Type: application/json" \
-d '{
"name": "GitHub Actions CI",
"ttlDays": 90,
"scopes": ["pages:read", "pages:write", "links:write"]
}'
{
"token": "4f9d8a1c7e2b6d5f0a3c9e8d7b6a5c4e3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c",
"id": "cmsh98127391823",
"scopes": ["pages:read", "pages:write", "links:write"],
"plan": "free",
"expiresAt": "2027-08-31T00:00:00.000Z"
}
Create API Token
Generates a new API token. The plaintext token is returned exactly once in the response and stored server-side as a SHA-256 hash.Creating an API token requires an active authenticated session cookie (via web login).
Request Body
string
An optional human-readable name or label for the token (max 64 characters).
number
default:"365"
Token lifetime in days. Defaults to 365 days.
array
Array of allowed scopes:
pages:read, pages:write, links:write, tokens:manage.Response
string
The plaintext token string to be used with
Authorization: Bearer <token>.string
Unique token ID in the database.
array
Assigned permission scopes.
string
Assigned tier plan (
free, pro, enterprise).string
ISO 8601 expiration timestamp.
curl -X POST https://okl.ink/api/v1/tokens \
-H "Content-Type: application/json" \
-d '{
"name": "GitHub Actions CI",
"ttlDays": 90,
"scopes": ["pages:read", "pages:write", "links:write"]
}'
{
"token": "4f9d8a1c7e2b6d5f0a3c9e8d7b6a5c4e3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c",
"id": "cmsh98127391823",
"scopes": ["pages:read", "pages:write", "links:write"],
"plan": "free",
"expiresAt": "2027-08-31T00:00:00.000Z"
}