---
title: "Share a space with a person"
method: POST
path: "/spaces/{spaceId}/members"
tags: ["Spaces"]
---

# Share a space with a person

`POST /spaces/{spaceId}/members`

## Request

- Base URL: `https://api.mockflow.com/v1`
- URL: `https://api.mockflow.com/v1/spaces/{spaceId}/members`
- Auth: HTTP bearer

Adds or updates the person's role. The first time someone is added an invitation email is
sent, worded as the app sends it. Basic can share as reviewer only, up to five people per
space. A shared admin or editor may share too, as in the app.

## Request body

- object
  - `email` string, email, required
  - `role` 'admin' | 'editor' | 'reviewer', required

## Response `200`

Already a member; role updated.

- SpaceMember
  - `id` string
  - `email` string, email
  - `name` string
  - `role` 'owner' | 'admin' | 'editor' | 'reviewer': The product's roles. Owner is the workspace that holds the board or space and cannot be granted or transferred. Admin can rename and share, editor can edit, reviewer can view, export and add comment items. There is no viewer role and no pending state.
  - `hasAccount` boolean: False for someone invited who has not signed up yet.
  - `invited` boolean: Set on the response to a first add when the invitation mail went out.

## Other responses

- `201`: Added and invited.
- `402`: The workspace plan does not allow this, or AI credits are exhausted.
- `429`: Too many requests.

---

[API](https://skmtc.dev/mockflow/apis/mockflow-boards-api.md) - [All operations](https://skmtc.dev/mockflow/apis/mockflow-boards-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mockflow/apis/mockflow-boards-api/revisions/1a890390518c?raw)
