Skip to content

Working in a client account

There is no separate partner API for building a client’s monitoring. You use the ordinary API, with one extra header:

Terminal window
curl https://api.siteqwality.com/http/jobs \
-H "Authorization: Bearer $SESSION_JWT" \
-H "X-SQ-Account: $CLIENT_ACCOUNT_ID"

That request lists the client’s monitors. Creating, updating, deleting, querying logs, building a status page, setting notification rules: every endpoint behaves as though you were signed in as that client.

In the dashboard the same thing happens when you open a client from the Clients page. A banner shows which client you are in, and leaving it puts you back on your own account.

What the header changes, and what it does not

Section titled “What the header changes, and what it does not”
ChangesStays yours
Which account the request reads and writesWho you are, and your role
Quotas, entitlements and feature gatesThe audit trail’s record of who acted

Every change you make inside a client is recorded in that client’s audit log, attributed to you as a partner rather than to one of the client’s own users. Your client can see exactly what you did on their behalf, which is the point.

CredentialMay send X-SQ-Account
Dashboard sessionyes
M2M clientyes
API keyno

API keys are excluded on purpose. A key created before scopes existed carries no scope list and is unrestricted by design, so honouring the header on API keys would silently hand every one of those older keys the run of your entire client base. Use a session, or an M2M client with the scopes it needs.

Five prefixes return 404 while you are in client context:

PrefixWhy
/accountTeam, roles, invitations and SSO are identity-provider operations, and your session is minted against your organization. Honouring them here would edit your own team while appearing to edit the client’s.
/authSame reason, for the one authenticated route under it.
/billingA client has no payment method. Their entitlements come from the bundle you set.
/partnerA client managing clients would be a third level. There are two.
/adminInternal staff surface, not customer API.

Inviting a client’s own user to their account is on the roadmap and is the one real gap in this list today. If you need it now, tell us and we will do it for you.

A wrong X-SQ-Account value never returns 401 or 403. An unknown account id, an account that is not yours, a client you removed and a malformed uuid are all the same 404 with no detail.

Two reasons. Account ids must not be probeable: a distinguishable response would let anyone with a partner account test whether an id exists. And practically, dashboards treat 401 as “your session expired” and silently refresh or sign you out, so a mistyped id would log you out instead of showing an error.

Client stateReadsWrites
Liveyesyes
Suspendedyes403
Removed404404

A suspended client stays readable so you can see what you have and export it. If your partner account is suspended, your clients are suspended too, and the same rule applies to every one of them.