> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/feature-management-experimentation/split-api-reference/users.md).

# Users

## List users

> List all active, deactivated, and pending users in the account.

```json
{"openapi":"3.1.0","info":{"title":"Harness FME Admin API","version":"2"},"tags":[{"name":"Users"}],"servers":[{"url":"https://api.split.io/internal/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Admin API Key, sent as `Authorization: Bearer <ADMIN_API_KEY>`"}}},"paths":{"/users":{"get":{"summary":"List users","description":"List all active, deactivated, and pending users in the account.","operationId":"list-users","parameters":[{"name":"status","in":"query","description":"ACTIVE | DEACTIVATED | PENDING are the allowed status values to filter by","schema":{"type":"string"}},{"name":"limit","in":"query","description":"1-200 are the potential values. Default=50","schema":{"type":"integer","format":"int32"}},{"name":"before","in":"query","description":"value of \"previousMarker\" in response","schema":{"type":"string"}},{"name":"after","in":"query","description":"value of \"nextMarker\" in response","schema":{"type":"string"}},{"name":"group_id","in":"query","description":"returns Active members of a group","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{}}},"401":{"description":"401","content":{"text/plain":{}}}},"deprecated":false,"tags":["Users"]}}}}
```

## Invite a new user

> Invite a new user to your account. They are created with a Pending status.

```json
{"openapi":"3.1.0","info":{"title":"Harness FME Admin API","version":"2"},"tags":[{"name":"Users"}],"servers":[{"url":"https://api.split.io/internal/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Admin API Key, sent as `Authorization: Bearer <ADMIN_API_KEY>`"}}},"paths":{"/users":{"post":{"summary":"Invite a new user","description":"Invite a new user to your account. They are created with a Pending status.","operationId":"invite-a-new-user","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"email":{"type":"string"},"groups":{"type":"array"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"status":{"type":"string"},"2fa":{"type":"boolean","default":true},"groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}}}}}}}}},"400":{"description":"400","content":{"text/plain":{}}},"401":{"description":"401","content":{"text/plain":{}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","default":0},"message":{"type":"string"},"details":{"type":"string"},"transactionId":{"type":"string"}}}}}}},"deprecated":false,"tags":["Users"]}}}}
```

## Get user

> Get a user by their user Id.

```json
{"openapi":"3.1.0","info":{"title":"Harness FME Admin API","version":"2"},"tags":[{"name":"Users"}],"servers":[{"url":"https://api.split.io/internal/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Admin API Key, sent as `Authorization: Bearer <ADMIN_API_KEY>`"}}},"paths":{"/users/{user_id}":{"get":{"summary":"Get user","description":"Get a user by their user Id.","operationId":"get-user","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"status":{"type":"string"},"groups":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}}}}}}}}},"401":{"description":"401","content":{"text/plain":{}}}},"deprecated":false,"tags":["Users"],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## Update user

> Use this endpoint to update display name, email, disable 2FA, activate, and deactivate a user.

```json
{"openapi":"3.1.0","info":{"title":"Harness FME Admin API","version":"2"},"tags":[{"name":"Users"}],"servers":[{"url":"https://api.split.io/internal/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Admin API Key, sent as `Authorization: Bearer <ADMIN_API_KEY>`"}}},"paths":{"/users/{user_id}":{"put":{"summary":"Update user","description":"Use this endpoint to update display name, email, disable 2FA, activate, and deactivate a user.","operationId":"full-update-user","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"status":{"type":"string"},"groups":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}}}}}}}}},"401":{"description":"401","content":{"text/plain":{}}}},"deprecated":false,"tags":["Users"],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## Delete a pending user

> You can only delete pending users that have not accepted their invites yet. Once a user is active, you can only deactivate the user via a PUT request.

```json
{"openapi":"3.1.0","info":{"title":"Harness FME Admin API","version":"2"},"tags":[{"name":"Users"}],"servers":[{"url":"https://api.split.io/internal/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Admin API Key, sent as `Authorization: Bearer <ADMIN_API_KEY>`"}}},"paths":{"/users/{user_id}":{"delete":{"summary":"Delete a pending user","description":"You can only delete pending users that have not accepted their invites yet. Once a user is active, you can only deactivate the user via a PUT request.","operationId":"delete-a-pending-user","parameters":[{"name":"user_id","in":"path","description":"The ID of the user you'd like to delete","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"boolean","default":true}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","default":0},"message":{"type":"string"},"transactionId":{"type":"string"}}}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","default":0},"message":{"type":"string"},"transactionId":{"type":"string"}}}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","default":0},"message":{"type":"string"},"transactionId":{"type":"string"}}}}}}},"deprecated":false,"tags":["Users"]}}}}
```

## Update user's groups

> Use this endpoint to update the groups that a user is part of.

```json
{"openapi":"3.1.0","info":{"title":"Harness FME Admin API","version":"2"},"tags":[{"name":"Users"}],"servers":[{"url":"https://api.split.io/internal/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Admin API Key, sent as `Authorization: Bearer <ADMIN_API_KEY>`"}}},"paths":{"/users/{user_id}":{"patch":{"summary":"Update user's groups","description":"Use this endpoint to update the groups that a user is part of.","operationId":"update-users-groups","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"status":{"type":"string"},"groups":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}}}}}}}}},"401":{"description":"401","content":{"text/plain":{}}}},"deprecated":false,"tags":["Users"],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```
