Skip to content

Authentication

The Stocksmith API authenticates with personal API keys passed as a Bearer token.

Go to Settings → API Keys in Stocksmith and create a key. Copy it immediately — the full key (live_…) is shown only once; after that only a masked form is displayed. Keys are managed by the account’s primary user.

API access is currently in beta and is enabled per account, independent of plan. Requests from an account without access return 403 with API access is not enabled for this account.

Pass the key in the Authorization header:

Terminal window
curl https://api.stocksmith.io/api/v1/materials \
-H "Authorization: Bearer live_your_key_here"

A missing or malformed header returns 401 with Missing or invalid Authorization header. Expected: Bearer <token>. An unrecognized or revoked key returns 401 with Invalid or revoked API key.

API keys act on behalf of the user that created them, and that user’s permissions carry through to the API: view-only users receive responses with financial fields (costs, prices) omitted.