Users
List the users the caller's organization can name, with pagination.
users is deployment-global and has no organization column, so which of them this organization can name is derived: a key, usage, or a roster row puts one in reach, and one reached from nowhere at all (the shared default owner, or a user just created) is shared rather than hidden. See repositories.users_repository.in_organization.
parent_user_id with external_id finds the end user a service key created for a user value, which is how a caller maps its own ids to Otari's. include_total adds an Otari-Total-Count header counting every match, so limit=1 with it counts a service key's end users.
Enter your API key here (sent as Otari-Key header).
0100Only the end users of this owner: the user a service key belongs to.
Only the end user a service key names with this user value.
Only blocked users (true) or only unblocked ones (false).
Also count every matching user, in the Otari-Total-Count response header.
falseSuccessful Response
Response model for user information.
Validation Error
GET /api/v1/users HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
[
{
"alias": "text",
"allowed_models": [
"text"
],
"allowed_tools": [
"text"
],
"blocked": true,
"budget_id": "text",
"budget_started_at": "text",
"created_at": "text",
"current_requests": 1,
"current_tokens": 1,
"external_id": "text",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"next_budget_reset_at": "text",
"parent_user_id": "text",
"reserved": 1,
"reserved_requests": 1,
"reserved_tokens": 1,
"spend": 1,
"updated_at": "text",
"user_id": "text"
}
]Create a new user.
Enter your API key here (sent as Otari-Key header).
Request model for creating a new user.
Optional admin-facing alias
Default model access-list this user's keys inherit; null = unrestricted, [] = deny all
Default tool access-list this user's keys inherit, for POST /api/v1/search and /api/v1/fetch: null = the search tools allowed_models grants, [] = no tool, or search and fetch tool names ('*' for every tool).
Whether user is blocked
falseOptional budget ID
Unique user identifier
Successful Response
Response model for user information.
Validation Error
POST /api/v1/users HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 169
{
"alias": "text",
"allowed_models": [
"text"
],
"allowed_tools": [
"text"
],
"blocked": false,
"budget_id": "text",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"user_id": "text"
}{
"alias": "text",
"allowed_models": [
"text"
],
"allowed_tools": [
"text"
],
"blocked": true,
"budget_id": "text",
"budget_started_at": "text",
"created_at": "text",
"current_requests": 1,
"current_tokens": 1,
"external_id": "text",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"next_budget_reset_at": "text",
"parent_user_id": "text",
"reserved": 1,
"reserved_requests": 1,
"reserved_tokens": 1,
"spend": 1,
"updated_at": "text",
"user_id": "text"
}Get details of a user in the caller's organization.
Enter your API key here (sent as Otari-Key header).
Successful Response
Response model for user information.
Validation Error
GET /api/v1/users/{user_id} HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
"alias": "text",
"allowed_models": [
"text"
],
"allowed_tools": [
"text"
],
"blocked": true,
"budget_id": "text",
"budget_started_at": "text",
"created_at": "text",
"current_requests": 1,
"current_tokens": 1,
"external_id": "text",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"next_budget_reset_at": "text",
"parent_user_id": "text",
"reserved": 1,
"reserved_requests": 1,
"reserved_tokens": 1,
"spend": 1,
"updated_at": "text",
"user_id": "text"
}Update a user in the caller's organization.
Enter your API key here (sent as Otari-Key header).
Request model for updating a user.
Successful Response
Response model for user information.
Validation Error
PATCH /api/v1/users/{user_id} HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 151
{
"alias": "text",
"allowed_models": [
"text"
],
"allowed_tools": [
"text"
],
"blocked": true,
"budget_id": "text",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}{
"alias": "text",
"allowed_models": [
"text"
],
"allowed_tools": [
"text"
],
"blocked": true,
"budget_id": "text",
"budget_started_at": "text",
"created_at": "text",
"current_requests": 1,
"current_tokens": 1,
"external_id": "text",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"next_budget_reset_at": "text",
"parent_user_id": "text",
"reserved": 1,
"reserved_requests": 1,
"reserved_tokens": 1,
"spend": 1,
"updated_at": "text",
"user_id": "text"
}Delete a user in the caller's organization, and erase their telemetry and agent traces.
Enter your API key here (sent as Otari-Key header).
Successful Response
No content
Validation Error
DELETE /api/v1/users/{user_id} HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
No content
Get usage history for a user in the caller's organization.
Enter your API key here (sent as Otari-Key header).
0100Successful Response
Response model for usage log.
Validation Error
GET /api/v1/users/{user_id}/usage HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
[
{
"api_key_id": "text",
"completion_tokens": 1,
"cost": 1,
"endpoint": "text",
"error_message": "text",
"id": "text",
"latency_ms": 1,
"model": "text",
"prompt_tokens": 1,
"provider": "text",
"provider_latency_ms": 1,
"status": "text",
"timestamp": "text",
"total_tokens": 1,
"user_id": "text"
}
]Last updated
Was this helpful?
