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

# Users

## GET /V2/{tenantVarCode}/users

> Returns a list of users for specified tenant> \
> This endpoint returns paged results of up to 10,000 records per response, using the X-CONTINUATIONTOKEN header.> \
> When the response includes this token, it indicates that additional records are available. To retrieve the next set of results,> \
> include the X-CONTINUATIONTOKEN token from the previous response header in the header of your subsequent request.> \
> This process can be repeated until no further continuation token is provided, indicating that you have reached the end of the dataset.

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"Users"}],"paths":{"/V2/{tenantVarCode}/users":{"get":{"tags":["Users"],"summary":"Returns a list of users for specified tenant\r\nThis endpoint returns paged results of up to 10,000 records per response, using the X-CONTINUATIONTOKEN header.\r\nWhen the response includes this token, it indicates that additional records are available. To retrieve the next set of results,\r\ninclude the X-CONTINUATIONTOKEN token from the previous response header in the header of your subsequent request.\r\nThis process can be repeated until no further continuation token is provided, indicating that you have reached the end of the dataset.","parameters":[{"name":"tenantVarCode","in":"path","description":"Tenant Var Code","required":true,"schema":{"type":"string"}},{"name":"subtenants","in":"query","description":"If true, result includes users from subtenants","schema":{"type":"boolean","default":false}},{"name":"photo","in":"query","description":"If true, result include Base64 encoded profile picture","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}},"application/json;IEEE754Compatible=false":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}},"application/json;IEEE754Compatible=true":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}},"application/xml":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}},"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}},"application/octet-stream":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}},"text/xml":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}},"text/csv":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}}}}},"components":{"schemas":{"User":{"type":"object","properties":{"TenantCode":{"type":"string","description":"Tenant Var Code","nullable":true},"Username":{"type":"string","description":"The email address that is used as login","nullable":true},"UserId":{"type":"string","description":"A unique identifier of the user","nullable":true},"Password":{"type":"string","description":"User's password (used for POST, PUT and PATCH only)","nullable":true},"FirstName":{"type":"string","description":"The first name of the user","nullable":true},"LastName":{"type":"string","description":"The last name of the user","nullable":true},"UserRoleId":{"type":"string","description":"The unique identifier for the user role","nullable":true},"IsApproved":{"type":"boolean","description":"A boolean indicating whether user verified his email"},"IsDisabled":{"type":"boolean","description":"A boolean indicating if account is disabled"},"IsPortalEnabled":{"type":"boolean","description":"A boolean indicating if account is enabled for the portal"},"FailedPasswordAttemptCount":{"type":"integer","description":"A number of invalid login attempts in last time window","format":"int32"},"FailedPasswordAttemptWindowStart":{"type":"string","description":"A date and time of last invalid login time window start","format":"date-time","nullable":true},"LastLockoutDate":{"type":"string","description":"A date and time when the account was locked because of too many invalid login attempts","format":"date-time","nullable":true},"LastLoggedIn":{"type":"string","description":"A date and time when the user logged in last time","format":"date-time","nullable":true},"CrossTenantCollections":{"type":"string","description":"String with comma delimited list of cross tenant collection IDs which are assigned to the user","nullable":true},"PinCode":{"type":"string","description":"Pin code for external services","nullable":true},"Timestamp":{"type":"string","description":"Timestamp (UTC) indicating version of record being returned","format":"date-time","nullable":true},"Photo":{"type":"string","description":"Base64 encoded user profile photo. Included in GET request only when photo parameter is specified.","nullable":true},"Notes":{"type":"string","description":"Free form notes that can be added against a user.","nullable":true},"ManagerUserId":{"type":"string","description":"User's manager unique identifier","nullable":true},"Gender":{"type":"string","description":"Valid options are Male, Female, Transgender, Non-Binary, Other","nullable":true},"JobTitle":{"type":"string","description":"Users job title","nullable":true},"EmployeeId":{"type":"string","description":"Users employee Id","nullable":true},"FacilityId":{"type":"string","description":"User's primary facility ID","nullable":true},"SecondaryFacilityIds":{"type":"array","items":{"type":"string"},"description":"List of secondary facility IDs","nullable":true},"ETag":{"type":"string","description":"ETag representing record version","nullable":true},"Tags":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"A dictionary with tags","nullable":true},"CustomFields":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"A dictionary with cutom fields","nullable":true}},"additionalProperties":false}}}}
```

## POST /V2/{tenantVarCode}/users

> Creates a new user

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"Users"}],"paths":{"/V2/{tenantVarCode}/users":{"post":{"tags":["Users"],"summary":"Creates a new user","operationId":"PostUser","parameters":[{"name":"tenantVarCode","in":"path","description":"Tenant Var Code","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"User","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}},"application/json;IEEE754Compatible=false":{"schema":{"$ref":"#/components/schemas/User"}},"application/json;IEEE754Compatible=true":{"schema":{"$ref":"#/components/schemas/User"}},"application/xml":{"schema":{"$ref":"#/components/schemas/User"}},"text/plain":{"schema":{"$ref":"#/components/schemas/User"}},"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/User"}},"text/json":{"schema":{"$ref":"#/components/schemas/User"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/User"}},"text/xml":{"schema":{"$ref":"#/components/schemas/User"}},"application/*+xml":{"schema":{"$ref":"#/components/schemas/User"}}}},"responses":{"200":{"description":"OK"}}}}},"components":{"schemas":{"User":{"type":"object","properties":{"TenantCode":{"type":"string","description":"Tenant Var Code","nullable":true},"Username":{"type":"string","description":"The email address that is used as login","nullable":true},"UserId":{"type":"string","description":"A unique identifier of the user","nullable":true},"Password":{"type":"string","description":"User's password (used for POST, PUT and PATCH only)","nullable":true},"FirstName":{"type":"string","description":"The first name of the user","nullable":true},"LastName":{"type":"string","description":"The last name of the user","nullable":true},"UserRoleId":{"type":"string","description":"The unique identifier for the user role","nullable":true},"IsApproved":{"type":"boolean","description":"A boolean indicating whether user verified his email"},"IsDisabled":{"type":"boolean","description":"A boolean indicating if account is disabled"},"IsPortalEnabled":{"type":"boolean","description":"A boolean indicating if account is enabled for the portal"},"FailedPasswordAttemptCount":{"type":"integer","description":"A number of invalid login attempts in last time window","format":"int32"},"FailedPasswordAttemptWindowStart":{"type":"string","description":"A date and time of last invalid login time window start","format":"date-time","nullable":true},"LastLockoutDate":{"type":"string","description":"A date and time when the account was locked because of too many invalid login attempts","format":"date-time","nullable":true},"LastLoggedIn":{"type":"string","description":"A date and time when the user logged in last time","format":"date-time","nullable":true},"CrossTenantCollections":{"type":"string","description":"String with comma delimited list of cross tenant collection IDs which are assigned to the user","nullable":true},"PinCode":{"type":"string","description":"Pin code for external services","nullable":true},"Timestamp":{"type":"string","description":"Timestamp (UTC) indicating version of record being returned","format":"date-time","nullable":true},"Photo":{"type":"string","description":"Base64 encoded user profile photo. Included in GET request only when photo parameter is specified.","nullable":true},"Notes":{"type":"string","description":"Free form notes that can be added against a user.","nullable":true},"ManagerUserId":{"type":"string","description":"User's manager unique identifier","nullable":true},"Gender":{"type":"string","description":"Valid options are Male, Female, Transgender, Non-Binary, Other","nullable":true},"JobTitle":{"type":"string","description":"Users job title","nullable":true},"EmployeeId":{"type":"string","description":"Users employee Id","nullable":true},"FacilityId":{"type":"string","description":"User's primary facility ID","nullable":true},"SecondaryFacilityIds":{"type":"array","items":{"type":"string"},"description":"List of secondary facility IDs","nullable":true},"ETag":{"type":"string","description":"ETag representing record version","nullable":true},"Tags":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"A dictionary with tags","nullable":true},"CustomFields":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"A dictionary with cutom fields","nullable":true}},"additionalProperties":false}}}}
```

## GET /V2/{tenantVarCode}/users/{userId}

> Returns a specific user

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"Users"}],"paths":{"/V2/{tenantVarCode}/users/{userId}":{"get":{"tags":["Users"],"summary":"Returns a specific user","operationId":"GetUser","parameters":[{"name":"tenantVarCode","in":"path","description":"Tenant Var Code","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","description":"User Id","required":true,"schema":{"type":"string"}},{"name":"photo","in":"query","description":"If true, result include Base64 encoded profile picture","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}},"application/json;IEEE754Compatible=false":{"schema":{"$ref":"#/components/schemas/User"}},"application/json;IEEE754Compatible=true":{"schema":{"$ref":"#/components/schemas/User"}},"application/xml":{"schema":{"$ref":"#/components/schemas/User"}},"text/plain":{"schema":{"$ref":"#/components/schemas/User"}},"application/octet-stream":{"schema":{"$ref":"#/components/schemas/User"}},"text/json":{"schema":{"$ref":"#/components/schemas/User"}},"text/xml":{"schema":{"$ref":"#/components/schemas/User"}}}}}}}},"components":{"schemas":{"User":{"type":"object","properties":{"TenantCode":{"type":"string","description":"Tenant Var Code","nullable":true},"Username":{"type":"string","description":"The email address that is used as login","nullable":true},"UserId":{"type":"string","description":"A unique identifier of the user","nullable":true},"Password":{"type":"string","description":"User's password (used for POST, PUT and PATCH only)","nullable":true},"FirstName":{"type":"string","description":"The first name of the user","nullable":true},"LastName":{"type":"string","description":"The last name of the user","nullable":true},"UserRoleId":{"type":"string","description":"The unique identifier for the user role","nullable":true},"IsApproved":{"type":"boolean","description":"A boolean indicating whether user verified his email"},"IsDisabled":{"type":"boolean","description":"A boolean indicating if account is disabled"},"IsPortalEnabled":{"type":"boolean","description":"A boolean indicating if account is enabled for the portal"},"FailedPasswordAttemptCount":{"type":"integer","description":"A number of invalid login attempts in last time window","format":"int32"},"FailedPasswordAttemptWindowStart":{"type":"string","description":"A date and time of last invalid login time window start","format":"date-time","nullable":true},"LastLockoutDate":{"type":"string","description":"A date and time when the account was locked because of too many invalid login attempts","format":"date-time","nullable":true},"LastLoggedIn":{"type":"string","description":"A date and time when the user logged in last time","format":"date-time","nullable":true},"CrossTenantCollections":{"type":"string","description":"String with comma delimited list of cross tenant collection IDs which are assigned to the user","nullable":true},"PinCode":{"type":"string","description":"Pin code for external services","nullable":true},"Timestamp":{"type":"string","description":"Timestamp (UTC) indicating version of record being returned","format":"date-time","nullable":true},"Photo":{"type":"string","description":"Base64 encoded user profile photo. Included in GET request only when photo parameter is specified.","nullable":true},"Notes":{"type":"string","description":"Free form notes that can be added against a user.","nullable":true},"ManagerUserId":{"type":"string","description":"User's manager unique identifier","nullable":true},"Gender":{"type":"string","description":"Valid options are Male, Female, Transgender, Non-Binary, Other","nullable":true},"JobTitle":{"type":"string","description":"Users job title","nullable":true},"EmployeeId":{"type":"string","description":"Users employee Id","nullable":true},"FacilityId":{"type":"string","description":"User's primary facility ID","nullable":true},"SecondaryFacilityIds":{"type":"array","items":{"type":"string"},"description":"List of secondary facility IDs","nullable":true},"ETag":{"type":"string","description":"ETag representing record version","nullable":true},"Tags":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"A dictionary with tags","nullable":true},"CustomFields":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"A dictionary with cutom fields","nullable":true}},"additionalProperties":false}}}}
```

## PUT /V2/{tenantVarCode}/users/{userId}

> Updates an existing user

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"Users"}],"paths":{"/V2/{tenantVarCode}/users/{userId}":{"put":{"tags":["Users"],"summary":"Updates an existing user","parameters":[{"name":"tenantVarCode","in":"path","description":"Tenant Var Code","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","description":"User Id","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"User","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}},"application/json;IEEE754Compatible=false":{"schema":{"$ref":"#/components/schemas/User"}},"application/json;IEEE754Compatible=true":{"schema":{"$ref":"#/components/schemas/User"}},"application/xml":{"schema":{"$ref":"#/components/schemas/User"}},"text/plain":{"schema":{"$ref":"#/components/schemas/User"}},"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/User"}},"text/json":{"schema":{"$ref":"#/components/schemas/User"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/User"}},"text/xml":{"schema":{"$ref":"#/components/schemas/User"}},"application/*+xml":{"schema":{"$ref":"#/components/schemas/User"}}}},"responses":{"200":{"description":"OK"}}}}},"components":{"schemas":{"User":{"type":"object","properties":{"TenantCode":{"type":"string","description":"Tenant Var Code","nullable":true},"Username":{"type":"string","description":"The email address that is used as login","nullable":true},"UserId":{"type":"string","description":"A unique identifier of the user","nullable":true},"Password":{"type":"string","description":"User's password (used for POST, PUT and PATCH only)","nullable":true},"FirstName":{"type":"string","description":"The first name of the user","nullable":true},"LastName":{"type":"string","description":"The last name of the user","nullable":true},"UserRoleId":{"type":"string","description":"The unique identifier for the user role","nullable":true},"IsApproved":{"type":"boolean","description":"A boolean indicating whether user verified his email"},"IsDisabled":{"type":"boolean","description":"A boolean indicating if account is disabled"},"IsPortalEnabled":{"type":"boolean","description":"A boolean indicating if account is enabled for the portal"},"FailedPasswordAttemptCount":{"type":"integer","description":"A number of invalid login attempts in last time window","format":"int32"},"FailedPasswordAttemptWindowStart":{"type":"string","description":"A date and time of last invalid login time window start","format":"date-time","nullable":true},"LastLockoutDate":{"type":"string","description":"A date and time when the account was locked because of too many invalid login attempts","format":"date-time","nullable":true},"LastLoggedIn":{"type":"string","description":"A date and time when the user logged in last time","format":"date-time","nullable":true},"CrossTenantCollections":{"type":"string","description":"String with comma delimited list of cross tenant collection IDs which are assigned to the user","nullable":true},"PinCode":{"type":"string","description":"Pin code for external services","nullable":true},"Timestamp":{"type":"string","description":"Timestamp (UTC) indicating version of record being returned","format":"date-time","nullable":true},"Photo":{"type":"string","description":"Base64 encoded user profile photo. Included in GET request only when photo parameter is specified.","nullable":true},"Notes":{"type":"string","description":"Free form notes that can be added against a user.","nullable":true},"ManagerUserId":{"type":"string","description":"User's manager unique identifier","nullable":true},"Gender":{"type":"string","description":"Valid options are Male, Female, Transgender, Non-Binary, Other","nullable":true},"JobTitle":{"type":"string","description":"Users job title","nullable":true},"EmployeeId":{"type":"string","description":"Users employee Id","nullable":true},"FacilityId":{"type":"string","description":"User's primary facility ID","nullable":true},"SecondaryFacilityIds":{"type":"array","items":{"type":"string"},"description":"List of secondary facility IDs","nullable":true},"ETag":{"type":"string","description":"ETag representing record version","nullable":true},"Tags":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"A dictionary with tags","nullable":true},"CustomFields":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"A dictionary with cutom fields","nullable":true}},"additionalProperties":false}}}}
```

## DELETE /V2/{tenantVarCode}/users/{userId}

> Deletes a specific user

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"Users"}],"paths":{"/V2/{tenantVarCode}/users/{userId}":{"delete":{"tags":["Users"],"summary":"Deletes a specific user","parameters":[{"name":"tenantVarCode","in":"path","description":"","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","description":"User Id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}}}}
```

## PATCH /V2/{tenantVarCode}/users/{userId}

> Patches an existing user

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"Users"}],"paths":{"/V2/{tenantVarCode}/users/{userId}":{"patch":{"tags":["Users"],"summary":"Patches an existing user","parameters":[{"name":"tenantVarCode","in":"path","description":"","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","description":"","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Operation"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Operation"}}},"application/json;IEEE754Compatible=false":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Operation"}}},"application/json;IEEE754Compatible=true":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Operation"}}},"application/*+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Operation"}}}}},"responses":{"200":{"description":"OK"}}}}},"components":{"schemas":{"Operation":{"type":"object","properties":{"value":{"nullable":true},"path":{"type":"string","nullable":true},"op":{"type":"string","nullable":true},"from":{"type":"string","nullable":true}},"additionalProperties":false}}}}
```

## GET /V2/{tenantVarCode}/users/{username}

> Returns a specific user

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"Users"}],"paths":{"/V2/{tenantVarCode}/users/{username}":{"get":{"tags":["Users"],"summary":"Returns a specific user","operationId":"GetUserByUsername","parameters":[{"name":"tenantVarCode","in":"path","description":"Tenant Var Code","required":true,"schema":{"type":"string"}},{"name":"username","in":"path","description":"Username","required":true,"schema":{"type":"string"}},{"name":"photo","in":"query","description":"If true, result include Base64 encoded profile picture","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}},"application/json;IEEE754Compatible=false":{"schema":{"$ref":"#/components/schemas/User"}},"application/json;IEEE754Compatible=true":{"schema":{"$ref":"#/components/schemas/User"}},"application/xml":{"schema":{"$ref":"#/components/schemas/User"}},"text/plain":{"schema":{"$ref":"#/components/schemas/User"}},"application/octet-stream":{"schema":{"$ref":"#/components/schemas/User"}},"text/json":{"schema":{"$ref":"#/components/schemas/User"}},"text/xml":{"schema":{"$ref":"#/components/schemas/User"}}}}}}}},"components":{"schemas":{"User":{"type":"object","properties":{"TenantCode":{"type":"string","description":"Tenant Var Code","nullable":true},"Username":{"type":"string","description":"The email address that is used as login","nullable":true},"UserId":{"type":"string","description":"A unique identifier of the user","nullable":true},"Password":{"type":"string","description":"User's password (used for POST, PUT and PATCH only)","nullable":true},"FirstName":{"type":"string","description":"The first name of the user","nullable":true},"LastName":{"type":"string","description":"The last name of the user","nullable":true},"UserRoleId":{"type":"string","description":"The unique identifier for the user role","nullable":true},"IsApproved":{"type":"boolean","description":"A boolean indicating whether user verified his email"},"IsDisabled":{"type":"boolean","description":"A boolean indicating if account is disabled"},"IsPortalEnabled":{"type":"boolean","description":"A boolean indicating if account is enabled for the portal"},"FailedPasswordAttemptCount":{"type":"integer","description":"A number of invalid login attempts in last time window","format":"int32"},"FailedPasswordAttemptWindowStart":{"type":"string","description":"A date and time of last invalid login time window start","format":"date-time","nullable":true},"LastLockoutDate":{"type":"string","description":"A date and time when the account was locked because of too many invalid login attempts","format":"date-time","nullable":true},"LastLoggedIn":{"type":"string","description":"A date and time when the user logged in last time","format":"date-time","nullable":true},"CrossTenantCollections":{"type":"string","description":"String with comma delimited list of cross tenant collection IDs which are assigned to the user","nullable":true},"PinCode":{"type":"string","description":"Pin code for external services","nullable":true},"Timestamp":{"type":"string","description":"Timestamp (UTC) indicating version of record being returned","format":"date-time","nullable":true},"Photo":{"type":"string","description":"Base64 encoded user profile photo. Included in GET request only when photo parameter is specified.","nullable":true},"Notes":{"type":"string","description":"Free form notes that can be added against a user.","nullable":true},"ManagerUserId":{"type":"string","description":"User's manager unique identifier","nullable":true},"Gender":{"type":"string","description":"Valid options are Male, Female, Transgender, Non-Binary, Other","nullable":true},"JobTitle":{"type":"string","description":"Users job title","nullable":true},"EmployeeId":{"type":"string","description":"Users employee Id","nullable":true},"FacilityId":{"type":"string","description":"User's primary facility ID","nullable":true},"SecondaryFacilityIds":{"type":"array","items":{"type":"string"},"description":"List of secondary facility IDs","nullable":true},"ETag":{"type":"string","description":"ETag representing record version","nullable":true},"Tags":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"A dictionary with tags","nullable":true},"CustomFields":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"A dictionary with cutom fields","nullable":true}},"additionalProperties":false}}}}
```

## PUT /V2/{tenantVarCode}/users/{username}

> Updates an existing user

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"Users"}],"paths":{"/V2/{tenantVarCode}/users/{username}":{"put":{"tags":["Users"],"summary":"Updates an existing user","parameters":[{"name":"tenantVarCode","in":"path","description":"Tenant Var Code","required":true,"schema":{"type":"string"}},{"name":"username","in":"path","description":"Username","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"User","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}},"application/json;IEEE754Compatible=false":{"schema":{"$ref":"#/components/schemas/User"}},"application/json;IEEE754Compatible=true":{"schema":{"$ref":"#/components/schemas/User"}},"application/xml":{"schema":{"$ref":"#/components/schemas/User"}},"text/plain":{"schema":{"$ref":"#/components/schemas/User"}},"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/User"}},"text/json":{"schema":{"$ref":"#/components/schemas/User"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/User"}},"text/xml":{"schema":{"$ref":"#/components/schemas/User"}},"application/*+xml":{"schema":{"$ref":"#/components/schemas/User"}}}},"responses":{"200":{"description":"OK"}}}}},"components":{"schemas":{"User":{"type":"object","properties":{"TenantCode":{"type":"string","description":"Tenant Var Code","nullable":true},"Username":{"type":"string","description":"The email address that is used as login","nullable":true},"UserId":{"type":"string","description":"A unique identifier of the user","nullable":true},"Password":{"type":"string","description":"User's password (used for POST, PUT and PATCH only)","nullable":true},"FirstName":{"type":"string","description":"The first name of the user","nullable":true},"LastName":{"type":"string","description":"The last name of the user","nullable":true},"UserRoleId":{"type":"string","description":"The unique identifier for the user role","nullable":true},"IsApproved":{"type":"boolean","description":"A boolean indicating whether user verified his email"},"IsDisabled":{"type":"boolean","description":"A boolean indicating if account is disabled"},"IsPortalEnabled":{"type":"boolean","description":"A boolean indicating if account is enabled for the portal"},"FailedPasswordAttemptCount":{"type":"integer","description":"A number of invalid login attempts in last time window","format":"int32"},"FailedPasswordAttemptWindowStart":{"type":"string","description":"A date and time of last invalid login time window start","format":"date-time","nullable":true},"LastLockoutDate":{"type":"string","description":"A date and time when the account was locked because of too many invalid login attempts","format":"date-time","nullable":true},"LastLoggedIn":{"type":"string","description":"A date and time when the user logged in last time","format":"date-time","nullable":true},"CrossTenantCollections":{"type":"string","description":"String with comma delimited list of cross tenant collection IDs which are assigned to the user","nullable":true},"PinCode":{"type":"string","description":"Pin code for external services","nullable":true},"Timestamp":{"type":"string","description":"Timestamp (UTC) indicating version of record being returned","format":"date-time","nullable":true},"Photo":{"type":"string","description":"Base64 encoded user profile photo. Included in GET request only when photo parameter is specified.","nullable":true},"Notes":{"type":"string","description":"Free form notes that can be added against a user.","nullable":true},"ManagerUserId":{"type":"string","description":"User's manager unique identifier","nullable":true},"Gender":{"type":"string","description":"Valid options are Male, Female, Transgender, Non-Binary, Other","nullable":true},"JobTitle":{"type":"string","description":"Users job title","nullable":true},"EmployeeId":{"type":"string","description":"Users employee Id","nullable":true},"FacilityId":{"type":"string","description":"User's primary facility ID","nullable":true},"SecondaryFacilityIds":{"type":"array","items":{"type":"string"},"description":"List of secondary facility IDs","nullable":true},"ETag":{"type":"string","description":"ETag representing record version","nullable":true},"Tags":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"A dictionary with tags","nullable":true},"CustomFields":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"A dictionary with cutom fields","nullable":true}},"additionalProperties":false}}}}
```

## DELETE /V2/{tenantVarCode}/users/{username}

> Deletes a specific user

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"Users"}],"paths":{"/V2/{tenantVarCode}/users/{username}":{"delete":{"tags":["Users"],"summary":"Deletes a specific user","parameters":[{"name":"tenantVarCode","in":"path","description":"","required":true,"schema":{"type":"string"}},{"name":"username","in":"path","description":"Username","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}}}}
```

## PATCH /V2/{tenantVarCode}/users/{username}

> Patches an existing user

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"Users"}],"paths":{"/V2/{tenantVarCode}/users/{username}":{"patch":{"tags":["Users"],"summary":"Patches an existing user","parameters":[{"name":"tenantVarCode","in":"path","description":"","required":true,"schema":{"type":"string"}},{"name":"username","in":"path","description":"","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Operation"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Operation"}}},"application/json;IEEE754Compatible=false":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Operation"}}},"application/json;IEEE754Compatible=true":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Operation"}}},"application/*+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Operation"}}}}},"responses":{"200":{"description":"OK"}}}}},"components":{"schemas":{"Operation":{"type":"object","properties":{"value":{"nullable":true},"path":{"type":"string","nullable":true},"op":{"type":"string","nullable":true},"from":{"type":"string","nullable":true}},"additionalProperties":false}}}}
```
