# 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"}}},"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"]}}}}
```

## 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"}}},"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"},"404":{"description":"User not found"},"409":{"description":"User is already a member of this organization"}},"tags":["Members"]}}}}
```

## 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"}}},"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"}],"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"}}},"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"}],"responses":{"204":{"description":"Member removed successfully"},"401":{"description":"Unauthorized"},"403":{"description":"Insufficient scope or cannot remove organization owner"},"404":{"description":"Member not found"}},"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"}}},"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"}],"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 or cannot modify organization owner"},"404":{"description":"Member not found"}},"tags":["Members"]}}}}
```


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
