# User

{% hint style="info" %}
**API SUBPATH**: eva-user
{% endhint %}

## Pagination and Listings

{% openapi src="/files/43xreL8O0lyFAAGBXJzF" path="/org/{orgUUID}/users" method="get" %}
[eva-user-4.7.0.yaml](https://4008706377-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn6zS4HeuuVpRHZEvDiFU%2Fuploads%2FtpCHWQDdbxouUXnUT1CP%2Feva-user-4.7.0.yaml?alt=media\&token=ba2d515c-613a-4f45-83d3-428b9c09ef22)
{% endopenapi %}

## GET /org/{orgUUID}/users/quicksearch

> &#x20;   Searches (greedily) for any User names that exists in an organization,\
> &#x20;   matching the typed term, left-to-right, and returns a list of up to 6 Strings,\
> &#x20;   ordered alphabetically.<br>

```json
{"openapi":"3.0.1","info":{"title":"eva-user API Documentation","version":"4.8.0"},"tags":[{"name":"users","description":"Management for finding, creating, updating and removing User and associating them with Environments and Bots"}],"paths":{"/org/{orgUUID}/users/quicksearch":{"get":{"tags":["users"],"summary":"    Searches (greedily) for any User names that exists in an organization,\n    matching the typed term, left-to-right, and returns a list of up to 6 Strings,\n    ordered alphabetically.\n","operationId":"quicksearch","parameters":[{"name":"x-request-id","in":"header","description":"It is an identifier provided by the API client that will be used to identify distributed logs","required":false,"schema":{"type":"string"}},{"name":"orgUUID","in":"path","description":"It is the organization where the user is, used to filter the user by organization","required":true,"schema":{"type":"string"}},{"name":"name","in":"query","description":"It is the parameter used to search for users related to the entered value","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"It is the max number of result, default value 6","required":false,"schema":{"type":"integer","format":"int32","default":6}}],"responses":{"200":{"description":"Ok","content":{"*/*":{"schema":{"type":"array","items":{"type":"string"}}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"408":{"description":"Request Timeout","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StandardError"},{"$ref":"#/components/schemas/ValidationError"}]}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}}}}}},"components":{"schemas":{"StandardError":{"type":"object","properties":{"timestamp":{"type":"integer","description":"Moment the error happened.","format":"int64"},"errorCode":{"type":"string","description":"It is the identifier of an error."},"errorType":{"type":"string","description":"It is the error type.","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string","description":"It is the error message."},"path":{"type":"string","description":"It is the endpoint that was called."}},"description":"Represents an error that occurred while processing a request."},"ValidationError":{"type":"object","properties":{"timestamp":{"type":"integer","description":"Moment the error happened.","format":"int64"},"errorCode":{"type":"string","description":"It is the identifier of an error."},"errorType":{"type":"string","description":"It is the error type.","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string","description":"It is the error message."},"path":{"type":"string","description":"It is the endpoint that was called."},"details":{"type":"array","items":{"$ref":"#/components/schemas/FieldMessage"}}}},"FieldMessage":{"type":"object","properties":{"fieldName":{"type":"string"},"message":{"type":"string"},"errorCode":{"type":"string"}}}}}}
```

## CRUD Operations

{% openapi src="/files/43xreL8O0lyFAAGBXJzF" path="/org/{orgUUID}/users" method="post" %}
[eva-user-4.7.0.yaml](https://4008706377-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn6zS4HeuuVpRHZEvDiFU%2Fuploads%2FtpCHWQDdbxouUXnUT1CP%2Feva-user-4.7.0.yaml?alt=media\&token=ba2d515c-613a-4f45-83d3-428b9c09ef22)
{% endopenapi %}

{% openapi src="/files/43xreL8O0lyFAAGBXJzF" path="/org/{orgUUID}/users/{userId}" method="get" %}
[eva-user-4.7.0.yaml](https://4008706377-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn6zS4HeuuVpRHZEvDiFU%2Fuploads%2FtpCHWQDdbxouUXnUT1CP%2Feva-user-4.7.0.yaml?alt=media\&token=ba2d515c-613a-4f45-83d3-428b9c09ef22)
{% endopenapi %}

{% openapi src="/files/43xreL8O0lyFAAGBXJzF" path="/org/{orgUUID}/users/{userId}" method="put" %}
[eva-user-4.7.0.yaml](https://4008706377-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn6zS4HeuuVpRHZEvDiFU%2Fuploads%2FtpCHWQDdbxouUXnUT1CP%2Feva-user-4.7.0.yaml?alt=media\&token=ba2d515c-613a-4f45-83d3-428b9c09ef22)
{% endopenapi %}

{% openapi src="/files/43xreL8O0lyFAAGBXJzF" path="/org/{orgUUID}/users/activate" method="put" %}
[eva-user-4.7.0.yaml](https://4008706377-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn6zS4HeuuVpRHZEvDiFU%2Fuploads%2FtpCHWQDdbxouUXnUT1CP%2Feva-user-4.7.0.yaml?alt=media\&token=ba2d515c-613a-4f45-83d3-428b9c09ef22)
{% endopenapi %}

{% openapi src="/files/43xreL8O0lyFAAGBXJzF" path="/org/{orgUUID}/users/{userUuid}" method="delete" %}
[eva-user-4.7.0.yaml](https://4008706377-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn6zS4HeuuVpRHZEvDiFU%2Fuploads%2FtpCHWQDdbxouUXnUT1CP%2Feva-user-4.7.0.yaml?alt=media\&token=ba2d515c-613a-4f45-83d3-428b9c09ef22)
{% endopenapi %}

### Auxiliary Methods

{% hint style="info" %}
If you need to find a User and it's details by it's token, or to retrieve information abour the currently logged in user, this is the method you want.
{% endhint %}

{% openapi src="/files/43xreL8O0lyFAAGBXJzF" path="/org/{orgUUID}/users/identity-provider" method="get" %}
[eva-user-4.7.0.yaml](https://4008706377-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn6zS4HeuuVpRHZEvDiFU%2Fuploads%2FtpCHWQDdbxouUXnUT1CP%2Feva-user-4.7.0.yaml?alt=media\&token=ba2d515c-613a-4f45-83d3-428b9c09ef22)
{% endopenapi %}

## User Configurations

{% openapi src="/files/43xreL8O0lyFAAGBXJzF" path="/org/{orgUUID}/configurations" method="post" %}
[eva-user-4.7.0.yaml](https://4008706377-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn6zS4HeuuVpRHZEvDiFU%2Fuploads%2FtpCHWQDdbxouUXnUT1CP%2Feva-user-4.7.0.yaml?alt=media\&token=ba2d515c-613a-4f45-83d3-428b9c09ef22)
{% endopenapi %}

{% openapi src="/files/43xreL8O0lyFAAGBXJzF" path="/org/{orgUUID}/configurations" method="get" %}
[eva-user-4.7.0.yaml](https://4008706377-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn6zS4HeuuVpRHZEvDiFU%2Fuploads%2FtpCHWQDdbxouUXnUT1CP%2Feva-user-4.7.0.yaml?alt=media\&token=ba2d515c-613a-4f45-83d3-428b9c09ef22)
{% endopenapi %}

{% openapi src="/files/43xreL8O0lyFAAGBXJzF" path="/org/{orgUUID}/configurations/userHasConf" method="get" %}
[eva-user-4.7.0.yaml](https://4008706377-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn6zS4HeuuVpRHZEvDiFU%2Fuploads%2FtpCHWQDdbxouUXnUT1CP%2Feva-user-4.7.0.yaml?alt=media\&token=ba2d515c-613a-4f45-83d3-428b9c09ef22)
{% endopenapi %}

{% openapi src="/files/43xreL8O0lyFAAGBXJzF" path="/org/{orgUUID}/configurations/{botUUID}" method="get" %}
[eva-user-4.7.0.yaml](https://4008706377-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn6zS4HeuuVpRHZEvDiFU%2Fuploads%2FtpCHWQDdbxouUXnUT1CP%2Feva-user-4.7.0.yaml?alt=media\&token=ba2d515c-613a-4f45-83d3-428b9c09ef22)
{% endopenapi %}

{% openapi src="/files/43xreL8O0lyFAAGBXJzF" path="/org/{orgUUID}/configurations/{botUUID}/userHasConf" method="get" %}
[eva-user-4.7.0.yaml](https://4008706377-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn6zS4HeuuVpRHZEvDiFU%2Fuploads%2FtpCHWQDdbxouUXnUT1CP%2Feva-user-4.7.0.yaml?alt=media\&token=ba2d515c-613a-4f45-83d3-428b9c09ef22)
{% endopenapi %}

## Bulk Operations

### Bulk Create

This endpoint is responsible for the mass creation of users, through a csv file, with each line containing the following data, as follows:

```
email;name;company;role;password;environmentUuid;environmentName;bot
```

* Email: Email of the user being created.
* Name: Name of the user being created
* Company: It is company name
* Password: The user's starting password.
* Role: The Role assigned to each user.
* EnvironmentUuid: Id of the environment that will be attached to role (viewer,  editor or supervisor)
* EnvironmentName: Environment Name
* Bot: Bot uuid that will be attached to environment reported in the column "EnvironmentUuid"

{% hint style="info" %}
A few rules to note:

* User emails must be unique There may be no other user with the same email in a whole organization.
* A user may only have one role.
* The password must follow the designated Keycloak policies (By standard, at least one uppercase character, a lowercase character, a special or numeral and it must have a minimum of 6 characters)
* When creating common users (viewer or editor) the environmentUuid, environmentName, and bot fields are mandatory
* When creating a supervisor user the environmentUuid and environmentName fields are mandatory
* The role column must be one of the following values: ADMIN, SUPERVISOR, EDITOR or VIEWER; and cannot be a null value.
* EnvironmentUuid, environmentName, and bot must exist in the database, be active and be related
  {% endhint %}

The request is a Multipart Form POST with a property "file" where its value will be the csv file to be processed.

{% openapi src="/files/43xreL8O0lyFAAGBXJzF" path="/org/{orgUUID}/users/bulk-create" method="post" %}
[eva-user-4.7.0.yaml](https://4008706377-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn6zS4HeuuVpRHZEvDiFU%2Fuploads%2FtpCHWQDdbxouUXnUT1CP%2Feva-user-4.7.0.yaml?alt=media\&token=ba2d515c-613a-4f45-83d3-428b9c09ef22)
{% endopenapi %}

If at least a single user was created, you'll receive a 200 success response, with a list of errors for whichever users failed to be created. Along with their emails, a message will inform the triggering issue, as follows:

```
{
    "errors":[
        {...},
        {
            "example@email.com": "triggering cause of error message"
        }
        {...}
    ]
}
```

{% openapi src="/files/43xreL8O0lyFAAGBXJzF" path="/org/{orgUUID}/users/bulk-delete" method="delete" %}
[eva-user-4.7.0.yaml](https://4008706377-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn6zS4HeuuVpRHZEvDiFU%2Fuploads%2FtpCHWQDdbxouUXnUT1CP%2Feva-user-4.7.0.yaml?alt=media\&token=ba2d515c-613a-4f45-83d3-428b9c09ef22)
{% endopenapi %}

{% openapi src="/files/43xreL8O0lyFAAGBXJzF" path="/org/{orgUUID}/users/bulk-permissions" method="post" %}
[eva-user-4.7.0.yaml](https://4008706377-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn6zS4HeuuVpRHZEvDiFU%2Fuploads%2FtpCHWQDdbxouUXnUT1CP%2Feva-user-4.7.0.yaml?alt=media\&token=ba2d515c-613a-4f45-83d3-428b9c09ef22)
{% endopenapi %}

{% openapi src="/files/43xreL8O0lyFAAGBXJzF" path="/org/{orgUUID}/users/bulk-permissions" method="delete" %}
[eva-user-4.7.0.yaml](https://4008706377-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn6zS4HeuuVpRHZEvDiFU%2Fuploads%2FtpCHWQDdbxouUXnUT1CP%2Feva-user-4.7.0.yaml?alt=media\&token=ba2d515c-613a-4f45-83d3-428b9c09ef22)
{% endopenapi %}


---

# 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-conversational-ai.syntphony.com/api-docs/api-guidelines/management-api/admin-api/user.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.
