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.

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.
Before You Start
Section titled “Before You Start”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.
Creating a Token
Section titled “Creating a Token”-
Click your team name, then open Team Settings > API Tokens.

-
Click Create New Token.
-
Enter a descriptive Name (for example
ci-deploy-pipelineormonitoring-script). -
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.
-
Optionally set an Expires on date. Without one, the token doesn't expire.
-
Click Create. If FlyWP asks, confirm your password or passkey.
-
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.
Token Permissions
Section titled “Token Permissions”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.
Managing Existing Tokens
Section titled “Managing Existing Tokens”The API Tokens page lists the tokens for your team so you can track what is in use and clean up anything stale.
| Column | Description |
|---|---|
| Label | The name you gave the token |
| Created by | The team member who created it |
| Last Used | When the token was last used to make an API request |
| Created At | When the token was created |
Deleting a Token
Section titled “Deleting a Token”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.
Using Your Token
Section titled “Using Your Token”Send the token in the Authorization header, and pass your team ID in the X-Team-Id header:
Authorization: Bearer your-api-token-hereX-Team-Id: your-team-idX-Team-Id is required on every request. See the FlyWP API page for details, and the FlyWP API reference for every endpoint.
Best Practices
Section titled “Best Practices”- 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.
Related Pages
Section titled “Related Pages”Still stuck? How can we help?
View as Markdown