Skip to main content

Auth and Institutions

Request login nonce

POST /api/v1/auth/nonce/

{
"wallet_address": "0x..."
}

Response includes the normalized wallet, nonce, exact message to sign and expiry.

Verify wallet signature

POST /api/v1/auth/verify/

{
"wallet_address": "0x...",
"nonce": "...",
"signature": "0x..."
}

A valid response returns access and refresh JWTs plus the account record.

Current account

GET /api/v1/auth/me/

Institutions

GET /api/v1/institutions/
POST /api/v1/institutions/
GET /api/v1/institutions/{id}/

Create fields:

{
"name": "Example Institution",
"notification_email": "payroll@example.com",
"treasury_address": "0x...",
"tax_vault_address": "0x..."
}

On-chain registration

POST /api/v1/institutions/{id}/registration/prepare/
POST /api/v1/institutions/{id}/registration/confirm/

Confirm body:

{
"prepared_transaction_id": "uuid",
"tx_hash": "0x..."
}

Role changes

POST /api/v1/institutions/{id}/roles/{role}/prepare/
POST /api/v1/institutions/{id}/roles/confirm/

Supported roles are defined by the backend institution-member model and enforced by route permissions.

Employees

GET /api/v1/employees/?institution_id={id}
POST /api/v1/employees/
PATCH /api/v1/employees/{id}/status/

Create fields include institution_id, auth_wallet, optional name and optional email. Employee private fields are encrypted through the backend's private-field handling.