---
title: "Add a user to the workspace"
method: POST
path: "/support/workspaces/{workspace_id}/users"
tags: ["Users Support"]
---

# Add a user to the workspace

`POST /support/workspaces/{workspace_id}/users`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/support/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`

Add a user into the specified workspace

## Path parameters

- `workspace_id` integer, required: Id of the workspace to work with

## Request body

- AddUserSupport: Details of the workspace to be created
  - `first_name` string, nullable: First name of the user
  - `last_name` string, nullable: Last name of the user
  - `email` string, email, required: Email of the customer
  - `role` 'workspace_member' | 'workspace_admin' | 'workspace_owner' | 'workspace_guest', required: Role of the user

## Response `201`

Document created, URL follows

- UserPostSchema
  - `id` integer, required: ID of the user

## Other responses

- `202`: Request Accepted
- `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/fe078afe239b?raw)
