> ## Documentation Index
> Fetch the complete documentation index at: https://docs.waterr.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Users

> Get user workspace and membership information

## Overview

The Users API returns the workspace details associated with your API key — useful when you need to display the active org/role in your UI, or when you're building a multi-tenant integration where users connect different WaterrAI workspaces.

<Note>
  You **don't** need to fetch this before calling other endpoints. Your `membership_id` and `org_id` are inferred from your API key on every request — meetings, scenarios, personas, etc. are created in the right workspace automatically.
</Note>

## Get Active Workspace

Retrieve the workspace and membership context attached to your API key.

```bash theme={null}
curl -X GET https://api.waterr.ai/v1/users/active-workspace \
  -H "Authorization: Bearer wai_<your_key>"
```

```json theme={null}
{
  "success": true,
  "data": {
    "id": 42,
    "type": "creator",
    "org_id": 15,
    "user_basic_info_id": 123,
    "role": "admin",
    "active": true,
    "created_at": "2024-01-10T08:00:00Z",
    "Organization": {
      "id": 15,
      "name": "My Company",
      "created_at": "2024-01-10T08:00:00Z"
    }
  }
}
```

### Response Fields

| Field          | Type          | Description                                 |
| -------------- | ------------- | ------------------------------------------- |
| `id`           | string (UUID) | The membership ID for this workspace        |
| `type`         | string        | Membership type: `creator` or `end_user`    |
| `org_id`       | string (UUID) | Organization ID the workspace belongs to    |
| `role`         | string        | Your role in the organization               |
| `active`       | boolean       | Whether this membership is currently active |
| `Organization` | object        | Organization details including name         |

## Get User by ID

Retrieve a user's public profile by their user ID. No authentication required.

<ParamField path="userId" type="string" required>
  The user UUID
</ParamField>

```bash theme={null}
curl -X GET https://api.waterr.ai/v1/users/{userId}
```

## Get User by Username

Look up a user by their username. No authentication required. Useful for building public profile pages or resolving usernames to IDs.

<ParamField path="username" type="string" required>
  The username
</ParamField>

```bash theme={null}
curl -X GET https://api.waterr.ai/v1/users/username/{username}
```


## OpenAPI

````yaml GET /users/{userId}
openapi: 3.0.0
info:
  title: WaterrAI API
  version: 1.0.0
  description: >-
    REST API for the WaterrAI meeting platform — create scenarios, spin up
    AI-driven meetings, fetch transcripts and analyses.
  contact:
    name: Support
    email: harshit@waterr.ai
servers:
  - url: https://api.waterr.ai/v1
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: Users
  - name: Personas
  - name: Voices
  - name: Scenarios
  - name: Goals
  - name: Meetings
  - name: Analyses
  - name: Recordings
  - name: Transcripts
  - name: Tools
    description: >-
      Account-scoped custom function (tool) definitions the LLM can call
      mid-meeting.
  - name: Scenario Tools
    description: >-
      Per-scenario attachments linking a scenario to one or more tool
      definitions.
paths:
  /users/{userId}:
    get:
      tags:
        - Users
      summary: Get a user by ID
      parameters:
        - name: userId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: User details
        '404':
          description: User not found
        '500':
          description: Server error
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: wai_...
      description: >-
        API key from waterr.ai/settings?tab=api-keys. Send as `Authorization:
        Bearer wai_<your_key>`.

````