Register Vendor User
POST /v1/api/vendors/registeruser
POST https://api.torbox.app/v1/api/vendors/registeruser
- Operation ID:
register_vendor_user - Group: Vendors
- Auth: API key,
Authorization: Bearer <api key>(Sign in with TorBox gives the same key)
Overview
Registers a user under your vendor account. Your vendor account must be allowed to register users (can_register_new) and must be below its user limit (current_users lower than users_allowed). The email is trimmed and lowercased before it is used, and it must be a valid, deliverable address that is not from a disposable email provider.
What happens depends on whether the email already has a TorBox account:
- New account
the email has no TorBox account. A new TorBox account is created with its email already confirmed and a generated password. It is owned by your vendor account, on your vendor account's plan, with your vendor account's "paid_until" as its "premium_expires_at". The generated password is returned in the "password" key. - Existing account
the email already has a TorBox account that is not owned by a vendor. The account is attached to your vendor account, and its plan and "premium_expires_at" are replaced with your vendor account's plan and "paid_until". Its password is not changed, so the "password" key is the text "ALREADY_SET". The user receives a notification that they were added to your vendor account, with a link to your vendor URL.
An existing account is attached only when the email you send is the account's own email, or is that email without its dots and without anything from a + on in the part before the @. Any other spelling of an existing account's email attaches nothing and is rejected with the error USER_EXISTS: the account of jane.doe@example.com is not attached by jane.doe+shop@example.com.
An account that is already owned by a vendor cannot be registered, and that includes an account your own vendor account already owns. When two vendors register the same account at the same moment, one of them gets it and the other is rejected.
Each successful registration raises your vendor account's current_users by one. The auth_id in the response is what the Get Vendor User and Remove Vendor User endpoints take as user_auth_id.
Rate Limits
This endpoint is rate limited to 1 request per second per API token.
Authorization
Requires an API key using the Authorization Bearer Header. Works with an API key from any plan, including the free plan.
Request body (application/x-www-form-urlencoded)
| Field | Type | Required | Description |
|---|---|---|---|
user_email | string | yes | Email address of the user to register. Required. |
Responses
200Successful Response400Bad Request401Unauthorized403Forbidden404Not Found409Conflict422Validation Error429Too Many Requests500Internal Server Error503Service Unavailable