Examples
Practical snippets against production hosts. Prefer API Authentication for credential types and REST APIs for route maps.
Health
curl -sS https://api.qefro.com/health
Login (user JWT)
curl -sS -X POST https://api.qefro.com/api/v1/auth/login \
-H 'Content-Type: application/json' \
Store the returned JWT as USER_JWT for subsequent calls.
List billing plans
curl -sS -H "Authorization: Bearer $USER_JWT" \
https://api.qefro.com/api/v1/billing/plans
List workspaces
curl -sS -H "Authorization: Bearer $USER_JWT" \
https://api.qefro.com/api/v1/org/workspaces
Upload a document
curl -sS -X POST -H "Authorization: Bearer $USER_JWT" \
-F "workspace_id=$WORKSPACE_ID" \
https://api.qefro.com/api/v1/documents
Test a Business Tool
curl -sS -X POST \
-H "Authorization: Bearer $USER_JWT" \
-H "Content-Type: application/json" \
https://api.qefro.com/api/v1/tools/$TOOL_ID/test \
-d '{"arguments":{"order_id":"123"}}'
TypeScript — widget identify
// After your app session is established:
widget.identify({
id: user.id,
email: user.email,
auth: {mode: 'jwt', token: userJwt},
});
See Identity Forwarding and SDKs.
Python — authenticated GET
import os
import urllib.request
req = urllib.request.Request(
"https://api.qefro.com/api/v1/billing/plans",
headers={"Authorization": f"Bearer {os.environ['QEFRO_TOKEN']}"},
)
print(urllib.request.urlopen(req).read().decode())
GraphQL (console operations)
curl -sS -X POST https://api.qefro.com/graphql \
-H "Authorization: Bearer $USER_JWT" \
-H "Content-Type: application/json" \
-d '{"query":"{ __typename }"}'
Exact console queries evolve with the Admin Console — use the network tab while clicking UI actions when exploring.
FAQ
Why do I get 401?
Missing/expired user JWT, or using the widget token on an Admin API. See API Authentication.
Why do I get 403?
RBAC — Members cannot call Admin configuration APIs. Use an Owner/Admin JWT.