---
title: "Accounts REST"
url: https://docs.truemarkets.co/api/account/true-markets-account-api
description: "Create the users your organization trades for, with their wallets, and read deposit details."
---

Docs index: https://docs.truemarkets.co/llms.txt

# Accounts REST

Account API for the True Markets platform — organization users, agreements and how a user is set up to trade.

## Base URLs

| Environment   | Base URL                                    |
| ------------- | ------------------------------------------- |
| Production    | `https://api.truemarkets.co/v1/account`     |
| UAT (sandbox) | `https://api.uat.truemarkets.co/v1/account` |

> UAT is the testing environment. It may require VPN/allowlist access for some integrations — contact [support@truemarkets.co](mailto:support@truemarkets.co) if requests time out from a public network.

## Authentication

All endpoints require a JWT access token in the `Authorization: Bearer <token>` header.

### Getting credentials

There are two ways in, and each uses its own keys.

**Gateway (an organization trading for its users).** Create an organization and an API key in the dashboard, then mint a token with `POST /v1/auth/api-key/token`. An organization token lasts one hour and has no refresh token, so mint a new one before it expires. Act for a user with `TM-On-Behalf-Of: <user_id>`, and sign that user's payloads with their signer key, not the organization API key.

**Trading API (your own account).**

1. **Create an account** at [https://www.truemarkets.co](https://www.truemarkets.co) (passkey, email, magic link, or Sign in with Apple).
2. **Register an API key** in your account's *API Keys* settings page. Generate an EC P-256 key pair locally and submit only the public key — the private key never leaves your machine. You'll receive a `key_id` (UUID). The same key signs you in and signs your payloads.
3. **Mint JWTs** by calling `POST /v1/auth/api-key/token` with `key_id`, a current `timestamp` (Unix seconds, within ±30s of server UTC time), and `signature` — an ES256 (ECDSA P-256 + SHA-256) signature of the message `{key_id}.{timestamp}`, base64url-encoded. The response returns `access_token` and `refresh_token`.
4. **Call the Account API** with `Authorization: Bearer <access_token>`.
5. **Refresh** expired access tokens via `POST /v1/auth/token/refresh` with the `refresh_token` — no re-signing required.

### Quick start

```bash
# Mint a JWT
curl -X POST https://api.truemarkets.co/v1/auth/api-key/token \
  -H "Content-Type: application/json" \
  -d '{"key_id":"<UUID>","timestamp":<UNIX_SECONDS>,"signature":"<BASE64URL_ES256_SIG>"}'

# List your crypto deposit addresses
curl https://api.truemarkets.co/v1/account/deposits/addresses \
  -H "Authorization: Bearer <ACCESS_TOKEN>"
```

## Support

- 📧 [support@truemarkets.co](mailto:support@truemarkets.co)

## Organizations

- [List the users your organization trades for](https://docs.truemarkets.co/api/account/list-organization-users): `GET /organizations/{organization_id}/users`
- [Create a user your organization trades for](https://docs.truemarkets.co/api/account/create-organization-user): `POST /organizations/{organization_id}/users`
- [Get a user your organization trades for](https://docs.truemarkets.co/api/account/get-organization-user): `GET /organizations/{organization_id}/users/{user_id}`

## Trading Setup

- [Get the user's trading setup](https://docs.truemarkets.co/api/account/get-trading-setup): `GET /me/trading`

## Operations

- [Get the user's trading setup](https://docs.truemarkets.co/api/account/get-trading-setup): `GET /me/trading`
- [List the users your organization trades for](https://docs.truemarkets.co/api/account/list-organization-users): `GET /organizations/{organization_id}/users`
- [Create a user your organization trades for](https://docs.truemarkets.co/api/account/create-organization-user): `POST /organizations/{organization_id}/users`
- [Get a user your organization trades for](https://docs.truemarkets.co/api/account/get-organization-user): `GET /organizations/{organization_id}/users/{user_id}`