--- title: "Register User (Realtime)" slug: "register-user-realtime" updated: 2026-05-14T21:42:29Z published: 2026-05-14T21:42:29Z canonical: "developer.rocket.chat/register-user-realtime" --- > ## Documentation Index > Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt > Use this file to discover all available pages before exploring further. # Register User (Realtime) ![](https://cdn.us.document360.io/27ca1fd4-36d7-4cde-b4eb-97fc1652954c/Images/Documentation/Deprecated.svg) Register a user to your workspace. ## Payload parameters | Argument | Example | Required | Description | | --- | --- | --- | --- | | `email` | `test@test.com` | Required | The email of the channel. | | `pass` | `["rocket.12"]` | Required | The password. | | `name` | `Test` | Required | The name of the account. | ## Example call ```json {    "msg": "method",    "method": "registerUser",    "id":"482",    "params": [{        "email": "test@tes1t.com",        "pass": "test31457",        "name": "new te1st",        "secretURL": ""        }] } ``` ## Example response ```json {    "msg": "result",    "id": "482",    "result": "3Dw26TXWxvi8gwfgM" } ``` ## Errors If there are any errors during registration, here is a sample response format to expect: ```json {    "msg": "result",    "id": "42",    "error": {        "error": 403,        "reason": "...",        "message": "... [403]",        "errorType": "Meteor.Error"    } } ``` ### Possible errors ```plaintext "reason": "error-user-registration-disabled", "message": "User registration is disabled [403]", "reason": "error-user-registration-secret", "message": "User registration is only allowed via Secret URL [403]", "reason": "error-invalid-customfield-json", "message": "Invalid JSON for Custom Fields [403]", ``` ### Custom fields errors ```plaintext "reason": "error-user-registration-custom-field", "message": "Field ${ fieldName } is required [403]", "reason": "error-user-registration-custom-field", "message": "Value for field ${ fieldName } is invalid [403]", "reason": "error-user-registration-custom-field", "message": "Max length of field ${ fieldName } ${ field.maxLength } [403]", "reason": "error-user-registration-custom-field", "message": "Min length of field ${ fieldName } ${ field.minLength } [403]", ``` ## Accounts custom fields You can use `customFields` as extra fields for user registration. To register with custom fields, add `Accounts_CustomFields` encoded as JSON: ```json {    "msg": "method",    "method": "registerUser",    "id":"482",    "params": [{        "email": "test@tes1t.com",        "pass": "test31457",        "name": "new te1st",        "secretURL": "" , "Accounts_CustomFields": {    "role": {        "type": "select",        "defaultValue": "student",        "options": ["teacher", "student"],        "required": true,        "modifyRecordField": {            "array": true,            "field": "roles"        }    },    "twitter": {        "type": "text",        "required": true,        "minLength": 2,        "maxLength": 10    } }    }] } ```