Managing Users

Users represent team members on your account. You can invite new users, assign roles, and manage access through the API.

Create a user

curl -X POST https://api.cakemail.dev/users \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "Jane Smith", "email": "jane@example.com", "role": "manager"}'

The response includes a user_id you'll use for all subsequent operations on this user.

List users

curl "https://api.cakemail.dev/users?page=1&per_page=50" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Use page and per_page for pagination. Results are sorted by creation date.

Update a user

curl -X PATCH https://api.cakemail.dev/users/{user_id} \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"role": "admin", "name": "Jane Doe"}'

Suspend a user

curl -X POST https://api.cakemail.dev/users/{user_id}/suspend \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Suspended users cannot log in or access the account until unsuspended.

Unsuspend a user

curl -X POST https://api.cakemail.dev/users/{user_id}/unsuspend \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Delete a user

curl -X DELETE https://api.cakemail.dev/users/{user_id} \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Using MCP

With the Execution MCP connected, your AI assistant can manage users directly:

  • users tool with operation list — list users on the account
  • users tool with operation create — invite a new user
  • users tool with operation suspend — suspend a user

See MCP Servers for connection instructions.