Keys / Fastly

FASTLY_API_TOKEN

The Fastly API token the Fastly CLI and your scripts call the Fastly API with.

Expires
90 days by default; you choose a date or never
API
create, list and revoke

Get it

Create one on manage.fastly.com/account/personal/tokens. The steps aren't recorded yet.

Set it

FASTLY_API_TOKEN=...

The Fastly CLI reads it; elsewhere, the app passes it in. Or keep it out of .env with keypin: keypin run -- npm run dev

Replace it

  1. Create a new token with the same scope, services and role. Tokens can't be edited after they're made.
  2. Deploy it everywhere that reads FASTLY_API_TOKEN.
  3. Check that nothing still uses the old token, then delete it on the API tokens page.

Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.

Sources, checked 2026-11-16