Fastly User Tokens API

Operations for managing user API tokens that authenticate requests to the Fastly API on behalf of a specific user.

Operations 7

GET /tokens List API tokens #
POST /tokens Create an API token #
GET /tokens/{token_id} Get an API token #
DELETE /tokens/{token_id} Revoke an API token #
GET /tokens/self Get the current token #
DELETE /tokens/self Revoke the current token #
GET /customer/{customer_id}/tokens List customer tokens #

Documentation

📖
Documentation
https://www.fastly.com/documentation/reference/api/services/
📖
Documentation
https://www.fastly.com/documentation/reference/api/purging/
📖
Documentation
https://www.fastly.com/documentation/reference/api/logging/
📖
Documentation
https://www.fastly.com/documentation/reference/api/metrics-stats/
📖
Documentation
https://www.fastly.com/documentation/reference/api/tls/
📖
Documentation
https://www.fastly.com/documentation/reference/api/vcl-services/
📖
Documentation
https://www.fastly.com/documentation/reference/api/account/
📖
Documentation
https://www.fastly.com/documentation/reference/api/auth-tokens/
📖
Documentation
https://www.fastly.com/documentation/reference/api/acls/
📖
Documentation
https://www.fastly.com/documentation/reference/api/dictionaries/
📖
Documentation
https://www.fastly.com/documentation/guides/compute/
📖
Documentation
https://www.fastly.com/documentation/reference/api/ngwaf/
📖
Documentation
https://www.fastly.com/documentation/reference/api/domain-management/
📖
Documentation
https://www.fastly.com/documentation/reference/api/products/
📖
Documentation
https://www.fastly.com/documentation/reference/api/observability/
📖
Documentation
https://www.fastly.com/documentation/reference/api/api-security/
📖
Documentation
https://www.fastly.com/documentation/reference/api/ddos-protection/
📖
Documentation
https://www.fastly.com/documentation/reference/api/client-side-protection/
📖
Documentation
https://www.fastly.com/documentation/reference/api/publishing/
📖
Documentation
https://www.fastly.com/documentation/reference/api/load-balancing/
📖
Documentation
https://www.fastly.com/documentation/reference/api/utils/
📖
Documentation
https://www.fastly.com/products/ai
📖
Documentation
https://www.fastly.com/products/object-storage

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/fastly-user-tokens-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

fastly-user-tokens-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Fastly Authentication Tokens User Tokens API
  description: The Fastly Authentication Tokens API enables developers to create and manage API tokens used to authenticate requests to the Fastly API. Tokens can be scoped to specific services and permissions, allowing fine-grained access control for users and automated systems. The API supports creating user tokens, automation tokens for CI/CD pipelines, and managing token lifecycle including listing, revoking, and expiring tokens.
  version: '1.0'
  contact:
    name: Fastly Support
    url: https://support.fastly.com
  termsOfService: https://www.fastly.com/terms
servers:
- url: https://api.fastly.com
  description: Fastly API Production Server
security:
- apiKeyAuth: []
tags:
- name: User Tokens
  description: Operations for managing user API tokens that authenticate requests to the Fastly API on behalf of a specific user.
paths:
  /tokens:
    get:
      operationId: listTokens
      summary: List API tokens
      description: Retrieves a list of all API tokens associated with the authenticated user.
      tags:
      - User Tokens
      responses:
        '200':
          description: Successfully retrieved the list of tokens.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Token'
        '401':
          description: Unauthorized. The API token is missing or invalid.
    post:
      operationId: createToken
      summary: Create an API token
      description: Creates a new API token for the authenticated user. Tokens can be scoped to specific services and permissions.
      tags:
      - User Tokens
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - name
              - scope
              properties:
                name:
                  type: string
                  description: The name of the token.
                scope:
                  type: string
                  description: A space-delimited list of authorization scopes.
                services:
                  type: array
                  description: A list of service IDs the token is scoped to.
                  items:
                    type: string
                expires_at:
                  type: string
                  format: date-time
                  description: The expiration date and time of the token.
      responses:
        '200':
          description: Successfully created the token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Token'
        '400':
          description: Bad request. Missing or invalid parameters.
        '401':
          description: Unauthorized. The API token is missing or invalid.
  /tokens/{token_id}:
    get:
      operationId: getToken
      summary: Get an API token
      description: Retrieves the details of a specific API token.
      tags:
      - User Tokens
      parameters:
      - name: token_id
        in: path
        required: true
        description: The alphanumeric string identifying the token.
        schema:
          type: string
      responses:
        '200':
          description: Successfully retrieved the token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Token'
        '401':
          description: Unauthorized. The API token is missing or invalid.
        '404':
          description: Token not found.
    delete:
      operationId: revokeToken
      summary: Revoke an API token
      description: Revokes a specific API token, immediately invalidating it for future API requests.
      tags:
      - User Tokens
      parameters:
      - name: token_id
        in: path
        required: true
        description: The alphanumeric string identifying the token.
        schema:
          type: string
      responses:
        '204':
          description: Successfully revoked the token.
        '401':
          description: Unauthorized. The API token is missing or invalid.
        '404':
          description: Token not found.
  /tokens/self:
    get:
      operationId: getTokenCurrent
      summary: Get the current token
      description: Retrieves the details of the API token used to authenticate the current request.
      tags:
      - User Tokens
      responses:
        '200':
          description: Successfully retrieved the current token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Token'
        '401':
          description: Unauthorized. The API token is missing or invalid.
    delete:
      operationId: revokeTokenCurrent
      summary: Revoke the current token
      description: Revokes the API token used to authenticate the current request.
      tags:
      - User Tokens
      responses:
        '204':
          description: Successfully revoked the current token.
        '401':
          description: Unauthorized. The API token is missing or invalid.
  /customer/{customer_id}/tokens:
    get:
      operationId: listCustomerTokens
      summary: List customer tokens
      description: Retrieves a list of all API tokens for a specific customer. Requires superuser access.
      tags:
      - User Tokens
      parameters:
      - name: customer_id
        in: path
        required: true
        description: The alphanumeric string identifying the customer.
        schema:
          type: string
      responses:
        '200':
          description: Successfully retrieved the list of customer tokens.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Token'
        '401':
          description: Unauthorized. The API token is missing or invalid.
        '403':
          description: Forbidden. Superuser access required.
components:
  schemas:
    Token:
      type: object
      description: An API token used to authenticate requests to the Fastly API on behalf of a specific user.
      properties:
        id:
          type: string
          description: The alphanumeric string identifying the token.
        name:
          type: string
          description: The name of the token.
        user_id:
          type: string
          description: The alphanumeric string identifying the user the token belongs to.
        customer_id:
          type: string
          description: The alphanumeric string identifying the customer.
        scope:
          type: string
          description: A space-delimited list of authorization scopes.
        services:
          type: array
          description: A list of service IDs the token is scoped to.
          items:
            type: string
        access_token:
          type: string
          description: The token value used for authentication. Only returned on creation.
        ip:
          type: string
          description: The IP address of the client that last used the token.
        last_used_at:
          type: string
          format: date-time
          description: The date and time the token was last used.
        expires_at:
          type: string
          format: date-time
          nullable: true
          description: The date and time the token expires.
        created_at:
          type: string
          format: date-time
          description: The date and time the token was created.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Fastly-Key
      description: API token used to authenticate requests to the Fastly API.
externalDocs:
  description: Fastly Authentication Tokens API Documentation
  url: https://www.fastly.com/documentation/reference/api/auth-tokens/