SmileCloudDocs

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

FieldTypeDescription
clinic_idstringThe clinic this key belongs to.
clinic_typestringThe clinic's vertical: dental, vet, or general. Informational — branch on capabilities, not on this.
scopesstring[]The scopes this key carries.
capabilitiesobjectWhat this key can use, per part of the API. See below.
docs_urlstringThe OpenAPI document describing this clinic's surface.

#Capabilities

Each capability reports one of three states for the key you are holding:

StateMeaning
activeCallable right now.
inactiveThe clinic has it, but this key lacks the scope. Mint a new key with that scope.
unsupportedThis 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
curl https://api.smile-app.co.il/v1/me \
  -H "Authorization: Bearer sk_live_..."
sc CLI
sc whoami
json
{
  "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.

json
{
  "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.