Skip to content

API Tokens

If you want to automate server provisioning, trigger deployments from a script, or connect FlyWP to an external tool, API tokens are how you do it. A token lets a script or service act on a team with only the permissions you choose.

Team Settings API Tokens page

An API token (a secret string that acts as a password for programmatic access) lets you call the FlyWP API from CI/CD pipelines (automated build-and-deploy workflows), monitoring tools, custom scripts, or any third-party integration. Each token carries its own set of permissions, so you can limit exactly what it is allowed to do.

API tokens live under Team Settings > API Tokens, not under Account Settings. You need permission to manage the team, and:

  • Two-factor authentication must be on for your account. If it isn't, the page shows Two-factor authentication required with a link to your profile. See Account Settings.
  • FlyWP asks you to confirm your password or a passkey when you create a token. A passkey alone doesn't replace two-factor authentication.
  • A token can never hold a permission that you don't hold yourself.
  1. Click your team name, then open Team Settings > API Tokens.

    API Tokens in the Team Settings sidebar

  2. Click Create New Token.

  3. Enter a descriptive Name (for example ci-deploy-pipeline or monitoring-script).

  4. Choose the permissions this token should have. You can pick a role preset or tick individual permissions in the permission tree. The Unrestricted access switch grants everything you can do, so use it only when you need to.

  5. Optionally set an Expires on date. Without one, the token doesn't expire.

  6. Click Create. If FlyWP asks, confirm your password or passkey.

  7. Your new token is displayed on screen. Copy it immediately.

Tokens are only shown once at creation time. If you close the dialog without copying the token, delete it and create a new one. There is no way to see the value again.

Each token carries a list of named permissions, such as server:list, site:create, or site:update. Every API endpoint asks for one of them. A request to an endpoint the token has no permission for gets a 403 response.

Give each token only the access it needs, nothing more. The full list of permissions and what each one covers is in the FlyWP API reference.

The API Tokens page lists the tokens for your team so you can track what is in use and clean up anything stale.

ColumnDescription
LabelThe name you gave the token
Created byThe team member who created it
Last UsedWhen the token was last used to make an API request
Created AtWhen the token was created

Delete a token to revoke it immediately. Any scripts or integrations using that token stop working as soon as FlyWP deletes it. Removing a member from the team also deletes the API tokens that member created for the team.

Send the token in the Authorization header, and pass your team ID in the X-Team-Id header:

Authorization: Bearer your-api-token-here
X-Team-Id: your-team-id

X-Team-Id is required on every request. See the FlyWP API page for details, and the FlyWP API reference for every endpoint.

  • Name tokens descriptively so you can identify their purpose months later.
  • Set an expiry date on tokens you only need for a while.
  • Rotate tokens periodically: delete old tokens and create fresh ones on a regular schedule.
  • Delete tokens you no longer use to reduce your attack surface.
  • Never share tokens across people. Each person should create their own.

Still stuck? How can we help?

View as Markdown