# Members (/docs/api/members)

Workspace membership.

## List Members

`GET https://api.presentations.ai/api/v1/members`

List workspace members with contact details and current roles.

**Query parameters**

- `page` (integer, optional, ≥ 1, default `1`) — Page number, starting at 1.
- `limit` (integer, optional, ≥ 1, ≤ 200, default `200`) — Items per page.

**Responses**

- `200`: Page_Member_ — Successful Response
- `401`: APIErrorResponse — Missing, malformed, expired, or revoked Bearer API key. `error.code`: `UNAUTHENTICATED`, `INVALID_TOKEN`.
- `403`: APIErrorResponse — The API key, workspace role, project scope, or plan lacks permission. `error.code`: `FORBIDDEN`, `FEATURE_NOT_IN_PLAN`, `PLAN_LIMIT_EXCEEDED`.
- `422`: RequestValidationErrorResponse — A path, query, header, or request-body field failed validation. `error.code`: `VALIDATION_FAILED`.
- `429`: APIErrorResponse — The caller exceeded the API rate limit. `error.code`: `RATE_LIMITED`.
- `500`: APIErrorResponse — Unexpected server failure. Retry only idempotent operations and retain trace_id. `error.code`: `INTERNAL_ERROR`.

## Patch Member

`PATCH https://api.presentations.ai/api/v1/members/{user_id}`

Change a workspace member's role; an admin-capable key is required.

**Path parameters**

- `user_id` (string (uuid), required) — User ID of the workspace member.

**Request body** (`application/json`): UpdateMemberRoleRequest

**Responses**

- `200`: Member — Successful Response
- `401`: APIErrorResponse — Missing, malformed, expired, or revoked Bearer API key. `error.code`: `UNAUTHENTICATED`, `INVALID_TOKEN`.
- `403`: APIErrorResponse — The API key, workspace role, project scope, or plan lacks permission. `error.code`: `FORBIDDEN`, `FEATURE_NOT_IN_PLAN`, `PLAN_LIMIT_EXCEEDED`.
- `404`: APIErrorResponse — The resource does not exist or is outside the caller's scope. `error.code`: `NOT_FOUND`.
- `422`: RequestValidationErrorResponse — A path, query, header, or request-body field failed validation. `error.code`: `VALIDATION_FAILED`.
- `429`: APIErrorResponse — The caller exceeded the API rate limit. `error.code`: `RATE_LIMITED`.
- `500`: APIErrorResponse — Unexpected server failure. Retry only idempotent operations and retain trace_id. `error.code`: `INTERNAL_ERROR`.

## Remove Member

`DELETE https://api.presentations.ai/api/v1/members/{user_id}`

Remove a member and revoke every API key issued for that membership.

**Path parameters**

- `user_id` (string (uuid), required) — User ID of the workspace member.

**Responses**

- `204` — Successful Response
- `401`: APIErrorResponse — Missing, malformed, expired, or revoked Bearer API key. `error.code`: `UNAUTHENTICATED`, `INVALID_TOKEN`.
- `403`: APIErrorResponse — The API key, workspace role, project scope, or plan lacks permission. `error.code`: `FORBIDDEN`, `FEATURE_NOT_IN_PLAN`, `PLAN_LIMIT_EXCEEDED`.
- `404`: APIErrorResponse — The resource does not exist or is outside the caller's scope. `error.code`: `NOT_FOUND`.
- `422`: RequestValidationErrorResponse — A path, query, header, or request-body field failed validation. `error.code`: `VALIDATION_FAILED`.
- `429`: APIErrorResponse — The caller exceeded the API rate limit. `error.code`: `RATE_LIMITED`.
- `500`: APIErrorResponse — Unexpected server failure. Retry only idempotent operations and retain trace_id. `error.code`: `INTERNAL_ERROR`.

# Schemas

### Member

Workspace member response.

`user_id`/`display_name`/`email` duplicate `user` for wire compatibility.

- `workspace_id` (string (uuid), required) — Workspace id.
- `user_id` (string (uuid), required) — Member's user id; same as `user.id`.
- `display_name` (string, required) — Same as `user.display_name`.
- `email` (string (email), required) — Same as `user.email`.
- `user` (UserContact, required) — Member's profile.
- `role` (WorkspaceRole, required) — Member's workspace role.
- `joined_at` (string (date-time), required) — When the user joined the workspace.

### Page_Member_

- `data` (Member[], required) — Items on this page.
- `page` (integer, required) — 1-based page number returned.
- `limit` (integer, required) — Maximum items per page.
- `total` (integer, required) — Items matching the filters across all pages.

### UpdateMemberRoleRequest

Change a member's role.

- `role` (WorkspaceRole, required) — New workspace role.

### UserContact

UserInfo plus email — for member-management surfaces only.

- `id` (string (uuid), required) — User id.
- `display_name` (string, required) — Name shown for the user.
- `avatar_url` (string, required) — Avatar image URL; null when none is set.
- `email` (string (email), required) — User's email address.

### WorkspaceRole

Workspace membership role; higher roles subsume lower ones for hierarchy checks.

One of: `OWNER`, `ADMIN`, `MEMBER`, `GUEST`