Adding Tokens on Demand
Topol lets you manage your plugin API tokens dynamically using an API. This means you can create new tokens, delete old ones, and update which domains are allowed to use each token — all without logging into the dashboard every time.
Why Would You Use This?
Imagine you run a CRM platform with many customers (tenants). When a new customer joins, you want to give them access to the editor—but only on their specific subdomain (like newcustomer.yourcrm.com). Using this API, you can add that subdomain to your existing token easily.
Or, if a customer leaves, you can remove their access by deleting their token.
How Does It Work?
1. Get an API Key
You need an API key to call these token management APIs. You can get it either from your account settings or from your existing Plugin API Token settings.
When using an API key from your account settings, you can set various permissions. Go to Settings, then navigate to API Tokens. From there, select "Create API Token" and specify the permissions you wish to grant to this token.
If you prefer to use the same existing Plugin API token that was used to initialize your Plugin, simply copy it from the Plugin Settings under "Show API key".
2. Set API Request Headers
When making requests, include these headers:
{
"accept": "application/json",
"Authorization": "Bearer <api-key>"
}Servers
Get a list of API tokens
Retrieve a list of API tokens
Authorizations
Use: Authorization: Bearer <api-key>
Responses
API tokens fetched successfully
Create a new API token
Create a new API token
Authorizations
Use: Authorization: Bearer <api-key>
Request Body
Responses
API token created successfully
Get an API token
Get an existing API token
Authorizations
Use: Authorization: Bearer <api-key>
Parameters
Path Parameters
API token ID
Responses
API token retrieved successfully
Delete an API token
Delete an existing API token
Authorizations
Use: Authorization: Bearer <api-key>
Parameters
Path Parameters
API token ID
Responses
API token deleted successfully
Add domains to an API token
Add domains to an existing API token
Authorizations
Use: Authorization: Bearer <api-key>
Parameters
Path Parameters
API token ID
Request Body
Responses
API token deleted successfully
Remove domains from an API token
Remove domains from an existing API token
Authorizations
Use: Authorization: Bearer <api-key>
Parameters
Path Parameters
API token ID
Request Body
Responses
API token updated successfully
Update storage settings for an API token
Update storage settings for an existing API token
Authorizations
Use: Authorization: Bearer <api-key>
Parameters
Path Parameters
API token ID
Request Body
Responses
API token storage updated successfully
Delete an API token storage settings
Delete an existing API token storage settings
Authorizations
Use: Authorization: Bearer <api-key>
Parameters
Path Parameters
API token ID
Responses
API token storage deleted successfully