Onplana Auth API
Authentication - login, register, current user
Authentication - login, register, current user
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/onplana-com:onplana-com-auth-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Onplana Auth API
version: 1.0.0
description: AI-native Project Management System REST API. All org-scoped routes require the `X-Organization-Id` header. Most routes require a Bearer JWT obtained from `/auth/login`.
servers:
- url: /api
security:
- bearerAuth: []
- patAuth: []
tags:
- name: Auth
description: Authentication - login, register, current user
paths:
/auth/register:
post:
tags:
- Auth
summary: Register a new user account
description: Creates a user record and a default personal organization. Returns a JWT that can be used immediately.
security: []
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
email:
type: string
format: email
pattern: ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
password:
type: string
minLength: 8
allOf:
- type: string
pattern: '[A-Z]'
- type: string
pattern: '[0-9]'
- type: string
pattern: '[^A-Za-z0-9]'
description: At least 8 characters, with an uppercase letter, a number and a special character. A workspace password policy may ask for more
name:
type: string
minLength: 2
maxLength: 100
captchaToken:
type: string
description: The captcha response token; required when the server enforces the sign-up captcha
locale:
type: string
maxLength: 35
description: The language the app was showing, e.g. pt-BR. Seeds the account language
timezone:
type: string
maxLength: 64
description: The browser-detected IANA zone. Dropped when unknown, never refused
skipPersonalOrg:
default: false
type: boolean
description: true when signing up through an invitation, so no personal workspace is created
invitationToken:
type: string
description: The organization invitation token from the invite link; needed to join that workspace at sign-up
pendingAnalysisToken:
type: string
pendingMigrationToken:
type: string
pendingAiGanttToken:
type: string
pendingResourceLevelingToken:
type: string
pendingScheduleRiskToken:
type: string
ageConfirmed:
type: boolean
description: 'Must be true: the person confirms they are 16 or older'
signupSource:
type: string
maxLength: 128
signupMedium:
type: string
maxLength: 128
signupCampaign:
type: string
maxLength: 255
signupContent:
type: string
maxLength: 255
signupTerm:
type: string
maxLength: 255
signupReferrer:
type: string
maxLength: 512
signupLanding:
type: string
maxLength: 255
signupClickId:
type: string
maxLength: 512
signupClickIdType:
type: string
maxLength: 16
product:
type: string
enum:
- MAKER
- SERVICES
referralCode:
type: string
maxLength: 32
signupRedirect:
type: string
maxLength: 2048
declinePlanEmails:
type: boolean
required:
- email
- password
- name
- ageConfirmed
responses:
'201':
description: Registration successful - returns token, user, and initial organization list
'400':
description: Validation error
'409':
description: 'The address already has an account (`code: "ACCOUNT_EXISTS"`): sign in instead. Only while the server switch `signin_provider_hint_enabled` is on; off, an existing address is a 400 `Unable to complete registration`. `signInWith` and `hintHandle` are present when that account signs in only with one Google or Microsoft identity.'
content:
application/json:
schema:
type: object
required:
- error
properties:
error:
type: string
description: A user-safe sentence
code:
type: string
examples:
- ACCOUNT_EXISTS
signInWith:
type: string
enum:
- google
- microsoft
description: The account's only sign-in door, when it has no password of its own
hintHandle:
type: string
description: Single-use, 5 minutes. Pass as `hint` to `GET /auth/oauth/{provider}/start`; it never contains the address
operationId: postAuthRegister
x-operation-id-source: derived
/auth/login:
post:
tags:
- Auth
summary: Authenticate and obtain a JWT
description: 'Returns a JWT on success. If the account has 2FA enabled the response contains `{ requires2FA: true, userId }` instead; complete login via `POST /auth/login/2fa`.'
security: []
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
email:
type: string
format: email
pattern: ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
password:
type: string
captchaToken:
type: string
description: The captcha response token, needed after a 401 CAPTCHA_REQUIRED (too many failed sign-ins from this address)
required:
- email
- password
responses:
'200':
description: 'Login successful. Body is either `{ token, user, organizations }` or `{ requires2FA: true, userId }` when 2FA is active.'
'400':
description: Validation error
'401':
description: 'Wrong email or password (`code: "INVALID_CREDENTIALS"`), or a captcha is needed (`code: "CAPTCHA_REQUIRED"`). §signin-provider-hint: while the server switch `signin_provider_hint_enabled` is on, a wrong password on an account that signs in only with one Google or Microsoft identity also carries `signInWith` and `hintHandle`; pass the handle as `hint` to `GET /auth/oauth/{provider}/start`.'
content:
application/json:
schema:
type: object
required:
- error
properties:
error:
type: string
description: A user-safe sentence
code:
type: string
examples:
- INVALID_CREDENTIALS
signInWith:
type: string
enum:
- google
- microsoft
description: The account's only sign-in door, when it has no password of its own
hintHandle:
type: string
description: Single-use, 5 minutes. Pass as `hint` to `GET /auth/oauth/{provider}/start`; it never contains the address
operationId: postAuthLogin
x-operation-id-source: derived
/auth/login/2fa:
post:
tags:
- Auth
summary: Complete login with a TOTP code or a backup code
description: Second step of the 2FA login flow. Supply the `userId` from the first step and either the 6-digit code from the authenticator app or one of the backup codes (`XXXXX-XXXXX`). Each backup code works once; case, the hyphen and spaces are ignored.
security: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- userId
- code
properties:
userId:
type: string
code:
type: string
description: A 6-digit authenticator code, or a backup code such as `K8FA2-9XQ4Z`.
examples:
- '123456'
- K8FA2-9XQ4Z
responses:
'200':
description: 2FA verified - returns token, user, organizations
'400':
description: 'Missing `userId` or `code`, or `code` is neither a 6-digit code nor a backup code (`code: "INVALID_2FA_CODE_FORMAT"`).'
'401':
description: The code is wrong, or the backup code was already used
'429':
description: Too many failed 2FA attempts; try again in 15 minutes
operationId: postAuthLogin2fa
x-operation-id-source: derived
/auth/oauth/{provider}/start:
get:
tags:
- Auth
summary: Start Google, Microsoft or Apple sign-in
description: 'A browser navigation, not an API call: redirects to the provider''s sign-in page, which returns to the callback and then to the app with a one-time code. Shown here for its query parameters.'
security: []
parameters:
- name: provider
in: path
required: true
schema:
type: string
enum:
- google
- microsoft
- apple
- name: mode
in: query
schema:
type: string
enum:
- login
- signup
description: Recorded in the audit log only; either mode can create an account.
- name: redirect
in: query
schema:
type: string
description: The in-app path to land on after sign-in.
- name: hint
in: query
schema:
type: string
description: '§signin-provider-hint: the single-use `hintHandle` from a failed `POST /auth/login` (401) or `POST /auth/register` (409). It names the address, which goes to Google or Microsoft as login_hint with the account chooser skipped. Valid for 5 minutes, once, and only for the provider it was given for; anything else starts sign-in normally. Ignored for Apple and while the server switch `signin_provider_hint_enabled` is off.'
responses:
'302':
description: Redirect to the provider, or back to /login with `?error=` when the provider is not configured
'400':
description: Unknown provider
operationId: getAuthOauthByProviderStart
x-operation-id-source: derived
/auth/me:
get:
tags:
- Auth
summary: Return the currently authenticated user
description: Reads the JWT from the Authorization header and returns the decoded user plus their organization memberships.
responses:
'200':
description: Current user and org list
content:
application/json:
schema:
$ref: '#/components/schemas/User'
'400':
description: Validation error
'401':
description: Unauthorized - missing or invalid JWT
operationId: getAuthMe
x-operation-id-source: derived
/auth/sharepoint-sso:
post:
tags:
- Auth
summary: Exchange a SharePoint (SPFx) access token for an Onplana session
description: 'Public. The token is an Entra access token for the Onplana app, scope access_as_user, obtained by an Onplana web part. Never creates an account: no account answers 409 SHAREPOINT_NO_ACCOUNT { email, canCreate, guest }. 503 SHAREPOINT_SSO_OFF while the operator switch is off. A guest is linked only on an email Microsoft proved.'
security: []
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
token:
type: string
minLength: 20
maxLength: 8192
required:
- token
responses:
'200':
description: '{ token, user, organizations }'
operationId: postAuthSharepointSso
x-operation-id-source: derived
components:
schemas:
User:
type: object
properties:
id:
type: string
format: uuid
email:
type: string
format: email
name:
type: string
role:
type: string
enum:
- ADMIN
- MANAGER
- MEMBER
description: System-level role
required:
- id
- email
- name
- role
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
patAuth:
type: apiKey
in: header
name: Authorization
description: 'Personal Access Token: `Authorization: Bearer pat_<token>`. Org context is embedded in the token - no `X-Organization-Id` header required.'
oauthApp:
type: oauth2
description: Third-party OAuth app (confidential client). Register the app under Settings > Developer > OAuth apps; the person approving picks the workspace the token acts in. Tokens last 90 days and extend while in use; there is no refresh token, so a dormant connection re-consents.
flows:
authorizationCode:
authorizationUrl: /oauth/authorize
tokenUrl: /oauth/token
scopes:
tasks: Read and write the tasks assigned to the person, read their projects, log their time.
schedule: Read projects and create or update them (publish a schedule).
mcp: The MCP tool surface, as a member-capped agent persona.
webhooks: Create, list, change and delete the app's own webhook subscriptions.