Account
The account endpoint reports which clinic the calling key belongs to, which scopes it carries, and which parts of the API that clinic actually has. It's the simplest way to verify a key works and to discover what it can do before making other calls.
#The account object
| Field | Type | Description |
|---|---|---|
clinic_id | string | The clinic this key belongs to. |
clinic_type | string | The clinic's vertical: dental, vet, or general. Informational — branch on capabilities, not on this. |
scopes | string[] | The scopes this key carries. |
capabilities | object | What this key can use, per part of the API. See below. |
docs_url | string | The OpenAPI document describing this clinic's surface. |
#Capabilities
Each capability reports one of three states for the key you are holding:
| State | Meaning |
|---|---|
active | Callable right now. |
inactive | The clinic has it, but this key lacks the scope. Mint a new key with that scope. |
unsupported | This clinic's vertical does not expose it at all. A new key will not help. |
Branch on capabilities rather than on clinic_type: the type is a label, the capability map is the contract, and it keeps working when a new vertical is added.
#Introspect the current key
GET /v1/me
Requires any valid key - no specific scope.
curl https://api.smile-app.co.il/v1/me \
-H "Authorization: Bearer sk_live_..."
sc whoami
{
"data": {
"clinic_id": "demo",
"clinic_type": "dental",
"scopes": ["patients:read", "appointments:read", "catalog:read"],
"capabilities": {
"patients": "active",
"appointments": "active",
"payments": "inactive",
"animals": "unsupported",
"clients": "unsupported",
"vaccines": "unsupported"
},
"docs_url": "https://api.smile-app.co.il/openapi.json"
}
}
payments is inactive because this clinic has payments but the key was minted without the scope — mint a new one and it becomes callable. The veterinary capabilities are unsupported: this clinic's type does not expose them, so no key will ever reach them.
{
"data": {
"clinic_id": "demo",
"clinic_type": "vet",
"scopes": ["patients:read", "appointments:read", "catalog:read"],
"capabilities": {
"patients": "active",
"appointments": "active",
"animals": "active",
"clients": "active",
"species_catalog": "active",
"vaccines": "inactive",
"measurements": "inactive"
},
"docs_url": "https://api.smile-app.co.il/openapi/vet.json"
}
}
Animals and clients are callable here. vaccines and measurements are inactive rather than unsupported: the clinic has them, but this key was minted without vaccines:read and measurements:read — mint a new one and they become callable.
Use this to fail fast
Call /v1/me at startup to confirm the key is valid and holds the scopes your integration needs - surface a clear configuration error rather than discovering missing scopes through scattered 403s later. It is also how you discover whether a clinic is veterinary without hard-coding anything.