Settings
Manage your account: profile and password, API keys, notification preferences, unit preferences, AI settings, data retention, and your team's members, roles and permissions. Authenticate with a Bearer JWT (see Authentication). A service-account key can call these too, except team members, roles and permissions, API keys, and your own profile and password.
Endpoints
| Method | Path | Description |
|---|---|---|
PATCH | /api/v1/settings/profile | Update your profile |
POST | /api/v1/settings/change-password | Change your password |
POST | /api/v1/settings/logout-other-sessions | Sign out your other devices |
POST | /api/v1/settings/api-keys | Create an API key (Admin) |
GET | /api/v1/settings/api-keys | List API keys |
PATCH | /api/v1/settings/api-keys/{key_id} | Rename a key, or change its expiry, scopes, or role (Admin) |
DELETE | /api/v1/settings/api-keys/{key_id} | Revoke an API key (Admin) |
GET | /api/v1/settings/email-notifications | Get email notification preferences |
PATCH | /api/v1/settings/email-notifications | Update email notification preferences (Admin) |
GET | /api/v1/settings/report-schedule | Get scheduled-report settings |
PATCH | /api/v1/settings/report-schedule | Update scheduled-report settings |
GET | /api/v1/units/supported | List supported units and conversions |
GET | /api/v1/settings/units | Get unit preferences |
PATCH | /api/v1/settings/units | Update unit preferences |
GET | /api/v1/users | List team members (Admin) |
POST | /api/v1/users | Add a team member (Admin) |
POST | /api/v1/users/invite | Invite a team member by email (Admin) |
PATCH | /api/v1/users/{user_id} | Update a team member's details (Admin) |
PUT | /api/v1/users/{user_id}/role | Change a team member's role (Admin) |
DELETE | /api/v1/users/{user_id} | Deactivate a team member (Admin) |
POST | /api/v1/users/{user_id}/reactivate | Reactivate a deactivated member (Admin) |
POST | /api/v1/users/{user_id}/resend-invite | Send a pending member a new invitation (Admin) |
POST | /api/v1/users/{user_id}/send-password-reset | Email a member a password-reset link (Admin) |
POST | /api/v1/users/{user_id}/sign-out | Sign a member out of every device (Admin) |
POST | /api/v1/users/{user_id}/reset-mfa | Turn off a member's two-factor authentication (Admin) |
GET | /api/v1/users/directory | The company's active people, for pickers |
GET | /api/v1/users/{user_id}/permissions | A member's permission overrides and data scope (Admin) |
PUT | /api/v1/users/{user_id}/permissions | Set a member's permission overrides and data scope (Admin) |
GET | /api/v1/settings/roles | List roles |
POST | /api/v1/settings/roles | Create a custom role (Admin) |
PATCH | /api/v1/settings/roles/{key} | Update a role (Admin) |
DELETE | /api/v1/settings/roles/{key} | Delete a custom role (Admin) |
GET | /api/v1/settings/roles/history | Recent changes to roles and permissions (Admin) |
GET | /api/v1/settings/role-permissions | What the operator and viewer roles may open and do (Admin) |
PUT | /api/v1/settings/role-permissions | Change what the operator and viewer roles may open and do (Admin) |
GET | /api/v1/settings/my-permissions | The pages, settings tabs and actions open to you |
GET | /api/v1/settings/ai | The company's AI settings (Admin) |
PATCH | /api/v1/settings/ai | Turn AI on or off, or choose its provider (Admin) |
GET | /api/v1/settings/ai/models | The models a custom AI endpoint offers (Admin) |
POST | /api/v1/settings/admin/retention/run | Apply the data-retention window now (Admin) |
Endpoints marked Admin require an account administrator role.
Profile
Update your profile
PATCH /api/v1/settings/profile
{
"full_name": "Jane Smith",
"email": "jane@example.com",
"current_password": "your-current-password",
"phone": "+1 555 0100",
"timezone": "America/New_York",
"locale": "en-US"
}
Changing your email requires current_password. All fields are optional; send an empty string to clear an optional field.
Change your password
POST /api/v1/settings/change-password
{ "current_password": "old-password", "new_password": "NewSecureP@ss123!" }
Changing your password signs out your other devices and returns a fresh access token so your current device stays signed in.
Sign out other sessions
POST /api/v1/settings/logout-other-sessions
Signs out every other device while keeping the current one signed in.
API keys
API keys authenticate machine-to-machine access: an edge-agent key carries scopes (sending readings, the agent heartbeat, read-only machine and sensor access), and a service-account key acts as a member of your company with a role. The API Keys guide covers both kinds in full.
Create an API key
POST /api/v1/settings/api-keys
{ "name": "edge-agent-prod" }
Optional fields: kind (edge_agent, the default, or service_account), scopes (edge-agent keys; defaults to ingest and agent; the choices are ingest, agent, read:machines and read:sensors, or the single preset names edge_agent and read_only, which is both read scopes; anything else is 422), role (required for a service account), read_only (service accounts; true limits the key to reading, default false), and expires_at.
The response (201 Created) returns the secret once:
{
"id": "...",
"name": "edge-agent-prod",
"key": "<api-key>",
"scopes": ["ingest", "agent"],
"tenant_id": "...",
"created_at": "2026-08-05T10:00:00Z",
"kind": "edge_agent",
"role": null,
"read_only": false
}
The key value is shown only once, at creation. Store it securely; it cannot be retrieved again.
List, change, and revoke
GET /api/v1/settings/api-keys returns your keys with only a masked key_prefix (never the secret), plus scopes, kind, role, read_only, is_active, expires_at, last_used_at, and created_at. PATCH /api/v1/settings/api-keys/{key_id} renames a key or changes its expiry, scopes, role, or (for a service account) read_only. DELETE /api/v1/settings/api-keys/{key_id} revokes a key immediately.
Listing keys needs the API Keys settings tab; creating, changing, and revoking them need the administrator role as well, and are refused (403) while a Haltless administrator is impersonating a user. Creating a service-account key needs the API Access feature (403 without it). Sending role for an edge-agent key, scopes for a service account, or read_only for an edge-agent key is 422. Revoking a service-account key also deactivates its account.
Notification preferences
Email notifications
GET /api/v1/settings/email-notifications returns each toggleable transactional email and whether it is enabled. PATCH accepts a partial map and merges it.
{ "prefs": { "role_changed": true, "password_changed": true } }
Any role can read the preferences. PATCH needs the administrator role and the Notifications settings tab, and an unknown key is 422. The response is the full map.
Scheduled reports
GET / PATCH /api/v1/settings/report-schedule controls automatic report delivery.
{
"report_schedule": "weekly",
"report_emails": ["reports@example.com", "ops@example.com"],
"report_send_at_time": "08:00:00",
"report_send_at_timezone": "Europe/Berlin"
}
report_schedule is daily, weekly, monthly, or null (disabled). report_send_at_time is the local time it goes out (default 08:00:00) and report_send_at_timezone the IANA zone that time is in (default UTC; an unknown zone is 422). A schedule needs at least one recipient, and at most 25 are allowed (422 otherwise). PATCH needs the Notifications settings tab.
The GET response also reports what the schedule has been doing: last_sent_at, next_due_at, report_type, report_days and saved_report_schedules (how many saved reports carry their own schedule). These are read only.
Unit preferences
GET /api/v1/units/supported lists every supported unit and conversion pair plus the defaults. GET / PATCH /api/v1/settings/units reads and updates your account's preferred display units. All three need the Units settings tab.
{ "unit_preferences": { "temperature": "fahrenheit", "pressure": "bar" } }
Team members
Account administrators manage who has access. Every change to team members (add, invite, update, role, deactivate, reactivate and the recovery actions below) is refused while a Haltless administrator is impersonating a user.
Add a team member
POST /api/v1/users
{ "email": "operator@example.com", "password": "TempP@ss123!", "full_name": "John Doe", "role": "operator" }
Invite a team member
POST /api/v1/users/invite creates a pending account and emails an invitation link; the invitee sets their own password to activate.
{ "email": "colleague@example.com", "full_name": "Chris Lee", "role": "viewer" }
Adding and inviting return 201 Created. 409 if the email is already used in your company, and 422 for a role that does not exist.
Change a member's role
PUT /api/v1/users/{user_id}/role
{ "role": "admin" }
Deactivate a member
DELETE /api/v1/users/{user_id} deactivates a member. You cannot deactivate your own account. POST /api/v1/users/{user_id}/reactivate lets them in again and returns the member (200); the member is emailed when the company's account-access email is on.
Help a member who is locked out
Each of these returns 404 for someone outside your company, and none can be called while impersonating.
| Endpoint | What it does | Returns |
|---|---|---|
POST /api/v1/users/{user_id}/resend-invite | Replaces a pending member's invitation with a new one, valid for 72 hours, and emails it. 400 once they have accepted. | 204 |
POST /api/v1/users/{user_id}/send-password-reset | Emails a reset link, valid for 30 minutes, to that member only. Their password stays as it is until they use it. 400 for someone who signs in through SSO. | 204 |
POST /api/v1/users/{user_id}/sign-out | Ends every session the member holds, on every device: each token issued before now is refused. Not for your own account (400); use Sign out other sessions. | 200, the member |
POST /api/v1/users/{user_id}/reset-mfa | Turns off the member's two-factor authentication and deletes their recovery codes, so they sign in with their password and set it up again. They are told by email. Not for your own account (400): turn yours off with a current code (MFA). | 200, the member |
The company directory
GET /api/v1/users/directory lists the company's active people, ordered by name, as the pickers need them: id, full_name and email, and nothing else. Any signed-in member may call it; service accounts are left out of it.
A member's permissions
GET /api/v1/users/{user_id}/permissions returns what is set for one member on top of their role. PUT replaces it whole:
{
"permission_overrides": {
"nav": { "reports": true, "inventory": false },
"settings": { "audit": true },
"actions": { "machines.delete": false }
},
"data_scope": { "group_ids": ["7c9e6679-7425-40de-944b-e07fc1f90ae7"] }
}
permission_overridesmaps pages (nav), settings tabs (settings) and actions (actions) totrueorfalse. A key that is there wins over the role; one left out follows the role. An unknown key is a422. The Users and Role Permissions tabs are for administrators only and cannot be granted.data_scopelimits the member to the machines in those machine groups (and the groups below them).null, or{"all": true}, follows the role's scope.
Administrators always have full access, so overrides for one are refused (400). The change applies from the member's next request and is recorded in the audit log, with what changed.
Roles
Roles bundle a level of access you can assign to team members. GET /api/v1/settings/roles lists the built-in roles and any custom roles you have created, along with how many members hold each.
Create a custom role
POST /api/v1/settings/roles
{ "name": "Line Lead", "base_tier": "operator" }
Give the role a name and a starting access level (admin, operator, or viewer). Use PATCH /api/v1/settings/roles/{key} to rename it and DELETE /api/v1/settings/roles/{key} to remove a custom role.
What the built-in roles may do
GET /api/v1/settings/role-permissions returns, for the operator and viewer roles, the settings tabs and pages each may open and the actions each may take. PUT replaces both:
{
"operator": {
"settings": ["profile", "mfa", "notifications", "units", "alert-rules"],
"nav": ["dashboard", "machines", "alerts", "work-orders", "maintenance"],
"actions": { "machines.delete": false }
},
"viewer": {
"settings": ["profile", "mfa", "units"],
"nav": ["dashboard", "machines", "alerts"],
"actions": {}
}
}
Tabs and pages Haltless does not know are dropped (the response shows what was kept); an unknown action is a 422. An action left out is allowed. Administrators always have everything; custom roles are changed through /api/v1/settings/roles.
Your own permissions
GET /api/v1/settings/my-permissions is open to everyone and returns your own access after your role and overrides: nav and settings (the pages and tabs you may open), actions (each action, true or false), base_tier (admin, operator or viewer) and ai_enabled (whether the company has AI on).
Change history
GET /api/v1/settings/roles/history returns the latest 100 changes to roles and permissions, newest first: creating, changing and deleting roles, and changes to role and member permissions. Each has action, resource_type, resource_id, actor_name, actor_email, details (what changed) and created_at.
AI settings
GET /api/v1/settings/ai returns whether AI features are on and which provider answers them. PATCH changes them:
{
"ai_enabled": true,
"ai_provider": "custom",
"custom_ai_url": "https://llm.example.com/v1",
"custom_ai_model": "llama-3.1-70b"
}
ai_provider is required: platform (Haltless's own provider) or custom (an OpenAI-compatible or Ollama endpoint of your own). A custom provider needs custom_ai_url (up to 512 characters; 422 if it is missing while AI is on). It must be an http or https address that resolves to a public IP address, otherwise 400. custom_ai_model is up to 255 characters. With platform, the URL and model are cleared. Leaving ai_enabled out keeps it as it is.
GET /api/v1/settings/ai/models lists the models a custom endpoint offers, sorted by name: {"models": ["llama-3.1-70b", "mistral-small"]}. Pass probe_url to try an address before saving it; without it, the saved one is used. It answers 502 when the endpoint cannot be reached or lists no models.
These need the administrator role and the AI settings tab. The provider cannot be changed while a Haltless admin is impersonating someone (403): it is where your records are sent to be read.
Data retention
POST /api/v1/settings/admin/retention/run applies your company's retention window now, rather than at the nightly run. Alerts, downtime records and maintenance events older than the window are archived (kept, but no longer shown); sensor readings older than it are deleted. The response counts what was done:
{
"sensor_readings": 120400,
"alerts": 31,
"downtime_records": 12,
"maintenance_events": 4,
"audit_logs": 0,
"password_reset_tokens": 2,
"report_runs": 1,
"tenants_processed": 1,
"tenants_failed": 0
}
Only your company's data is touched, and stored reports past their expiry (report_runs) are your company's alone. The run is recorded in the audit log. Administrator only.