PrimebrickPrimebrick
  • Primebrick.dev
  • GitHub
  • Documentation
  • Services
  • Libraries
  • API Catalog
Resources
  • Landing Page
  • API Catalog
  • GitHub
PrimebrickPrimebrick

© 2026 Primebrick. MIT License.

github
Information
Customers
    Get customer UI metadatagetList customersgetCreate customerpostGet customer detailget
Organizations
    Get organization UI metadatagetList organizationsgetCreate organizationpostGet organization detailget
Authentication
    Login with username and passwordpostRefresh access token using refresh token cookiepostGet current user profilegetUpdate current user profilepatch
Schemas
powered by Zudoku
Primebrick API
Primebrick API

Authentication

Download schema

Login, token refresh, and user profile endpoints


Login with username and password

POST
/api/v1/auth/login

Login with username and password › Request Body

LoginBody
username
​string · required
password
​string · required

Login with username and password › Responses

Login successful

LoginResponse
success
​boolean · required
​User · required
POST/api/v1/auth/login
fetch('/api/v1/auth/login', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ username: 'username', password: 'password' }) })
Example Request Body
{ "username": "username", "password": "password" }
json
Example Responses
{ "success": true, "user": { "username": "username", "display_name": "display_name", "email": "test@example.com", "organization": "organization", "expires_at": 0, "roles": [ { "name": "name", "display_name": "display_name", "owner": "owner" } ] } }
json
application/json

Refresh access token using refresh token cookie

POST
/api/v1/auth/refresh

Refresh access token using refresh token cookie › Responses

Token refreshed successfully

LoginResponse
success
​boolean · required
​User · required
POST/api/v1/auth/refresh
fetch('/api/v1/auth/refresh', { method: 'POST' })
Example Responses
{ "success": true, "user": { "username": "username", "display_name": "display_name", "email": "test@example.com", "organization": "organization", "expires_at": 0, "roles": [ { "name": "name", "display_name": "display_name", "owner": "owner" } ] } }
json
application/json

Get current user profile

GET
/api/v1/auth/me

Get current user profile › Responses

OK

UserProfile
uuid
​string · uuid · required
idp_code
​string · required
email
​string · email · required
display_name
​string · required
created_at
​string · date-time · required
updated_at
​string · date-time · required
version
​integer · required
idp_org
​string
idp_username
​string
avatar_color
​string · pattern: ^#[0-9A-Fa-f]{6}$
avatar_initials
​string
is_active
​boolean
is_admin
​boolean
roles
​string[]
created_by
​string
created_by_name
​string
updated_by
​string
updated_by_name
​string
deleted_at
​string · date-time
deleted_by
​string
deleted_by_name
​string
GET/api/v1/auth/me
fetch('/api/v1/auth/me')
Example Responses
{ "uuid": "00000000-0000-0000-0000-000000000000", "idp_code": "idp_code", "idp_org": "idp_org", "idp_username": "idp_username", "email": "test@example.com", "display_name": "display_name", "avatar_color": "avatar_color", "avatar_initials": "avatar_initials", "is_active": true, "is_admin": true, "roles": [ "string" ], "created_at": "2024-08-25T15:00:00Z", "created_by": "created_by", "created_by_name": "created_by_name", "updated_at": "2024-08-25T15:00:00Z", "updated_by": "updated_by", "updated_by_name": "updated_by_name", "version": 0, "deleted_at": "2024-08-25T15:00:00Z", "deleted_by": "deleted_by", "deleted_by_name": "deleted_by_name" }
json
application/json

Update current user profile

PATCH
/api/v1/auth/me

Update current user profile › Request Body

UserProfileUpdateBody
display_name
​string
email
​string · email
avatar_color
​string · pattern: ^#[0-9A-Fa-f]{6}$
avatar_initials
​string

Update current user profile › Responses

Profile updated successfully

UserProfile
uuid
​string · uuid · required
idp_code
​string · required
email
​string · email · required
display_name
​string · required
created_at
​string · date-time · required
updated_at
​string · date-time · required
version
​integer · required
idp_org
​string
idp_username
​string
avatar_color
​string · pattern: ^#[0-9A-Fa-f]{6}$
avatar_initials
​string
is_active
​boolean
is_admin
​boolean
roles
​string[]
created_by
​string
created_by_name
​string
updated_by
​string
updated_by_name
​string
deleted_at
​string · date-time
deleted_by
​string
deleted_by_name
​string
PATCH/api/v1/auth/me
fetch('/api/v1/auth/me', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ display_name: 'display_name', email: 'test@example.com', avatar_color: 'avatar_color', avatar_initials: 'avatar_initials' }) })
Example Request Body
{ "display_name": "display_name", "email": "test@example.com", "avatar_color": "avatar_color", "avatar_initials": "avatar_initials" }
json
Example Responses
{ "uuid": "00000000-0000-0000-0000-000000000000", "idp_code": "idp_code", "idp_org": "idp_org", "idp_username": "idp_username", "email": "test@example.com", "display_name": "display_name", "avatar_color": "avatar_color", "avatar_initials": "avatar_initials", "is_active": true, "is_admin": true, "roles": [ "string" ], "created_at": "2024-08-25T15:00:00Z", "created_by": "created_by", "created_by_name": "created_by_name", "updated_at": "2024-08-25T15:00:00Z", "updated_by": "updated_by", "updated_by_name": "updated_by_name", "version": 0, "deleted_at": "2024-08-25T15:00:00Z", "deleted_by": "deleted_by", "deleted_by_name": "deleted_by_name" }
json
application/json

Organizations