# Create User

`lawmatics_create-user` · Lawmatics MCP tool · Users

Create a user in Lawmatics, or assign an existing user to the firm if the email already exists. Provide the user's name, email, role, and an initial password. The response includes a `relationships` envelope of {id,type} pointers to related records (current firm, inviting user, and all firms the user belongs to).

## Input

- **firstName** `string` (required) — User's first name
- **lastName** `string` (required) — User's last name
- **email** `string(email)` (required, pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$) — User's email address
- **role** `string` (required) — User role in the firm (e.g. "Admin", "Attorney", "Staff")
- **password** `string` (required) — Initial password for the new user account. Used only for account setup; never returned by the API

## Output

- **id** `string` (required) — Lawmatics user ID of the created (or assigned) user
- **firstName** `string` (required) — User's first name
- **lastName** `string` (required) — User's last name
- **email** `string` (required) — User's email address
- **role** `string` (required) — User's role in the firm, returned verbatim from Lawmatics (casing varies by endpoint)
- **confirmedAt** `string | null` (required) — When the user confirmed their account, as an ISO 8601 timestamp; null until confirmed
- **currentSignInAt** `string | null` (required) — When the user most recently signed in, as an ISO 8601 timestamp; null if never signed in
- **invitationSentAt** `string | null` (required) — When the firm invitation was sent, as an ISO 8601 timestamp; null if none sent
- **invitationAcceptedAt** `string | null` (required) — When the user accepted the firm invitation, as an ISO 8601 timestamp; null until accepted
- **createdAt** `string` (required) — When the user was created, as an ISO 8601 timestamp
- **updatedAt** `string` (required) — When the user was last updated, as an ISO 8601 timestamp
- **relationships** `object` (required) — JSON:API relationship pointers to related records as {id,type} stubs. Not materialized — follow a pointer by calling that resource's own get tool (e.g. type 'user' -> get-user).
  - **currentFirm** `object | null` (required) — Pointer to the firm this user is currently operating in (type 'firm'); null when unset
    - **id** `string` (required) — ID of the referenced Lawmatics record
    - **type** `string` (required) — JSON:API record class of the reference (e.g. "user", "contact", "prospect", "firm"); resolve it by calling that resource's own get/find tool — this pointer is not materialized
  - **invitedBy** `object | null` (required) — Pointer to the user who invited this user (type 'user'); null for the founding user or when unset
    - **id** `string` (required) — ID of the referenced Lawmatics record
    - **type** `string` (required) — JSON:API record class of the reference (e.g. "user", "contact", "prospect", "firm"); resolve it by calling that resource's own get/find tool — this pointer is not materialized
  - **firms** `array` (required) — Pointers to every firm this user belongs to (type 'firm'); empty if none
    - **[]** `object`
      - **id** `string` (required) — ID of the referenced Lawmatics record
      - **type** `string` (required) — JSON:API record class of the reference; resolve it by calling that resource's own tool
