Admin
/api/v1/admin/usersOwner-only; anyone else gets 403.
Authorization
bearerAuth Session JWT access token or personal access token (tm_pat_…).
In: header
Response Body
curl -X GET "https://example.com/api/v1/admin/users"/api/v1/admin/usersBypasses the registration gate — an owner inviting someone is not open sign-up.
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 POST "https://example.com/api/v1/admin/users" \ -H "Content-Type: application/json" \ -d '{ "email": "string", "password": "stringstri" }'/api/v1/admin/users/{id}Authorization
bearerAuth Session JWT access token or personal access token (tm_pat_…).
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X PATCH "https://example.com/api/v1/admin/users/string" \ -H "Content-Type: application/json" \ -d '{ "is_admin": true }'/api/v1/admin/users/{id}Cascades every account, trade, note and attachment they own. No undo.
Authorization
bearerAuth Session JWT access token or personal access token (tm_pat_…).
In: header
Path Parameters
Response Body
curl -X DELETE "https://example.com/api/v1/admin/users/string"/api/v1/admin/users/{id}/passwordNo current password — the point is that the user does not have it. Invalidates their refresh tokens.
Authorization
bearerAuth Session JWT access token or personal access token (tm_pat_…).
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X POST "https://example.com/api/v1/admin/users/string/password" \ -H "Content-Type: application/json" \ -d '{ "new_password": "stringstri" }'/api/v1/admin/backupOwner-only. The server snapshots its SQLite database on a schedule
(TM_BACKUP_INTERVAL_MIN, default daily) into TM_BACKUP_DIR
(default: backups/ beside the database file) as
tradermemos-YYYYMMDD-HHMMSSZ.db, keeping the newest TM_BACKUP_KEEP
(default 14). Status is derived from that directory plus the last
error held in memory, so last_attempt_at and last_error reset on
restart. Postgres deployments report status: unsupported with a hint
to use pg_dump.
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/admin/backup"{ "enabled": true, "driver": "sqlite", "status": "ok", "hint": "string", "dir": "string", "keep": 0, "interval_min": 0, "running": true, "last_success_at": "2019-08-24T14:15:22Z", "last_attempt_at": "2019-08-24T14:15:22Z", "last_error": "string", "latest": { "name": "string", "size_bytes": 0, "created_at": "2019-08-24T14:15:22Z" }, "file_count": 0}/api/v1/admin/backupOwner-only. Takes one snapshot immediately (and prunes beyond the keep count), regardless of whether the schedule is enabled. Returns the updated status. Only one snapshot runs at a time.
Authorization
bearerAuth Session JWT access token or personal access token (tm_pat_…).
In: header
Response Body
application/json
curl -X POST "https://example.com/api/v1/admin/backup"{ "enabled": true, "driver": "sqlite", "status": "ok", "hint": "string", "dir": "string", "keep": 0, "interval_min": 0, "running": true, "last_success_at": "2019-08-24T14:15:22Z", "last_attempt_at": "2019-08-24T14:15:22Z", "last_error": "string", "latest": { "name": "string", "size_bytes": 0, "created_at": "2019-08-24T14:15:22Z" }, "file_count": 0}