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

# Get User Workspaces

> Retrieves all workspaces a user is a member of.

<ParamField path="id" type="string" required>
  The ID of the user whose workspaces are to be retrieved. Use `@me` to refer to the authenticated user.
</ParamField>

### Response

<ResponseField name="response" type="array">
  An array of workspace objects.

  <Expandable title="Toggle object">
    <ResponseField name="id" type="string">
      The ID of the workspace.
    </ResponseField>

    <ResponseField name="name" type="string">
      The name of the workspace.
    </ResponseField>

    <ResponseField name="description" type="string">
      The description of the workspace.
    </ResponseField>

    <ResponseField name="tags" type="array">
      The tags associated with the workspace.
    </ResponseField>

    <ResponseField name="owner_id" type="string">
      The ID of the workspace owner.
    </ResponseField>

    <ResponseField name="plan_id" type="number">
      The ID of the owner's plan.
    </ResponseField>

    <ResponseField name="members" type="array">
      An array of member objects.

      <Expandable title="Toggle object">
        <ResponseField name="user_id" type="string">
          The ID of the member.
        </ResponseField>

        <ResponseField name="role" type="string">
          The role of the member (e.g., `owner`, `admin`, `developer`, `operator`, `viewer`).
        </ResponseField>

        <ResponseField name="joined_at" type="string" format="date-time">
          The timestamp when the member joined the workspace.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="applications" type="array">
      An array of application objects associated with the workspace.

      <Expandable title="Toggle object">
        <ResponseField name="id" type="string">
          The ID of the application.
        </ResponseField>

        <ResponseField name="owner_id" type="string">
          The ID of the application owner.
        </ResponseField>

        <ResponseField name="owner_plan_id" type="number">
          The ID of the owner's plan.
        </ResponseField>

        <ResponseField name="type" type="number">
          The type of the application.
        </ResponseField>

        <ResponseField name="status" type="string">
          The status of the application (e.g., `up`).
        </ResponseField>

        <ResponseField name="cluster" type="number">
          The cluster ID where the application is hosted.
        </ResponseField>

        <ResponseField name="language" type="number">
          The programming language of the application.
        </ResponseField>

        <ResponseField name="subdomain" type="string">
          The subdomain of the application.
        </ResponseField>

        <ResponseField name="custom_domain" type="string | null">
          The custom domain of the application, if set.
        </ResponseField>

        <ResponseField name="created_at" type="string" format="date-time">
          The timestamp when the application was created.
        </ResponseField>

        <ResponseField name="updated_at" type="string" format="date-time">
          The timestamp when the application was last updated.
        </ResponseField>

        <ResponseField name="last_snapshot" type="string | null" format="date-time">
          The timestamp of the last snapshot.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="databases" type="array">
      An array of database objects associated with the workspace.

      <Expandable title="Toggle object">
        <ResponseField name="id" type="string">
          The ID of the database.
        </ResponseField>

        <ResponseField name="owner_id" type="string">
          The ID of the database owner.
        </ResponseField>

        <ResponseField name="owner_plan_id" type="number">
          The ID of the owner's plan.
        </ResponseField>

        <ResponseField name="type" type="number">
          The type of the database.
        </ResponseField>

        <ResponseField name="cluster" type="number">
          The cluster ID where the database is hosted.
        </ResponseField>

        <ResponseField name="status" type="string">
          The status of the database (e.g., `up`).
        </ResponseField>

        <ResponseField name="host" type="string">
          The host address of the database.
        </ResponseField>

        <ResponseField name="port" type="number">
          The port used by the database.
        </ResponseField>

        <ResponseField name="created_at" type="string" format="date-time">
          The timestamp when the database was created.
        </ResponseField>

        <ResponseField name="updated_at" type="string" format="date-time">
          The timestamp when the database was last updated.
        </ResponseField>

        <ResponseField name="last_snapshot" type="string | null" format="date-time">
          The timestamp of the last snapshot, if available.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="created_at" type="string" format="date-time">
      The timestamp when the workspace was created.
    </ResponseField>

    <ResponseField name="updated_at" type="string" format="date-time">
      The timestamp when the workspace was last updated.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Response theme={null}
  {
    "response": [
      {
        "id": "org123",
        "name": "myworkspace",
        "description": "I have a description :)",
        "tags": ["discord", "programming"],
        "owner_id": "993591427428790342",
        "plan_id": 1,
        "members": [
          {
            "user_id": "993591427428790342",
            "role": "owner",
            "joined_at": "2026-03-14T19:58:00Z"
          }
        ],
        "applications": [
         {
           "id": "v111d4af8cd74272a284831fbae14a8v",
            "cluster": 1,
            "type": 1,
            "name": "Simple API",
            "description": "I have a description :)",
            "owner_id": "993591427428790342",
            "owner_plan_id": 1,
            "language": "javascript",
            "ram": 128,
            "status": "up",
            "subdomain": null,
            "custom_domain": null,
            "last_snapshot": "2026-03-09T15:51:47.234Z",
            "created_at": "2026-03-09T15:51:47.234Z",
            "updated_at": "2026-03-11T15:06:41.449Z"
         }
        ],
        "databases": [
          {
            "id": "639d9aa35d8b4e559bcd066db4ddcc8c",
            "cluster": 1,
            "type": 3,
            "name": "MyDatabase",
            "description": "I have a description :)",
            "owner_id": "993591427428790342",
            "owner_plan_id": 1,
            "status": "up",
            "ram": 256,
            "host": "639d9aa35d8b4e559bcd066db4ddcc8c.db.usa1.vertraweb.app",
            "port": 12748,
            "last_snapshot": "2026-03-14T19:58:00Z",
            "created_at": "2026-03-14T19:58:00Z",
            "updated_at": "2026-03-14T19:58:00Z"
          }
        ],
        "created_at": "2026-03-14T19:58:00Z",
        "updated_at": "2026-03-14T19:58:00Z"
      }
    ]
  }
  ```
</ResponseExample>

### Error Responses

<ResponseField name="code" type="string">
  The error code indicating the reason for failure. Possible values:

  * `UNAUTHORIZED`: The user is not authenticated.
  * `USER_NOT_FOUND`: The specified user does not exist.
  * `ID_MUST_BE_A_STRING`: The provided user ID is not a string.
</ResponseField>

<ResponseField name="message" type="string">
  A descriptive message providing additional details about the error.
</ResponseField>

<ResponseExample>
  ```json Error Response (404) theme={null}
  {
    "code": "USER_NOT_FOUND"
  }
  ```
</ResponseExample>
