---
title: "Get User"
method: GET
path: "/user"
---

# Get User

`GET /user`

## Request

- Base URL: `https://api.traversal.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.traversal.com/user`
- Auth: none declared

Get the user from the database.

If the user does not exist, create it. If the user exists, return the user.

Uses UserToken directly instead of AuthorizedUserDep because first-time
users won't exist in the DB yet — that creation happens here.

Args:
    user_token: JWT token with user identity

Returns:
    UserResponse: The user response object with roles included.

## Query parameters

- `invite_code` string, nullable

## Response `200`

Successful Response

- UserResponse
  - `user` APIApiSchemaUsersUser, required
    - `id` string, required
    - `email` string, required
    - `organization_id` string, nullable, required
    - `roles` string[], nullable
    - `name` string, nullable
    - `slack_user_id` string, nullable
    - `profile_photo_url` string, nullable
    - `default_timezone` string, nullable
    - `time_representation` 'military' | 'standard': How times are rendered for the user.
    - `agent_custom_instructions` AgentCustomInstructions: A user's hard agent instruction plus the audit for its last edit.
      - `instructions` string, nullable
      - `last_edited_at` string, date-time, nullable
      - `last_edited_by` string, nullable
    - `ui_acknowledgements` object: Keys this user has acknowledged, mapped to when they were first recorded.
  - `user_exists` boolean, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/traversal/apis/traversal-api.md) - [All operations](https://skmtc.dev/traversal/apis/traversal-api/llms.txt) - [OpenAPI document](https://skmtc.dev/traversal/apis/traversal-api/revisions/31e1a8b7cf89?raw)
