Account

Create a sub-account

Create a customer under your account, with its own KYC and optional login.

POSThttps://api.tryvox.io/v1/tenants/{tenant_id}/sub-accounts

Use your tenant UUID or Auth ID as {tenant_id}, and authenticate with your API credentials from your server. Each sub-account has its own KYC, and spends from your wallet.

Request body

FieldTypeRequiredDescription
namestringYesCustomer's display name
emailstringYesCustomer's email, which must be unique across TryVox
passwordstringNoCreates a login with this password. Use 8–72 characters with an uppercase letter, a lowercase letter, a number and a symbol
send_login_invitebooleanNoEmails the customer a one-time link to set a password, valid for 7 days. When password is also set, it emails that the login is ready instead, without the password
kyc_modestringNocustomer_use (default): it completes its own KYC. personal_use: it uses your KYC, so there's nothing to submit, and it stops working if your KYC is no longer approved
account_typestringNoindividual (default) or business, which decides the KYC documents required
external_referencestringNoYour ID for this customer, up to 200 characters. Defaults to the email
phonestringNoContact number
descriptionstringNoDescription for your records

Without password or send_login_invite, the customer has no login and TryVox doesn't contact them. You can manage everything through the API.

curl -X POST "https://api.tryvox.io/v1/tenants/$TRYVOX_AUTH_ID/sub-accounts" \
  -u "$TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Support",
    "email": "support@example.com",
    "password": "<strong-unique-password>",
    "account_type": "business",
    "external_reference": "customer-1042"
  }'

Response

Returns 201 Created. Save data.id against the customer in your platform. The password is never returned.

{
  "data": {
    "id": "7acda613-82f7-4f32-9684-b8f91d21eac9",
    "resource_tenant_id": "7acda613-82f7-4f32-9684-b8f91d21eac9",
    "parent_tenant_id": "e45af2c7-599e-4058-82b5-b858f5207ac7",
    "auth_id": "SA_example",
    "name": "Acme Support",
    "email": "support@example.com",
    "external_reference": "customer-1042",
    "account_type": "business",
    "status": "active",
    "login_invite": "password_set"
  }
}

login_invite appears only when you asked for a login. It's password_set, sent or failed. On failed, the sub-account still exists and login_invite_error says why. When you send both password and send_login_invite, login_email is sent or failed, with login_email_error.

Set a password or send a new invitation

Use these if the customer didn't get the email or lost their password.

POST /v1/tenants/{tenant_id}/sub-accounts/{subaccount_id}/password
POST /v1/tenants/{tenant_id}/sub-accounts/{subaccount_id}/login-invite

The first takes {"password": "<strong-unique-password>"} and ends the customer's current sessions. The second takes no body. The customer logs in at app.tryvox.io with their email.

Retries

Retrying with the same external_reference and details returns the original sub-account. Creating a deleted sub-account again with the same email brings it back, and its KYC stays only if the details are unchanged. If you include password, a retry sets that password again. Different details with the same reference return 409. When you omit external_reference, the email is the reference.

Errors

StatusCodeHandling
400VALIDATION_FAILEDCheck the required fields and password rules
401INVALID_CREDENTIALSCheck the API key and token
403FORBIDDENUse credentials for this account
403ACCOUNT_MANAGER_REQUIREDUse the account owner or an authorized admin
409ALREADY_EXISTSThe email or reference is already used with different details

See API errors for the error response format.

On this page