API Reference Authentication

Authentication Endpoints

5 endpoints for user registration, login, and API key management.

Base URL

How Authentication Works

JWT Bearer Token

Used for auth management endpoints (API key CRUD).

  1. Call POST /v1/auth/login with your credentials
  2. Copy the access_token from the response
  3. Send it as Authorization: Bearer <token>

API Key

Used for all /v1/me/* CRUD endpoints.

  1. Generate a key via POST /v1/auth/api-keys
  2. Copy the raw_key (shown once, starts with rst_)
  3. Send it as X-API-Key: rst_...

For a complete walkthrough, see the Authentication & Setup Guide.

JWT set Key set No credentials set

Authentication

5

Create a new user account

Request Body

FieldTypeDescription
username string Unique username (3-50 chars, alphanumeric)*
email string Valid email address*
password string Password (8-128 chars)*
full_name string Display name (1-200 chars)*

Response

FieldTypeDescription
id uuid User ID*
username string Username*
email string Email address*
full_name string Display name*

                    
                

Request

{
  "username": "hershel",
  "email": "hershel@example.com",
  "password": "secureP@ss123",
  "full_name": "Hershel Moshkovitz"
}

Response 200 OK

{
  "id": "a1b2c3d4-5678-9abc-def0-123456789abc",
  "username": "hershel",
  "email": "hershel@example.com",
  "full_name": "Hershel Moshkovitz"
}

Authenticate and receive a JWT token

Request Body

FieldTypeDescription
username string Your username*
password string Your password*

Response

FieldTypeDescription
access_token string JWT access token*
token_type string Always "bearer"*

                    
                

Request

{
  "username": "hershel",
  "password": "secureP@ss123"
}

Response 200 OK

{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "bearer"
}

Generate a new API key (shown once)

Request Body

FieldTypeDescription
name string Key label (1-100 chars)*

Response

FieldTypeDescription
id uuid Key ID*
name string Key label*
raw_key string Full API key (shown once, starts with rst_)*
prefix string Key prefix for identification*
Requires JWT token — set it in the auth bar above

                    
                

Request

{
  "name": "my-app-key"
}

Response 200 OK

{
  "id": "b2c3d4e5-6789-abcd-ef01-23456789abcd",
  "name": "my-app-key",
  "raw_key": "rst_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5",
  "prefix": "rst_a1b2",
  "is_active": true,
  "created_at": "2026-02-16T10:30:00Z"
}

List all your API keys

Response

FieldTypeDescription
[ ] array Array of APIKeyResponse objects (id, name, prefix, is_active, created_at)*
Requires JWT token — set it in the auth bar above

                    
                

Response 200 OK

[
  {
    "id": "b2c3d4e5-6789-abcd-ef01-23456789abcd",
    "name": "my-app-key",
    "prefix": "rst_a1b2",
    "is_active": true,
    "created_at": "2026-02-16T10:30:00Z"
  }
]

Revoke an API key

Path Parameters

FieldTypeDescription
key_id uuid API key ID to revoke*
Requires JWT token — set it in the auth bar above

                    
                

Response 200 OK

204 No Content