Fastly API Documentation

The Fastly API is a fully featured suite of tools that allows you to handle everything from configuration to instant purging via a straight forward REST interface. Use the references below to guide the development of your application.

Check out the API documentation for each of our systems:

Configuration Purging Streaming Historical Stats Remote Logging


Interactive clients for the Fastly API are available in a variety of languages. Check our Clients page for more information on each.


There are two methods of authentication: API key and username/password.

API key

Include the API key from your account page as a Fastly-Key header e.g.

GET /some/path
Fastly-Key: d3cafb4dde4dbeef
Content-Accept: application/json

Username and password

First post to the login endpoint with the parameters user and password

POST /login
Content-Type: application/x-www-form-urlencoded

This will return a cookie. Stash it somewhere and use it in subsequent requests.