Account
Create a sub-account
Create a customer under your account, with its own KYC and optional login.
https://api.tryvox.io/v1/tenants/{tenant_id}/sub-accountsUse 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
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Customer's display name |
email | string | Yes | Customer's email, which must be unique across TryVox |
password | string | No | Creates a login with this password. Use 8–72 characters with an uppercase letter, a lowercase letter, a number and a symbol |
send_login_invite | boolean | No | Emails 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_mode | string | No | customer_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_type | string | No | individual (default) or business, which decides the KYC documents required |
external_reference | string | No | Your ID for this customer, up to 200 characters. Defaults to the email |
phone | string | No | Contact number |
description | string | No | Description 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-inviteThe 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
| Status | Code | Handling |
|---|---|---|
400 | VALIDATION_FAILED | Check the required fields and password rules |
401 | INVALID_CREDENTIALS | Check the API key and token |
403 | FORBIDDEN | Use credentials for this account |
403 | ACCOUNT_MANAGER_REQUIRED | Use the account owner or an authorized admin |
409 | ALREADY_EXISTS | The email or reference is already used with different details |
See API errors for the error response format.