Skip to content

Users API

Manage users and permissions.

WARNING

User management endpoints require admin privileges.

List Users

http
GET /api/v1/users

Response

json
{
  "data": [
    {
      "id": "usr_abc123",
      "username": "john",
      "email": "john@example.com",
      "role": "developer",
      "created_at": "2025-01-15T10:00:00Z",
      "last_login": "2025-01-15T12:00:00Z"
    }
  ]
}

Get User

http
GET /api/v1/users/:id

Create User

http
POST /api/v1/users

Request Body

json
{
  "username": "jane",
  "email": "jane@example.com",
  "password": "secure-password",
  "role": "developer"
}

Roles

RoleDescription
adminFull access to all features
developerDeploy, view services, manage alerts
viewerRead-only access

Update User

http
PATCH /api/v1/users/:id

Delete User

http
DELETE /api/v1/users/:id

Get Current User

http
GET /api/v1/users/me

Update Password

http
POST /api/v1/users/me/password
json
{
  "current_password": "old-password",
  "new_password": "new-secure-password"
}

API Keys

List API Keys

http
GET /api/v1/users/me/api-keys

Create API Key

http
POST /api/v1/users/me/api-keys
json
{
  "name": "CI/CD Key",
  "scopes": ["read", "deploy"],
  "expires_at": "2025-12-31T23:59:59Z"
}

Revoke API Key

http
DELETE /api/v1/users/me/api-keys/:id

Released under the MIT License.