---
title: "Add a user to a workspace"
method: POST
path: "/admin/workspaces/{workspaceId}/members"
tags: ["Admin"]
---

# Add a user to a workspace

`POST /admin/workspaces/{workspaceId}/members`

## Request

- Base URL: `https://cloud.kaneo.app/api`
- URL: `https://cloud.kaneo.app/api/admin/workspaces/{workspaceId}/members`
- Auth: HTTP bearer

Add an existing user to a workspace with a role. They start with access to every project. Returns the updated member list.

## Path parameters

- `workspaceId` string, required

## Request body

- object
  - `userId` string, required
  - `role` string, required: A built-in role (viewer, member, admin) or one of the workspace's custom roles. Use the ownership endpoint to make someone the owner.

## Response `200`

Updated workspace members

- AdminWorkspaceMember[]
  - `userId` string, required
  - `name` string, required
  - `email` string, required
  - `image` string, nullable, required
  - `role` string, required
  - `joinedAt` string, date-time, required

## Other responses

- `400`: Unknown role, or the owner role was requested
- `401`: Missing or invalid credentials
- `403`: The caller is not an instance administrator or is authenticated with an API key
- `404`: Workspace or user not found
- `409`: The user is already a member
- `429`: The API key exceeded its rate limit or usage quota. Wait the number of seconds in Retry-After before retrying. The X-RateLimit headers are sent only when the rate limit was hit.

## Changes

- **2026-10-08** `c7b8a842601b`: 5 breaking, 6 info
  - removed the media type `text/plain` for the response with the status `400`
  - removed the media type `text/plain` for the response with the status `403`
  - removed the media type `text/plain` for the response with the status `404`
  - removed the media type `text/plain` for the response with the status `409`
  - …7 more
- **2026-10-08** `2ed51b8af657`: 5 breaking, 5 info
  - removed the media type `application/json` for the response with the status `400`
  - removed the media type `application/json` for the response with the status `401`
  - removed the media type `application/json` for the response with the status `403`
  - removed the media type `application/json` for the response with the status `404`
  - …6 more
- **2026-10-07** `df1439c724ee`: 4 breaking, 5 info
  - removed the media type `text/plain` for the response with the status `400`
  - removed the media type `text/plain` for the response with the status `403`
  - removed the media type `text/plain` for the response with the status `404`
  - removed the media type `text/plain` for the response with the status `409`
  - …5 more
- **2026-10-06** `7dace2b05cc2`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/usekaneo/apis/kaneo-api/changes/admin/workspaces/:workspaceId/members/post.md)

---

[API](https://skmtc.dev/usekaneo/apis/kaneo-api.md) - [All operations](https://skmtc.dev/usekaneo/apis/kaneo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/usekaneo/apis/kaneo-api/revisions/93f78789100c?raw)
