Skip to main content

Set Network Mailbox

Changes the network and mailbox context associated with a user account.

Endpoint

POST /v2/users/set-network-mailbox

Request Body

FieldTypeRequiredConstraintsDescription
userIdintegerYesMust be an existing userID of the user to update
networkIdintegerNoThe network ID to associate with the user
mailboxIdintegerNoThe mailbox ID to associate with the user
{
"userId": 1042,
"networkId": 2,
"mailboxId": 205
}

Response

Returns the updated UserIDInfo object reflecting the new network and mailbox association.

{
"success": true,
"data": {
"userId": 1042,
"login": "jsmith",
"email": "jsmith@example.com",
"firstName": "John",
"lastName": "Smith",
"networkId": 2,
"mailboxId": 205,
"authLevel": "MailboxAdmin",
"status": "Active",
"created": "2024-03-15T10:22:00Z"
}
}

Code Examples

curl -X POST "https://rest.ecgrid.io/v2/users/set-network-mailbox" \
-H "X-API-Key: $ECGRID_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "userId": 1042, "networkId": 2, "mailboxId": 205 }'

See Also

  • Get User — verify current network and mailbox before making changes
  • Set Role — update the user's permission level alongside the context change
  • Update User — update other profile fields