Skip to main content
User-facing authentication uses email and password, JWT access and refresh tokens, and optional device (OAuth-style) flows. These endpoints are used by the web app, CLIs, and native clients.
For REST automation with an API key, see API keys. Send Authorization: Bearer plus your API key on resource requests.
Base URL: https://api.planasonix.com

Session and password flows

POST /api/login

Sign in with email and password. Returns short-lived access and long-lived refresh tokens.
email
string
required
Account email address.
password
string
required
Account password.
accessToken
string
JWT sent as Authorization: Bearer followed by this value for API calls until it expires.
refreshToken
string
Opaque token used with POST /api/auth/refresh to obtain a new access token.

POST /api/auth/refresh

Exchange a valid refresh token for a new access token (and optionally a rotated refresh token).
refreshToken
string
required
Refresh token returned from login or a prior refresh.

POST /api/register

Create a new user account (when self-registration is enabled for your workspace).
email
string
required
Email for the new account.
password
string
required
Password meeting your organization’s policy.
name
string
required
Display name.

POST /api/forgot-password

Trigger a password reset email containing a time-limited token.
email
string
required
Email associated with the account.

POST /api/reset-password

Complete a password reset using the token from the email.
token
string
required
Reset token from the email link.
password
string
required
New password.

POST /api/verify-email

Mark the user’s email as verified using the token from the verification email.
token
string
required
Verification token from the email link.

Device authorization (v2)

Headless apps (CLI, desktop, TV) use the device code pattern: the user opens a browser, enters a code, and the client polls until authorized.

POST /api/v2/auth/device

Start the flow. Returns a device code, user code, and verification URI for the user.
interval
integer
Minimum seconds to wait between polling POST /api/v2/auth/device/token.

POST /api/v2/auth/device/token

Poll with the deviceCode until the user completes authorization or the code expires.
deviceCode
string
required
deviceCode from the device start response.
clientId
string
required
Same client identifier used when starting the device flow.

POST /api/v2/auth/device/authorize

Browser or authenticated session confirms the userCode and grants the requested scopes to the device client.
userCode
string
required
Code shown to the user (for example WDJB-JQKL).
Authorization
string
Typically the logged-in user’s session or Bearer access token for the approving browser session.

Using tokens on the REST API

GET /api/pipelines HTTP/1.1
Host: api.planasonix.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
Content-Type: application/json
CredentialTypical use
JWT access tokenInteractive apps after login or device flow
API keyServers, CI, and long-lived integrations
Treat refresh tokens like passwords: store them in the OS keychain or a secret manager, not in source control.