> For the complete documentation index, see [llms.txt](https://docs.spice.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.spice.ai/api/management-api/management/members.md).

# Members

Manage organization members and roles

## List organization members

> Returns all members of the authenticated organization.

```json
{"openapi":"3.1.0","info":{"title":"Spice Cloud Control-Plane API","version":"v1"},"tags":[{"name":"Members","description":"Manage organization members and roles"}],"servers":[{"url":"https://api.spice.ai"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2.0 access token obtained from the Spice.ai authentication service"}},"parameters":{"OrgName":{"in":"header","name":"X-Org-Name","required":false,"description":"The organization to act on, by handle. Omit it to act on the organization the credential is bound to; sending it blank is a 400, not the same as omitting it. A user credential may name any organization its owner belongs to; a machine credential is pinned to its own.\n","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{1,255}$"}}}},"paths":{"/v1/members":{"get":{"summary":"List organization members","description":"Returns all members of the authenticated organization.","responses":{"200":{"description":"List of organization members","content":{"application/json":{"schema":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"integer"},"username":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"is_owner":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}}}}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Insufficient scope"}},"tags":["Members"],"parameters":[{"$ref":"#/components/parameters/OrgName"}]}}}}
```

## Add a member

> Adds a new member to the organization with the specified roles.

```json
{"openapi":"3.1.0","info":{"title":"Spice Cloud Control-Plane API","version":"v1"},"tags":[{"name":"Members","description":"Manage organization members and roles"}],"servers":[{"url":"https://api.spice.ai"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2.0 access token obtained from the Spice.ai authentication service"}},"parameters":{"OrgName":{"in":"header","name":"X-Org-Name","required":false,"description":"The organization to act on, by handle. Omit it to act on the organization the credential is bound to; sending it blank is a 400, not the same as omitting it. A user credential may name any organization its owner belongs to; a machine credential is pinned to its own.\n","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{1,255}$"}}}},"paths":{"/v1/members":{"post":{"summary":"Add a member","description":"Adds a new member to the organization with the specified roles.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["username"],"properties":{"username":{"type":"string","description":"The username of the user to add"},"roles":{"type":"array","items":{"type":"string"},"description":"Roles to assign to the new member","default":["member"]}}}}}},"responses":{"201":{"description":"Member added successfully","content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"integer"},"username":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Invalid request body"},"401":{"description":"Unauthorized"},"403":{"description":"Insufficient scope, not an org admin/owner, or only owners can assign the admin or owner role"},"404":{"description":"User not found"},"409":{"description":"User is already a member of this organization"}},"tags":["Members"],"parameters":[{"$ref":"#/components/parameters/OrgName"}]}}}}
```

## Get a member

> Returns details for a specific organization member, including their roles.

```json
{"openapi":"3.1.0","info":{"title":"Spice Cloud Control-Plane API","version":"v1"},"tags":[{"name":"Members","description":"Manage organization members and roles"}],"servers":[{"url":"https://api.spice.ai"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2.0 access token obtained from the Spice.ai authentication service"}},"parameters":{"OrgName":{"in":"header","name":"X-Org-Name","required":false,"description":"The organization to act on, by handle. Omit it to act on the organization the credential is bound to; sending it blank is a 400, not the same as omitting it. A user credential may name any organization its owner belongs to; a machine credential is pinned to its own.\n","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{1,255}$"}}}},"paths":{"/v1/members/{memberId}":{"get":{"summary":"Get a member","description":"Returns details for a specific organization member, including their roles.","parameters":[{"in":"path","name":"memberId","required":true,"schema":{"type":"integer"},"description":"The user ID of the member"},{"$ref":"#/components/parameters/OrgName"}],"responses":{"200":{"description":"Member details","content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"integer"},"username":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"is_owner":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Insufficient scope"},"404":{"description":"Member not found"}},"tags":["Members"]}}}}
```

## Remove a member

> Removes a member from the organization. Organization owners cannot be removed.

```json
{"openapi":"3.1.0","info":{"title":"Spice Cloud Control-Plane API","version":"v1"},"tags":[{"name":"Members","description":"Manage organization members and roles"}],"servers":[{"url":"https://api.spice.ai"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2.0 access token obtained from the Spice.ai authentication service"}},"parameters":{"OrgName":{"in":"header","name":"X-Org-Name","required":false,"description":"The organization to act on, by handle. Omit it to act on the organization the credential is bound to; sending it blank is a 400, not the same as omitting it. A user credential may name any organization its owner belongs to; a machine credential is pinned to its own.\n","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{1,255}$"}}}},"paths":{"/v1/members/{memberId}":{"delete":{"summary":"Remove a member","description":"Removes a member from the organization. Organization owners cannot be removed.","parameters":[{"in":"path","name":"memberId","required":true,"schema":{"type":"integer"},"description":"The user ID of the member"},{"$ref":"#/components/parameters/OrgName"}],"responses":{"204":{"description":"Member removed successfully"},"400":{"description":"Invalid member ID"},"401":{"description":"Unauthorized"},"403":{"description":"Insufficient scope, not an org admin/owner, cannot remove owner, or only owners can remove admins or owners"},"404":{"description":"Member not found"},"500":{"description":"The removal could not be completed, or could not be confirmed"}},"tags":["Members"]}}}}
```

## Update a member's roles

> Updates the roles assigned to a specific organization member. Organization owners cannot have their roles modified.

```json
{"openapi":"3.1.0","info":{"title":"Spice Cloud Control-Plane API","version":"v1"},"tags":[{"name":"Members","description":"Manage organization members and roles"}],"servers":[{"url":"https://api.spice.ai"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2.0 access token obtained from the Spice.ai authentication service"}},"parameters":{"OrgName":{"in":"header","name":"X-Org-Name","required":false,"description":"The organization to act on, by handle. Omit it to act on the organization the credential is bound to; sending it blank is a 400, not the same as omitting it. A user credential may name any organization its owner belongs to; a machine credential is pinned to its own.\n","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{1,255}$"}}}},"paths":{"/v1/members/{memberId}":{"patch":{"summary":"Update a member's roles","description":"Updates the roles assigned to a specific organization member. Organization owners cannot have their roles modified.","parameters":[{"in":"path","name":"memberId","required":true,"schema":{"type":"integer"},"description":"The user ID of the member"},{"$ref":"#/components/parameters/OrgName"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["roles"],"properties":{"roles":{"type":"array","items":{"type":"string"},"description":"New roles to assign to the member"}}}}}},"responses":{"200":{"description":"Member roles updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"integer"},"username":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Invalid request body"},"401":{"description":"Unauthorized"},"403":{"description":"Insufficient scope, not an org admin/owner, cannot modify owner, only owners can modify/assign admin or owner roles"},"404":{"description":"Member not found, or the membership was removed before the role change was written"},"413":{"description":"Request body too large"},"500":{"description":"The organization could not be read, or the role change failed"}},"tags":["Members"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.spice.ai/api/management-api/management/members.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
