Read the workspace configuration
https://api.granska.cloud/v1/configReads this tenant's resolved workspace configuration — profiles, actions and limits in one call.
One call instead of three
This returns your tenant's resolved configuration under a single config key: the profiles it is
licensed for, the actions it may run, and its run limits. It is the same information
GET /v1/profiles, GET /v1/actions and
GET /v1/quotas return one at a time, which is the point — a client that
needs all three at startup makes one request.
"Resolved" means inheritance has already been applied. A tenant inherits from a template and the template from the platform defaults, and none of that is visible here: you get the effective answer, which is the one a job would use.
The remainingRuns figure is a snapshot at the moment of the call. For the quota specifically,
GET /v1/quotas is the endpoint to poll — it returns the period key and the reset instant as well.
curl https://api.granska.cloud/v1/config \
-H "Authorization: Bearer $TOKEN"{
"config": {
"tenantId": "tenant_kommunen",
"type": "B2B",
"availableProfiles": [
{
"id": "lss_utredning",
"name": "LSS-utredning"
}
],
"availableStrategies": [
{
"id": "action_overklagande",
"label": "Överklagandeunderlag"
}
],
"maxRuns": 500,
"remainingRuns": 487,
"periodType": "MONTH",
"maxDocumentBytes": 52428800
}
}The largest document you can upload
maxDocumentBytes is the largest document an analysis can read, in bytes: 50 MB
(52,428,800 bytes). It is the AI model provider's limit on one PDF, not one of your organisation's
limits, so it is the same for every tenant and is not in GET /v1/quotas,
which answers what your plan allows.
Compare a file's size with it before calling POST /v1/upload-url, and
read the number from here rather than writing it into your code. A larger file uploads, but the
analysis refuses it when it reads the document, so the upload is time your user spent for nothing.
What is not in it
Configuration this endpoint returns is the shape of what you may run, never its content: which profiles exist, not the reviewers' prompts; which actions exist, not their templates. Those are authored inside the application and are not part of the public API in either direction.
No parameter selects a different tenant. The token decides which configuration you read, and there is no way to ask for someone else's.
Which profiles are bundles
An entry in availableProfiles that carries memberProfileIds is a bundle: one profile that
reviews a document under the profiles it names. The field is absent on an ordinary profile, so its
presence is what tells the two apart.
The members are logical profile ids, spelled the same way as the id of any other entry — but they
have no entry of their own unless your tenant happens to be licensed for them separately. That is not
a gap: a bundle is licensed as one product, and its members ride on that licence rather than holding
one each. Use the list to show a person what is behind a bundle's name;
GET /v1/actions already expands a bundle on its own when you ask it which
actions fit.
memberProfileNames, on the same entry, names each member for display and licenses nothing.
What one analysis costs
Every entry carries runsPerAnalysis: how many runs one POST /v1/analyze
with it takes from the period. An ordinary profile costs one run per started group of three
reviewers, so 1 to 3 reviewers is 1 and 4 to 6 is 2. A bundle costs one run per member.
Errors
| Error | When |
|---|---|
401UNAUTHORIZED | The Authorization header is missing, is not a readable bearer token, or names no tenant. |
401TOKEN_EXPIRED | The access token was issued by this gateway and has since expired. Not probed: it needs a token older than its own lifetime. |
500INTERNAL_ERROR | An unexpected server-side failure. Not probable from outside — reaching it means something is wrong. |
Send it without writing a client
If your organisation already has an account, an administrator can read the resolved configuration
from the API tester at /admin/api-tester — a quick way to confirm what a newly
issued key can actually reach.