> For the complete documentation index, see [llms.txt](https://docs.adaptria.locaria.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.adaptria.locaria.com/internal-api/reference/users.md).

# 👥 Users

### Users

Authenticated principal info (`/me`) and internal staff directory. `/me` is available to every authenticated caller (static API key or OAuth/JWT). List and get-by-id endpoints are internal-only — client API keys receive `403`.

## Who am I — current authenticated user

> Returns the currently authenticated principal regardless of credential type (static API key or OAuth/JWT). Available to every authenticated caller — internal staff and client users alike. The \`authMethod\` field identifies which credential produced the session so MCP clients and audit consumers can distinguish dashboard sessions from automation traffic.

```json
{"openapi":"3.1.0","info":{"title":"Adaptria Public API: Connector","version":"1.0.0"},"tags":[{"name":"👥 Users","description":"## Users\n\nAuthenticated principal info (`/me`) and internal staff directory. `/me` is available to every authenticated caller (static API key or OAuth/JWT). List and get-by-id endpoints are internal-only — client API keys receive `403`.\n"}],"servers":[{"url":"https://api.adaptria.locaria.com","description":"Production Environment"}],"security":[{"apiKeyAuth":[]}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"Api-key","description":"## API Key Authentication\n\nStatic API key obtained from the Adaptria Portal or via `POST /api/credentials/api-keys`.\n\n**How to authenticate**:\n1. Generate an API key from the Adaptria Portal (Settings → API Keys) or ask your admin\n2. Include the key in all requests using the `Api-key` header\n\n**Key format**: `lla_live_<32-character-string>`\n\n**No token exchange needed** — the key is used directly in every request. Revoke or rotate keys from the portal."}},"schemas":{"GetCurrentUserResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/CurrentUser"}},"required":["success","data"]},"CurrentUser":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Universally Unique Identifier (UUID v4)"},"email":{"type":"string","format":"email"},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"roleCode":{"type":"string","description":"Role code of the authenticated principal"},"authMethod":{"type":"string","description":"Credential type that produced the session: auth0_jwt, static_api_key, custom_jwt"}},"required":["id","email","roleCode"]}}},"paths":{"/api/public/v1/users/me":{"get":{"summary":"Who am I — current authenticated user","description":"Returns the currently authenticated principal regardless of credential type (static API key or OAuth/JWT). Available to every authenticated caller — internal staff and client users alike. The `authMethod` field identifies which credential produced the session so MCP clients and audit consumers can distinguish dashboard sessions from automation traffic.","tags":["👥 Users"],"responses":{"200":{"description":"Authenticated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCurrentUserResponse"}}}},"401":{"description":"Authentication required"},"404":{"description":"Authenticated user no longer exists"}}}}}}
```

## List users (internal staff directory)

> List Adaptria users. Internal-only — client API keys receive 403 by design. Filter by role, search by name/email.

```json
{"openapi":"3.1.0","info":{"title":"Adaptria Public API: Connector","version":"1.0.0"},"tags":[{"name":"👥 Users","description":"## Users\n\nAuthenticated principal info (`/me`) and internal staff directory. `/me` is available to every authenticated caller (static API key or OAuth/JWT). List and get-by-id endpoints are internal-only — client API keys receive `403`.\n"}],"servers":[{"url":"https://api.adaptria.locaria.com","description":"Production Environment"}],"security":[{"apiKeyAuth":[]}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"Api-key","description":"## API Key Authentication\n\nStatic API key obtained from the Adaptria Portal or via `POST /api/credentials/api-keys`.\n\n**How to authenticate**:\n1. Generate an API key from the Adaptria Portal (Settings → API Keys) or ask your admin\n2. Include the key in all requests using the `Api-key` header\n\n**Key format**: `lla_live_<32-character-string>`\n\n**No token exchange needed** — the key is used directly in every request. Revoke or rotate keys from the portal."}},"schemas":{"ListUsersResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"$ref":"#/components/schemas/PublicUserListItem"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["success","data","pagination"]},"PublicUserListItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Universally Unique Identifier (UUID v4)"},"email":{"type":"string","format":"email"},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"name":{"type":["string","null"]},"role":{"type":["string","null"],"description":"User role code"},"status":{"type":["string","null"]},"isBlocked":{"type":"boolean"},"isArchived":{"type":"boolean"},"isInternal":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","description":"Date and time in ISO 8601 format"},"updatedAt":{"type":"string","format":"date-time","description":"Date and time in ISO 8601 format"}},"required":["id","email"]},"Pagination":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":0,"description":"Current page number (1-indexed)"},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100,"description":"Number of items per page (max 100)"},"total":{"type":"integer","minimum":0,"description":"Total number of items across all pages"},"totalPages":{"type":"integer","minimum":0,"description":"Total number of pages"},"hasNextPage":{"type":"boolean","description":"Whether there are more pages after the current page"},"hasPrevPage":{"type":"boolean","description":"Whether there are pages before the current page"}},"required":["page","limit","total","totalPages","hasNextPage","hasPrevPage"]}}},"paths":{"/api/public/v1/users":{"get":{"summary":"List users (internal staff directory)","description":"List Adaptria users. Internal-only — client API keys receive 403 by design. Filter by role, search by name/email.","tags":["👥 Users"],"parameters":[{"schema":{"type":"string","pattern":"^\\d+$","default":"1"},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","pattern":"^\\d+$","default":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Match against name or email"},"required":false,"description":"Match against name or email","name":"search","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Filter by role code(s) — pass once or multiple times"},"required":false,"description":"Filter by role code(s) — pass once or multiple times","name":"role","in":"query"},{"schema":{"type":"string"},"required":false,"name":"sortBy","in":"query"},{"schema":{"type":"string","enum":["asc","desc"]},"required":false,"name":"sortOrder","in":"query"}],"responses":{"200":{"description":"Users listed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUsersResponse"}}}},"401":{"description":"Authentication required"},"403":{"description":"Forbidden — client API keys cannot access this directory"}}}}}}
```

## Get user details

> Full user record by id. Internal-only.

```json
{"openapi":"3.1.0","info":{"title":"Adaptria Public API: Connector","version":"1.0.0"},"tags":[{"name":"👥 Users","description":"## Users\n\nAuthenticated principal info (`/me`) and internal staff directory. `/me` is available to every authenticated caller (static API key or OAuth/JWT). List and get-by-id endpoints are internal-only — client API keys receive `403`.\n"}],"servers":[{"url":"https://api.adaptria.locaria.com","description":"Production Environment"}],"security":[{"apiKeyAuth":[]}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"Api-key","description":"## API Key Authentication\n\nStatic API key obtained from the Adaptria Portal or via `POST /api/credentials/api-keys`.\n\n**How to authenticate**:\n1. Generate an API key from the Adaptria Portal (Settings → API Keys) or ask your admin\n2. Include the key in all requests using the `Api-key` header\n\n**Key format**: `lla_live_<32-character-string>`\n\n**No token exchange needed** — the key is used directly in every request. Revoke or rotate keys from the portal."}},"schemas":{"GetUserDetailsResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/PublicUserDetails"}},"required":["success","data"]},"PublicUserDetails":{"allOf":[{"$ref":"#/components/schemas/PublicUserListItem"},{"type":"object","properties":{"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Universally Unique Identifier (UUID v4)"},"name":{"type":"string"}},"required":["id","name"]}},"clientId":{"type":["string","null"],"format":"uuid","description":"Universally Unique Identifier (UUID v4)"},"phone":{"type":["string","null"]},"jobTitle":{"type":["string","null"]},"country":{"type":["string","null"]},"timezone":{"type":["string","null"]}}}]},"PublicUserListItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Universally Unique Identifier (UUID v4)"},"email":{"type":"string","format":"email"},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"name":{"type":["string","null"]},"role":{"type":["string","null"],"description":"User role code"},"status":{"type":["string","null"]},"isBlocked":{"type":"boolean"},"isArchived":{"type":"boolean"},"isInternal":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","description":"Date and time in ISO 8601 format"},"updatedAt":{"type":"string","format":"date-time","description":"Date and time in ISO 8601 format"}},"required":["id","email"]}}},"paths":{"/api/public/v1/users/{id}":{"get":{"summary":"Get user details","description":"Full user record by id. Internal-only.","tags":["👥 Users"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"User UUID"},"required":true,"description":"User UUID","name":"id","in":"path"}],"responses":{"200":{"description":"User found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserDetailsResponse"}}}},"401":{"description":"Authentication required"},"403":{"description":"Forbidden — client API keys cannot access this directory"},"404":{"description":"User not found"}}}}}}
```
