Management API
Everything in the dashboard is also available over REST at https://webknx.com/api/v1. Both use the same rules, validation and permissions.
Authentication
Create a personal access token in Settings โ Access tokens and send it as a bearer token. The token acts as you, with your permissions in each workspace.
curl https://webknx.com/api/v1/workspace \
-H "Authorization: Bearer $WEBKNX_ACCESS_TOKEN" \
-H "X-Workspace-Id: 01j...."
X-Workspace-Id selects the workspace; without it your current workspace is used. Asking for a workspace you do not belong to returns 403.
Conventions
- Successful responses:
{"data": ..., "meta": {"request_id": "..."}}. - Lists are paginated with
?page=and?per_page=(max 100);meta.paginationhas the totals. - Errors follow the error format. Resources outside your workspace return
404. - Billing mutations accept an
Idempotency-Keyheader; repeating a request with the same key returns the original result.
Endpoints
| Area | Endpoints |
|---|---|
| Workspaces | GET/PATCH /workspace, GET/POST /workspaces, POST /workspaces/{id}/switch |
| Team | GET /members, GET/POST /members/invitations, POST /members/invitations/{id}/resend, DELETE /members/invitations/{id}, PATCH/DELETE /members/{id} |
| Roles | GET/POST /roles, GET/PATCH/DELETE /roles/{id}, PUT /roles/{id}/permissions, GET /permissions |
| API keys | GET/POST /api-keys, GET/PATCH /api-keys/{id}, POST /api-keys/{id}/rotate, POST /api-keys/{id}/revoke |
| Billing | GET /billing/balance, GET /billing/plans, GET /billing/subscription, POST /billing/checkout, POST /billing/subscription/change, POST /billing/subscription/cancel, POST /billing/credits/purchase, GET /billing/transactions |
| Usage | GET /usage, GET /usage/{request_id} |
| Invoices | GET /invoices, GET /invoices/{id}, GET /invoices/{id}/download |
| Services | GET /services, GET /services/{slug}, GET /services/{slug}/operations, GET /services/{slug}/openapi, GET /services/{slug}/pricing |
The full contract is in the management OpenAPI document.