Every protected endpoint in the KERN API requires a valid JWT token. You get a token by registering a new account or logging in to an existing one, then include it in each request using theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/jaimegayo/KERNDOCUMENTATION/llms.txt
Use this file to discover all available pages before exploring further.
Authorization header.
Getting a token
Both the registration and login endpoints return a token in the same response shape. Use whichever applies to your situation.accessToken — you’ll need it for every subsequent request.
Using the token
Include the token in theAuthorization header as a Bearer token:
Token expiry
Tokens expire 30 minutes after they are issued. After expiry, protected endpoints will reject your requests with a 401 error. Re-authenticate by callingPOST /login again to get a fresh token.
There is no refresh token endpoint. When your token expires, log in again using your email and password.
Username updates and new tokens
When you update your username viaPUT /users/update_name, the endpoint returns a new LoginResponse with a fresh token. Switch to using that new token immediately for subsequent requests, since the old token encodes the previous username.
Error responses
401 Unauthorized — invalid or expired token
401 Unauthorized — invalid or expired token
400 Bad Request — account disabled
400 Bad Request — account disabled
401 Unauthorized — wrong credentials
401 Unauthorized — wrong credentials