---
title: "Get users in workspace"
method: GET
path: "/workspaces/{workspace_id}/users"
tags: ["Workspaces"]
---

# Get users in workspace

`GET /workspaces/{workspace_id}/users`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/workspaces/{workspace_id}/users`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-KEY` and API key in header `X-API-SECRET` and API key in header `X-WORKSPACE-ID`

Get all users inside of given workspace

## Path parameters

- `workspace_id` integer, required: Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace.

## Query parameters

- `fields` string: Fields to be returned in a comma-separated format may include id, name, created_at, updated_at.
- `sort` string: Sort users by id, first_name or email
- `first_name` string: Fetch all users which matches given name (case sensitive)
- `last_name` string: Fetch all users which matches given name (case sensitive)
- `email` string: Fetch user which matches given email
- `ids` string: Filter users by ids, provided as comma separated integer values
- `offset` integer: Offset from the beginning of the users list
- `limit` integer: Max number of users to return
- `invited` boolean: Include invited users
- `project_id` integer, nullable: Project ID of the workspace

## Response `200`

List of users in a workspaces

- WorkspaceUserGetResponse
  - `users` UserSchema[], required
    - `id` integer, nullable: ID of the user
    - `email` string, email, nullable: Email of the customer
    - `first_name` string, nullable: First name of the user
    - `last_name` string, nullable: Last name of the user
    - `last_login_date` string, date-time, nullable: Last Login of the user
    - `last_active_date` string, date-time, nullable: Last Active of the user
    - `user_roles` object, nullable: User Roles of the user
    - `last_login_from_ip` union: Last Login From IP of the user
      - string, ipv4: IPv4 address
      - string, ipv6: IPv6 address
    - `created_at` string, date-time, nullable: Time when user was created
    - `updated_at` string, date-time, nullable: Time when users properties were updated
    - `profile_link` string, nullable: Profile Link of the user
    - `status` integer, nullable
  - `invites` object[], nullable
  - `limit` integer: Max number of users to return
  - `offset` integer: Offset from the beginning of the users list
  - `next` string, required

## Other responses

- `304`: Not Modified
- `400`: Bad Request
- `401`: Authorization error

---

[API](https://skmtc.dev/mammoth/apis/mammoth-analytics.md) · [All operations](https://skmtc.dev/mammoth/apis/mammoth-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/mammoth/apis/mammoth-analytics/revisions/4b2c943a00dc?raw)
