API keys

An API key is how a service acts for your organization. Admins create and revoke keys on the Keys page, in Settings.

  • A spender key reserves and settles spend, and reads meters, prices, budgets, and spend. Give one to each service that calls a paid API.
  • A manager key also defines apps, meters, prices, and budgets, for a service that sets them up itself, such as a deploy script.

No key can see or manage other keys.

A key's app

A key belongs to one app, or to none. Every reservation the key makes is its app's, counted by the app's budgets and the organization's. A key without an app spends against the organization's budgets alone. A key's app is chosen when it is created and can't change: to move a service to another app, give it a new key.

A key's environment

A key spends in one environment, such as production or staging: production, unless you name another when you create it. Every reservation the key makes is in that environment, counted by budgets for it and by budgets for every environment. Like its app, a key's environment can't change, so give a service one key for each place it runs.

Secrets

A key's secret starts with tg_. Tidegate shows it once, when the key is created, and keeps only a hash of it: copy it straight into the service's secret store. If it's lost, create a new key.

Keys never expire. The Keys page shows when each was last used, which helps find keys nothing uses anymore.

Rotating a key

Create the new key, deploy it to the service, then revoke the old one. Revoking takes effect immediately: the service's next call with the old key is refused.