Authentication

Every request carries your API key as a bearer token.

Authorization: Bearer stilo_sk_...

Getting a key

Any active stilo Creator can create keys in Configuración › API. Creating your first key means accepting the API terms of use. You can hold up to 10 active keys, for example one per project, so you can revoke one without breaking the others.

  • Keys never expire unless you choose 90 or 365 days when you create them.
  • You see a key once. stilo only stores a fingerprint, so a lost key can't be recovered: create a new one.
  • Revoking a key stops it immediately.

Scopes

Give each key only what it needs.

ScopeAllows
catalog:readBrands, products and URL lookups.
links:readListing and reading your links.
links:writeCreating and deactivating links.
reports:readYour clicks, sales, commissions and payouts (coming soon).

A key without the scope an endpoint needs gets 403 insufficient_scope.

Keeping keys safe

  • Use the key only from a server or script. The API sends no CORS headers, so browsers can't call it directly, and a key in a web page is visible to anyone.
  • Store it in an environment variable or a secrets manager, never in your code or a repository.
  • If a key is pushed to a public GitHub repository, we revoke it automatically.
A key can only read your own data and create links to stilo stores. It can't sign in to your account, change your settings or reach your payouts.

Authentication errors

StatustypeMeaning
401authentication_requiredNo Authorization header.
401invalid_api_keyMalformed, revoked or expired key.
403access_revokedAPI access for your account is blocked. Write to contacto@stilo.io.
403account_not_eligibleYour stilo account is not an active Creator account.
403insufficient_scopeThe key lacks the scope this endpoint needs.