# Add someone to a teamspace

`POST /v1/teamspaces/{teamspaceId}/members`

Teamspace owners and workspace owners/admins. Guests cannot join teamspaces.

Scope: `docs:write`.

## Request

```bash
curl -X POST "https://api.lydie.co/v1/teamspaces/01JCQ3V5MZ8G4ZK2X7T9R6N1PB/members" \
  -H "Authorization: Bearer $LYDIE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "kG7qL2m9XzP4tR8w"
  }'
```

## Path parameters

- `teamspaceId` (string, required): Teamspace id. (1–64 chars)

## Body

- `userId` (string, required): (1–64 chars)
- `role` (string, optional): One of: `owner`, `member`. Default: `"member"`.

## Response

- `ok` (true, required)

```json
{
  "ok": true
}
```

Errors use the envelope described at https://developers.lydie.co/errors.md.
