For AI agents: the documentation index is at /llms.txt, and this page is available as Markdown at /api/account/create-organization-user.md.

Create a user your organization trades for

Organization tokenNo token

POST
/organizations/{organization_id}/users

Creates the user your organization trades for under the reference you name them by, with their wallets, or returns the existing one. The wallets are seated with exactly one of your own signer key or a passkey; the passkey signs at Turnkey only and never signs the user in. Re-sending the same request is safe: a 503 means the wallet step did not finish, and repeating the request completes it. Once your organization reaches its user limit a new reference is refused, while re-sending an existing one still works. Use the returned user_id as the TM-On-Behalf-Of value on trading routes.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

An access token from POST /v1/auth/api-key/token. An organization token lasts one hour and has no refresh token; a personal token can be refreshed.

Path Parameters

organization_id*string

Your organization's id: the tm.organization_id claim of an organization token, also shown on the dashboard Overview. The token must be this organization's, or belong to one of its admins.

Formatuuid

Request Body

application/json
  1. body

Creates or finds a user the organization trades for. Exactly one of signer_public_key or passkey is required.

external_ref_id*ExternalRefId

The reference the client names a served user by, unique within the organization. Compared exactly as sent, with no case or format normalisation, so send the same string every time (a UUID in one consistent case).

Match^[A-Za-z0-9_-]{1,64}$
signer_public_key?string

Turnkey signer key, a 33-byte compressed P-256 point as 66 hex characters

passkey?

A WebAuthn passkey registration, as returned by navigator.credentials.create.

Response Body

The user already held wallets; the signer sent was not used

application/json
  1. response

A user the organization trades for

user_id*string
Formatuuid
external_ref_id*ExternalRefId

The reference the client names a served user by, unique within the organization. Compared exactly as sent, with no case or format normalisation, so send the same string every time (a UUID in one consistent case).

Match^[A-Za-z0-9_-]{1,64}$
created_at*string
Formatdate-time
wallets*array<>

Empty only while the wallet step has not completed; re-send the create to finish it.

Example Request
curl -X POST 'https://api.truemarkets.co/v1/account/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/users' \  -H 'Content-Type: application/json' \  -d '{  "external_ref_id": "string"}'
Example Response
{  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",  "external_ref_id": "string",  "created_at": "2019-08-24T14:15:22Z",  "wallets": [    {      "address": "string",      "chain_family": "evm"    }  ]}