Client and User Creation
In this system, both clients and users are created exclusively by the Master user. This ensures strict control over who can interact with the Smart Search API and under what context.
✅ Creating a Client
To create a new client, the Master user sends a POST request to the /client endpoint.
Endpoint:
POST /clientRequest Body:
{
"username": "<MASTER_USERNAME>",
"password": "<MASTER_PASSWORD>",
"client_name": "example_company"
}username: Master username (from environment variableMASTER_USERNAME)password: Master password (from environment variableMASTER_PASSWORD)client_name: Desired name of the new client (e.g., company or application name)
Sample Response:
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"api_key": "string",
"is_active": true,
"created_at": "2019-08-24T14:15:22Z"
}✅ Creating a User
Users are tied to a specific client. In Smart Search, the client to which users are assigned is fixed and defined via environment variables.
To create a new user, the Master user sends a POST request to the /user endpoint.
Endpoint:
Request Body:
username: Master username (from environment variableMASTER_USERNAME)password: Master password (from environment variableMASTER_PASSWORD)identifier: Unique string that will identify the user and be used for token generation
Sample Response:
ℹ️ Note: Users created via the /user endpoint are automatically assigned to a fixed client. The client context is configured via environment variables and is not part of the request body.
Last updated
