# Users

Members within the workspace. Learn more about user management [here](https://docs.secoda.com/user-management).

## List Users

> Get a list of users.

```json
{"openapi":"3.0.0","info":{"title":"Secoda API","version":"8.22.39"},"tags":[{"name":"Users","description":"Members within the workspace. Learn more about user management [here](https://docs.secoda.com/user-management).\n"}],"servers":[{"url":"https://api.secoda.co","description":"Base URL for all US cloud based workspaces"},{"url":"https://eapi.secoda.co","description":"Base URL for all EU cloud based workspaces"},{"url":"https://aapi.secoda.co","description":"Base URL for all APAC cloud based workspaces"},{"url":"https://{customer_domain}.secoda.co","description":"Base URL for On Premise Secoda workspaces","variables":{"customer_domain":{"default":"customer_domain","description":"The specific domain set up for your On Premise Secoda workspace."}}}],"security":[{"ApiKeyAuth":[]}],"paths":{"/api/v1/user":{"get":{"tags":["Users"],"summary":"List Users","description":"Get a list of users.","responses":{"200":{"description":"List of users.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/v1_ListResponse"},{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/v1_UsersResponse"}}}}]}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error"}}}}},"components":{"schemas":{"v1_ListResponse":{"type":"object","properties":{"links":{"type":"object","description":"Indicates Links to associated pages.","properties":{"next":{"type":"string","description":"The link to the next page (null if there are no more pages)."},"previous":{"type":"string","description":"The link to the previous page (null if on the first page)."}}},"meta":{"type":"object","description":"Reprents the meta data of the response.","properties":{"page":{"type":"integer","description":"The current page number."},"previous_page":{"type":"integer","description":"The previous page number (null if on the first page)."},"next_page":{"type":"integer","description":"The next page number (null if on the last page)."}}},"count":{"type":"integer","description":"The total count of items returned."},"total_pages":{"type":"integer","description":"The total number of pages."}}},"v1_UsersResponse":{"type":"object","properties":{"id":{"type":"string","description":"Indicates the UUID of the user."},"first_name":{"type":"string","description":"Indicates the first name of the user."},"last_name":{"type":"string","description":"Indicates the last name of the user."},"email":{"type":"string","description":"Indicates the email id of the user."},"role":{"type":"string","description":"Indicates the role of the user. Values can be - <ul><li> Admin <li> Editor <li> Viewer </ul>"},"workspace_id":{"type":"string","description":"Indicates the workspace ID of the user."},"profile_picture":{"type":"string","description":"Indicates the file name of the profile picture for the user."},"pending":{"type":"boolean","description":"Represents if the user has been invited to the space but not accepted yet. Values can be - <ul> <li> \"True\" <li> \"False\" </ul>"},"user_groups":{"type":"array","description":"A list of UUIDs of groups the user belongs to.","items":{"type":"string"}},"bookmarks":{"type":"array","items":{"type":"string"},"description":"Represents the resorces that the user has bookmarked."},"workspace":{"type":"string","description":"Indicates the workspace of the user."},"is_service_account":{"type":"boolean","description":"Indicates if the user account is a service account or not. Values can be - <ul> <li >True <li> False </ul>"},"service_account_count_popularity":{"type":"boolean","description":"Indicates if the account counts towards popularity calculations. Values can be - <ul> <li> True <li> False </ul>"},"last_login":{"type":"string","format":"date-time","description":"Indicates the last time account was logged in to Secoda in UTC format."},"new_feature_acknowledged":{"type":"boolean","description":"Indicates if the new feature has been acknowleged or not. Values can be - <ul> <li >True <li> False </ul>"},"disabled":{"type":"boolean","description":"Represents if the account is disabled or not. Values can be - <ul> <li >True <li> False </ul>"}}}}}}
```

## Create User

> Create a new user in the workspace.

```json
{"openapi":"3.0.0","info":{"title":"Secoda API","version":"8.22.39"},"tags":[{"name":"Users","description":"Members within the workspace. Learn more about user management [here](https://docs.secoda.com/user-management).\n"}],"servers":[{"url":"https://api.secoda.co","description":"Base URL for all US cloud based workspaces"},{"url":"https://eapi.secoda.co","description":"Base URL for all EU cloud based workspaces"},{"url":"https://aapi.secoda.co","description":"Base URL for all APAC cloud based workspaces"},{"url":"https://{customer_domain}.secoda.co","description":"Base URL for On Premise Secoda workspaces","variables":{"customer_domain":{"default":"customer_domain","description":"The specific domain set up for your On Premise Secoda workspace."}}}],"security":[{"ApiKeyAuth":[]}],"paths":{"/api/v1/user":{"post":{"tags":["Users"],"summary":"Create User","description":"Create a new user in the workspace.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","description":"Indicates the first name of the user."},"last_name":{"type":"string","description":"Indicates the last name of the user."},"email":{"type":"string","description":"Indicates the email id of the user."},"role":{"type":"string","description":"Indicates the role of the user. Values can be - <ul><li> Admin <li> Editor <li> Viewer <li> Guest </ul>"},"teams":{"type":"array","items":{"type":"string"},"description":"List of team IDs (optional). It is mandatory if the role is guest."},"user_groups":{"type":"array","items":{"type":"string"},"description":"List of group IDs (optional)"}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1_UsersResponse"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error"}}}}},"components":{"schemas":{"v1_UsersResponse":{"type":"object","properties":{"id":{"type":"string","description":"Indicates the UUID of the user."},"first_name":{"type":"string","description":"Indicates the first name of the user."},"last_name":{"type":"string","description":"Indicates the last name of the user."},"email":{"type":"string","description":"Indicates the email id of the user."},"role":{"type":"string","description":"Indicates the role of the user. Values can be - <ul><li> Admin <li> Editor <li> Viewer </ul>"},"workspace_id":{"type":"string","description":"Indicates the workspace ID of the user."},"profile_picture":{"type":"string","description":"Indicates the file name of the profile picture for the user."},"pending":{"type":"boolean","description":"Represents if the user has been invited to the space but not accepted yet. Values can be - <ul> <li> \"True\" <li> \"False\" </ul>"},"user_groups":{"type":"array","description":"A list of UUIDs of groups the user belongs to.","items":{"type":"string"}},"bookmarks":{"type":"array","items":{"type":"string"},"description":"Represents the resorces that the user has bookmarked."},"workspace":{"type":"string","description":"Indicates the workspace of the user."},"is_service_account":{"type":"boolean","description":"Indicates if the user account is a service account or not. Values can be - <ul> <li >True <li> False </ul>"},"service_account_count_popularity":{"type":"boolean","description":"Indicates if the account counts towards popularity calculations. Values can be - <ul> <li> True <li> False </ul>"},"last_login":{"type":"string","format":"date-time","description":"Indicates the last time account was logged in to Secoda in UTC format."},"new_feature_acknowledged":{"type":"boolean","description":"Indicates if the new feature has been acknowleged or not. Values can be - <ul> <li >True <li> False </ul>"},"disabled":{"type":"boolean","description":"Represents if the account is disabled or not. Values can be - <ul> <li >True <li> False </ul>"}}}}}}
```

## Get User

> Get a user by their ID.

```json
{"openapi":"3.0.0","info":{"title":"Secoda API","version":"8.22.39"},"tags":[{"name":"Users","description":"Members within the workspace. Learn more about user management [here](https://docs.secoda.com/user-management).\n"}],"servers":[{"url":"https://api.secoda.co","description":"Base URL for all US cloud based workspaces"},{"url":"https://eapi.secoda.co","description":"Base URL for all EU cloud based workspaces"},{"url":"https://aapi.secoda.co","description":"Base URL for all APAC cloud based workspaces"},{"url":"https://{customer_domain}.secoda.co","description":"Base URL for On Premise Secoda workspaces","variables":{"customer_domain":{"default":"customer_domain","description":"The specific domain set up for your On Premise Secoda workspace."}}}],"security":[{"ApiKeyAuth":[]}],"paths":{"/api/v1/user/{id}":{"get":{"tags":["Users"],"summary":"Get User","description":"Get a user by their ID.","parameters":[{"name":"id","in":"path","required":true,"description":"The ID of the user to retrieve.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1_UsersResponse"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"}}}}},"components":{"schemas":{"v1_UsersResponse":{"type":"object","properties":{"id":{"type":"string","description":"Indicates the UUID of the user."},"first_name":{"type":"string","description":"Indicates the first name of the user."},"last_name":{"type":"string","description":"Indicates the last name of the user."},"email":{"type":"string","description":"Indicates the email id of the user."},"role":{"type":"string","description":"Indicates the role of the user. Values can be - <ul><li> Admin <li> Editor <li> Viewer </ul>"},"workspace_id":{"type":"string","description":"Indicates the workspace ID of the user."},"profile_picture":{"type":"string","description":"Indicates the file name of the profile picture for the user."},"pending":{"type":"boolean","description":"Represents if the user has been invited to the space but not accepted yet. Values can be - <ul> <li> \"True\" <li> \"False\" </ul>"},"user_groups":{"type":"array","description":"A list of UUIDs of groups the user belongs to.","items":{"type":"string"}},"bookmarks":{"type":"array","items":{"type":"string"},"description":"Represents the resorces that the user has bookmarked."},"workspace":{"type":"string","description":"Indicates the workspace of the user."},"is_service_account":{"type":"boolean","description":"Indicates if the user account is a service account or not. Values can be - <ul> <li >True <li> False </ul>"},"service_account_count_popularity":{"type":"boolean","description":"Indicates if the account counts towards popularity calculations. Values can be - <ul> <li> True <li> False </ul>"},"last_login":{"type":"string","format":"date-time","description":"Indicates the last time account was logged in to Secoda in UTC format."},"new_feature_acknowledged":{"type":"boolean","description":"Indicates if the new feature has been acknowleged or not. Values can be - <ul> <li >True <li> False </ul>"},"disabled":{"type":"boolean","description":"Represents if the account is disabled or not. Values can be - <ul> <li >True <li> False </ul>"}}}}}}
```

## Delete User

> Delete a user by their ID.

```json
{"openapi":"3.0.0","info":{"title":"Secoda API","version":"8.22.39"},"tags":[{"name":"Users","description":"Members within the workspace. Learn more about user management [here](https://docs.secoda.com/user-management).\n"}],"servers":[{"url":"https://api.secoda.co","description":"Base URL for all US cloud based workspaces"},{"url":"https://eapi.secoda.co","description":"Base URL for all EU cloud based workspaces"},{"url":"https://aapi.secoda.co","description":"Base URL for all APAC cloud based workspaces"},{"url":"https://{customer_domain}.secoda.co","description":"Base URL for On Premise Secoda workspaces","variables":{"customer_domain":{"default":"customer_domain","description":"The specific domain set up for your On Premise Secoda workspace."}}}],"security":[{"ApiKeyAuth":[]}],"paths":{"/api/v1/user/{id}":{"delete":{"tags":["Users"],"summary":"Delete User","description":"Delete a user by their ID.","parameters":[{"name":"id","in":"path","required":true,"description":"The ID of the user to delete.","schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"}}}}}}
```

## Update User

> Use this endpoint to update the user. Editable fields include the first name, last name, and role.

```json
{"openapi":"3.0.0","info":{"title":"Secoda API","version":"8.22.39"},"tags":[{"name":"Users","description":"Members within the workspace. Learn more about user management [here](https://docs.secoda.com/user-management).\n"}],"servers":[{"url":"https://api.secoda.co","description":"Base URL for all US cloud based workspaces"},{"url":"https://eapi.secoda.co","description":"Base URL for all EU cloud based workspaces"},{"url":"https://aapi.secoda.co","description":"Base URL for all APAC cloud based workspaces"},{"url":"https://{customer_domain}.secoda.co","description":"Base URL for On Premise Secoda workspaces","variables":{"customer_domain":{"default":"customer_domain","description":"The specific domain set up for your On Premise Secoda workspace."}}}],"security":[{"ApiKeyAuth":[]}],"paths":{"/api/v1/user/{id}":{"patch":{"tags":["Users"],"summary":"Update User","description":"Use this endpoint to update the user. Editable fields include the first name, last name, and role.","parameters":[{"name":"id","in":"path","required":true,"description":"The ID of the user to update.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","description":"Indicates the first name of the user."},"last_name":{"type":"string","description":"Indicates the last name of the user."}}}}}},"responses":{"200":{"description":"User updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1_UsersResponse"}}}},"400":{"description":"Bad Request"},"404":{"description":"User not found"},"500":{"description":"Internal Server Error"}}}}},"components":{"schemas":{"v1_UsersResponse":{"type":"object","properties":{"id":{"type":"string","description":"Indicates the UUID of the user."},"first_name":{"type":"string","description":"Indicates the first name of the user."},"last_name":{"type":"string","description":"Indicates the last name of the user."},"email":{"type":"string","description":"Indicates the email id of the user."},"role":{"type":"string","description":"Indicates the role of the user. Values can be - <ul><li> Admin <li> Editor <li> Viewer </ul>"},"workspace_id":{"type":"string","description":"Indicates the workspace ID of the user."},"profile_picture":{"type":"string","description":"Indicates the file name of the profile picture for the user."},"pending":{"type":"boolean","description":"Represents if the user has been invited to the space but not accepted yet. Values can be - <ul> <li> \"True\" <li> \"False\" </ul>"},"user_groups":{"type":"array","description":"A list of UUIDs of groups the user belongs to.","items":{"type":"string"}},"bookmarks":{"type":"array","items":{"type":"string"},"description":"Represents the resorces that the user has bookmarked."},"workspace":{"type":"string","description":"Indicates the workspace of the user."},"is_service_account":{"type":"boolean","description":"Indicates if the user account is a service account or not. Values can be - <ul> <li >True <li> False </ul>"},"service_account_count_popularity":{"type":"boolean","description":"Indicates if the account counts towards popularity calculations. Values can be - <ul> <li> True <li> False </ul>"},"last_login":{"type":"string","format":"date-time","description":"Indicates the last time account was logged in to Secoda in UTC format."},"new_feature_acknowledged":{"type":"boolean","description":"Indicates if the new feature has been acknowleged or not. Values can be - <ul> <li >True <li> False </ul>"},"disabled":{"type":"boolean","description":"Represents if the account is disabled or not. Values can be - <ul> <li >True <li> False </ul>"}}}}}}
```


---

# 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.secoda.co/api/reference/users.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.
