Auth
curl -X GET "https://example.com/api/v1/setup/status"{ "needs_setup": true, "registration_open": true, "user_count": 0, "min_password_length": 0}/api/v1/setupRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/api/v1/setup" \ -H "Content-Type: application/json" \ -d '{ "email": "user@example.com", "password": "stringstri" }'{ "access_token": "string", "refresh_token": "string", "is_admin": true}/api/v1/auth/loginRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/api/v1/auth/login" \ -H "Content-Type: application/json" \ -d '{ "email": "user@example.com", "password": "stringstri" }'{ "access_token": "string", "refresh_token": "string", "is_admin": true}/api/v1/auth/refreshRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/api/v1/auth/refresh" \ -H "Content-Type: application/json" \ -d '{ "refresh_token": "string" }'{ "access_token": "string", "refresh_token": "string", "is_admin": true}/api/v1/auth/registerRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/api/v1/auth/register" \ -H "Content-Type: application/json" \ -d '{ "email": "user@example.com", "password": "stringstri" }'{ "access_token": "string", "refresh_token": "string", "is_admin": true}/api/v1/meAuthorization
bearerAuth Session JWT access token or personal access token (tm_pat_…).
In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/api/v1/me"{ "id": "string", "email": "user@example.com", "is_admin": true, "created_at": "2019-08-24T14:15:22Z", "totp_enabled": true}/api/v1/me/passwordRe-hashes after verifying the current password. Every refresh token minted against the old password stops working, so other devices are signed out at their next refresh; a fresh pair is returned so the caller is not. Access tokens already issued remain valid until they expire (15 minutes).
Authorization
bearerAuth Session JWT access token or personal access token (tm_pat_…).
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X PUT "https://example.com/api/v1/me/password" \ -H "Content-Type: application/json" \ -d '{ "current_password": "string", "new_password": "string" }'{ "access_token": "string", "refresh_token": "string", "is_admin": true}/api/v1/me/totp/startMints a candidate secret and its otpauth:// URL. Nothing is stored until /me/totp/confirm proves a code can be read from it, so the client holds the candidate between the two calls.
Authorization
bearerAuth Session JWT access token or personal access token (tm_pat_…).
In: header
Response Body
application/json
application/json
curl -X POST "https://example.com/api/v1/me/totp/start"{ "secret": "string", "otpauth_url": "string"}/api/v1/me/totp/confirmAuthorization
bearerAuth Session JWT access token or personal access token (tm_pat_…).
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/api/v1/me/totp/confirm" \ -H "Content-Type: application/json" \ -d '{ "secret": "string", "code": "string" }'/api/v1/me/totp/disableRequires the password as well as a current code, so a borrowed unlocked session cannot strip the factor. POST rather than DELETE because it carries a body.
If the authenticator is lost, the recovery path is shell access to the server: tradermemos disable-totp --email you@example.com. There are deliberately no recovery codes to store or lose.
Authorization
bearerAuth Session JWT access token or personal access token (tm_pat_…).
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/api/v1/me/totp/disable" \ -H "Content-Type: application/json" \ -d '{ "password": "string", "code": "string" }'/api/v1/me/preferencesAn opaque JSON object owned by the clients — timezones, clock format, display currency, trade date basis, screenshots cap. The server never reads inside it. Empty until something is stored.
Authorization
bearerAuth Session JWT access token or personal access token (tm_pat_…).
In: header
Response Body
application/json
curl -X GET "https://example.com/api/v1/me/preferences"{ "prefs": {}, "updated_at": "2019-08-24T14:15:22Z"}/api/v1/me/preferencesMerges per key: keys not sent are left alone, so two devices editing
different preferences do not clobber each other. An explicit null is
stored as null (displayCurrency: null means "follow the account").
Authorization
bearerAuth Session JWT access token or personal access token (tm_pat_…).
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X PATCH "https://example.com/api/v1/me/preferences" \ -H "Content-Type: application/json" \ -d '{}'