Skip to main content

Create User

Creates a new user account within the specified network and mailbox context.

Endpoint

POST /v2/users

Request Body

FieldTypeRequiredConstraintsDescription
loginstringYesUnique within the networkUsername for authentication
passwordstringYesSee password pattern belowInitial password for the user
emailstringYesValid email formatUser's email address
firstNamestringNoUser's first name
lastNamestringNoUser's last name
networkIdintegerNoDefaults to caller's networkNetwork to create the user under
mailboxIdintegerNoDefaults to caller's mailboxMailbox to associate with the user
authLevelAuthLevelNoDefaults to MailboxUserPermission level to assign

Password pattern: ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z0-9]).+$

Must contain at least one lowercase letter, one uppercase letter, one digit, and one special character.

{
"login": "jsmith",
"password": "Passw0rd!",
"email": "jsmith@example.com",
"firstName": "John",
"lastName": "Smith",
"networkId": 1,
"mailboxId": 101,
"authLevel": "MailboxAdmin"
}

Response

Returns the newly created UserIDInfo object.

{
"success": true,
"data": {
"userId": 1042,
"login": "jsmith",
"email": "jsmith@example.com",
"firstName": "John",
"lastName": "Smith",
"networkId": 1,
"mailboxId": 101,
"authLevel": "MailboxAdmin",
"status": "Active",
"created": "2026-05-07T14:30:00Z"
}
}

ENUMs

This endpoint uses the following ENUM in its request body. See Appendix: ENUMs for full value lists.

  • AuthLevel — permission level to assign to the new user

Code Examples

curl -X POST "https://rest.ecgrid.io/v2/users" \
-H "X-API-Key: $ECGRID_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "login": "jsmith", "password": "Passw0rd!", "email": "jsmith@example.com", "firstName": "John", "lastName": "Smith", "networkId": 1, "mailboxId": 101, "authLevel": "MailboxAdmin" }'

See Also