---
title: "Transfer workspace ownership"
method: PATCH
path: "/support/workspaces/{workspace_id}/users"
tags: ["Users Support"]
---

# Transfer workspace ownership

`PATCH /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`

Transfer workspace ownership to another user

## Path parameters

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

## Request body

- WorkspaceUserPatch: Update/change user roles in the workspace
  - `patch` AdminWorkspaceUserPatchOp[], required
    - `op` string, required: Operation to be performed on the workspace
    - `path` string, required: Path of the workspace
    - `value` object, required: Value of the workspace

## Response `200`

Successful patch

- UserList
  - `users` union[], required
    - union
      - UserFieldSchema
        - `id` integer, nullable: ID of the user
        - `email` string, email, nullable: Email of the customer
        - `user_name` string, nullable: Name of the user
        - `first_name` string, nullable: First name of the user
        - `last_name` string, nullable: Sample Last Name
        - `last_login_date` string, date-time, nullable: Last Login of the user
        - `last_app_activity_at` 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: Created At
        - `last_updated_at` string, date-time, nullable: Last Updated At of the user
      - UserMinSchema
        - `id` integer, required: ID of the user
        - `email` string, email, required: Email of the customer
        - `first_name` string, required: First name of the user
        - `last_updated_at` string, date-time, nullable: Last Updated At of the user
      - UserStdSchema
        - `id` integer, required: ID of the user
        - `email` string, email, required: Email of the customer
        - `first_name` string, required: First name of the user
        - `last_updated_at` string, date-time, nullable: Last Updated At of the user
        - `user_name` string, nullable: Name of the user
        - `last_name` string, nullable: Sample Last Name
        - `user_roles` object, required: User Roles of the user
      - UserFullSchema
        - `id` integer, required: ID of the user
        - `email` string, email, required: Email of the customer
        - `first_name` string, required: First name of the user
        - `last_updated_at` string, date-time, nullable: Last Updated At of the user
        - `user_name` string, nullable: Name of the user
        - `last_name` string, nullable: Sample Last Name
        - `user_roles` object, required: User Roles of the user
        - `last_login_date` string, date-time, nullable: Last Login of the user
        - `last_app_activity_at` string, date-time, nullable: Last Active 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, required: Created At
  - `offset` integer
  - `limit` integer
  - `next` string, required: URI for next page of data

## Other responses

- `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/5dfd1c296ded?raw)
