Getting started
Authentication
Every request to the Foundry API carries a key. Here's how to create one, send it, and rotate it safely.
API keys
Create a key from your dashboard or the CLI. Keys are scoped to a project and prefixed so you can tell live from test at a glance — fdry_live_… and fdry_test_….
bash
$ foundry keys create --name ci ✓ created key 'ci' fdry_live_a91f…4c02 (shown once)
Store it once
A live key is shown a single time. Put it straight into a secret manager — never commit it, and never send it to the browser.
Bearer tokens
Send the key as a bearer token in the Authorization header. The same request in three languages:
$ curl https://api.foundry.app/v2/deployments \ -H "Authorization: Bearer $FOUNDRY_KEY"
Rotating keys
Rotate on a schedule, or the moment a key might have leaked. Create the new key first, deploy it, then revoke the old one — zero downtime.
bash
$ foundry keys rotate ci ✓ new key issued · old key valid for 24h
Was this page helpful?
Updated Jul 2026