Mint a CLI API token
POST
/v1/tokens
const url = 'https://beta-api.plune.ai/v1/tokens';const options = {method: 'POST', headers: {cookie: 'plune_session=<plune_session>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://beta-api.plune.ai/v1/tokens \ --cookie plune_session=<plune_session>Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Created — plaintext token shown once
Media type application/json
The token plaintext is returned ONCE, here; the server stores only its sha256.
object
id
required
string format: uuid
token
required
string
prefix
required
Display prefix (first chars) — safe to show in a UI.
string
createdAt
required
string format: date-time
expiresAt
When it stops working by itself — shown once, beside the token.
string format: date-time
Example
{ "token": "plune_XxYy…"}No / invalid session
Rate-limited: either the per-route throttle or a tenant quota. Retry-After carries the seconds until the window rolls over.
Media type application/json
object
error
required
string
Example generated
{ "error": "example"}Headers
Section titled “Headers ” Retry-After
integer
Seconds until the window rolls over