Skip to content
getgeolens.com

Create User

POST
/admin/users/
curl --request POST \
--url https://example.com/admin/users/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "username": "example", "password": "example", "email": "hello@example.com", "role": "viewer" }'

Create a new user with the specified role (admin only).

Media type application/json
AdminUserCreate
object
username
required
Username

Login username (3-150 chars). Must be unique across the system.

string
>= 3 characters <= 150 characters
password
required
Password

Initial password (policy: min 12 chars, 3+ character classes). The user can change this after first login.

string
>= 8 characters <= 256 characters
email
Any of:
string format: email
<= 255 characters
role
Role

User role: ‘admin’, ‘editor’, or ‘viewer’. Defaults to ‘viewer’.

string
default: viewer

Successful Response

Media type application/json
UserResponse
object
id
required
Id
string format: uuid
username
required
Username
string
email
required
Any of:
string
is_active
required
Is Active
boolean
status
required
Status

Account status: active, pending, suspended, or deactivated.

string
Allowed values: active pending suspended deactivated
last_login_at
required
Any of:
string format: date-time
created_at
required
Created At
string format: date-time
roles
required
Roles

Assigned role names, e.g. [‘admin’, ‘editor’]

Array<string>
quota_usage
Any of:
UserQuotaUsage

Per-user quota usage: current consumption vs configured caps.

object
bytes_used
required
Bytes Used
integer
dataset_count
required
Dataset Count
integer
storage_cap
required
Storage Cap
integer
count_cap
required
Count Cap
integer
Example
{
"status": "active"
}

Bad request — invalid query parameters or payload

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Unauthorized — missing or invalid credentials

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Forbidden — caller lacks access to this resource

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Not found

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Conflict — resource state prevents the operation

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Validation error

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Too many requests — retry after the advertised interval

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}
Retry-After
integer

Seconds until the request may be retried

Internal server error

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Service unavailable — the database could not serve the request

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}