Client API Overview
The surface a customer uses on their own account, and the ways it deliberately differs from the admin one.
Overview
The client API lets a customer drive their own account from their own code: read services, pay an invoice, order a domain, open a ticket. The key belongs to the customer, not to you, and the customer issues it from their account.
Everything it reaches is bounded to that one account. The scope is not a filter you remember to apply; it comes from the key and cannot be widened by anything in the request.
It is a separate product from the admin surface, not a restricted view of it. Different address, different kind of key, and a shorter catalogue built from what a customer can actually do in their panel.
Prerequisites
- A customer account on the installation, and a client key issued from
/api-credentialsin that account. - The base address
/api/v1/client. An admin key sent here is refused, and so is a client key sent to the admin surface.
Structure
Four things behave differently here, and knowing them up front saves reading two catalogues side by side.
404, exactly like a record that does not exist. The two are never distinguished, so a key cannot probe for its neighbours.
{amount, currency} rather than a formatted string, and dates as YYYY-MM-DD or null. Formatting is yours to do.
What Stays in the Panel
Some account work has no endpoint at all, and that is a boundary rather than a gap. Card storage needs the payment provider's own hosted flow. Changing a password or an email address needs a one-time code. Two-factor setup and identity documents need a person. Data-deletion requests are a legal decision.
Their state is still readable, so an integration can tell whether an account is verified without being able to verify it.
Example
curl -H 'Authorization: Bearer wck_...' \
'https://panel.example.com/api/v1/client/whoami'
# {"data":{"id":3,"type":"client","owner_id":42,"permissions":["Services/*"]}}
curl -H 'Authorization: Bearer wck_...' \
'https://panel.example.com/api/v1/client/services?limit=10'
Pitfalls
Serving many customers from one integration means one key per customer, each issued by that customer. If you need to act across accounts, that is the admin surface. Collecting customers' keys to fake it is a liability you do not want to hold.
Ordering and paying accept the account balance or a card the customer already saved. Gateway flows that need a redirect, an iframe or a 3-D Secure step belong to the panel. A declined card still answers 200 with a failed payment on it, so read the payment status, not only the HTTP code.
Related Articles
Thanks for your feedback!
Our support team is here around the clock for anything you can't find above.