---
title: "Add a member to a workspace using an invite code"
method: POST
path: "/v2/workspaces/members"
tags: ["Workspaces"]
---

# Add a member to a workspace using an invite code

`POST /v2/workspaces/members`

Adds a member to the workspace using a short-lived invite code generated by `GET /v2/workspaces/members/code`. The invited user is identified by the user ID embedded in the code; the caller specifies the member's role (`view`, `manager`, `maintain`, `admin`).

Up to the plan's per-workspace member cap. The workspace owner cannot be invited to their own workspace.

Rate limited to 1 addition every 5s per user.

## Request body

- object
  - `workspaceId` string, required
  - `code` string, required — Invite code (UUID v4 without hyphens) from `/v2/workspaces/members/code`.
  - `group` 'view' | 'manager' | 'maintain' | 'admin', required

## Response `200`

Member added.

- object
  - `status` 'success', required

## Other responses

- `400` — The `workspaceId` is missing, the invite code is invalid, the role is invalid, the workspace's member quota has been reached, or the member is already in the workspace.
- `401` — The Authorization header is missing, malformed, or the credentials are not valid.
- `403` — The API key does not cover every application in the workspace, or does not hold the scopes the requested role would grant.
- `404` — The workspace does not exist.
- `413` — The request body is larger than the maximum allowed size (100MB).
- `429` — The endpoint enforces its own rate limit and the caller hit the cooldown.
- `500` — An unexpected error occurred while processing the request.

---

[API](https://skmtc.dev/squarecloud/apis/square-cloud-api.md) · [All operations](https://skmtc.dev/squarecloud/apis/square-cloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/squarecloud/square-cloud-api/revisions/54b7733a6b95/schema)
