Getting Started
Authentication
GoSmarter API supports two authentication methods.
| Method | Header | Best for |
|---|---|---|
| API key | GoSmarter-Api-Key: zpka_... | Scripts, CI/CD, server-to-server, automation |
| Bearer token | Authorization: Bearer eyJ... | Interactive apps, user-delegated access |
API keys
Code
See the API Keys guide for creating, rotating, and revoking keys.
Bearer tokens (Clerk)
GoSmarter uses Clerk for user authentication. Bearer tokens are Clerk session JWTs issued after sign-in.
Getting a token (machine-to-machine)
For server-side integrations, use Clerk's machine authentication. Contact your GoSmarter administrator for credentials.
Getting a token (interactive / developer portal)
Sign in to this portal using the Sign in button. Once authenticated, the portal injects your session token automatically into API explorer requests.
Using the token
Code
Code examples
JavaScript / Node.js
Code
Python
Code
Troubleshooting
401 Unauthorized
- API key: verify the key is valid — visit Settings → API Keys in this portal
- Bearer token: the token may have expired; Clerk session tokens are short-lived, fetch a fresh one
- Check the header name is exact:
GoSmarter-Api-KeyorAuthorization: Bearer <token>
401 Unauthorized — "API key metadata is missing userId"
- Delete and recreate the key from Settings → API Keys.
403 Forbidden
- Your account may not have access to the requested company. Contact your administrator.
Last modified on

