API Tokens
ProxCenter issues API tokens so external tooling can read, and optionally drive, your fleet without borrowing a person's account. A token is a service account: it carries its own scopes, its own perimeter of connections, its own quota, and it is deleted on its own without touching anybody's sign-in.
A token is a read-only credential by default, for dashboards, Prometheus-style scrapers, CI checks and any monitoring tool that only needs to look. A token can also carry write scopes, so scripts, CI pipelines and infrastructure-as-code tooling can create, change, power and delete guests, backups, storage, HA, pools, networks and firewall rules through ProxCenter instead of the raw Proxmox API. Writes keep everything ProxCenter adds on top of Proxmox: multi-cluster routing, tenant and vDC confinement, RBAC, quotas and audit. See Write tokens.
These are ProxCenter's own tokens. The Proxmox API tokens used to declare a PVE or PBS connection are a different thing, described in Connect Your Infrastructure.
API access, read and write, is unlocked by the ProxCenter API Access add-on license on top of an Enterprise edition. Without it, creating a token is refused and every token call answers HTTP 403 Feature not licensed. If the option lapses, existing tokens stop working but can still be listed and deleted, so you can clean up after the add-on rather than being locked out of your own token table.

Quick Path
Before you start
- An Enterprise edition with the ProxCenter API Access add-on, see Checking Activation and Feature Access.
- A
super_adminaccount acting in the provider tenant, which holdsadmin.apitokens, see Creating a token.
Create a read token and make a first call
- Open Settings > API, click New token, and enter a Name.
- Select the Tenant, leave Connections empty for all of its connections, and set at least one domain to Read under Scopes.
- Click Create, then copy the secret from Copy your token now into your secret manager. It is displayed only once.
- Send it as a bearer token, for example to
/api/v1/public/health, see Authenticating a call.
Check the result
- The call answers with the application status and the reachability of each connection the token can see; a refused call answers with one of the statuses listed under Authenticating a call.
- The token's row in Settings > API shows the date and the caller's IP address under Last used.
Choose Your Path
| You want to | Page |
|---|---|
| Read the fleet from a script: authentication, endpoints, quotas | Calling the API |
| Change the fleet from a script or a CI pipeline | Write Tokens |
| Manage guests and firewall objects from Terraform or Ansible | Terraform and Ansible |
| Scrape metrics into Prometheus and use the Grafana dashboards | Prometheus and Grafana |
| Delete a token, offboard its creator, read the audit trail | Deleting a token, Offboarding a user and Audit trail, on this page |
Read by default, write by explicit scope
A token with only *:read scopes cannot change anything, and that is enforced rather than assumed:
- A request is accepted only if its method is the one the matched endpoint declares (
HEADrides onGET). Any other method answers HTTP 405Method not allowed for this API token routewith anAllowheader listing the methods that exist on that path, decided before any scope or database lookup. - Only the endpoints listed under Endpoints and Write endpoints are reachable. Everywhere else a token is not an authenticated caller at all and receives the ordinary HTTP 401.
- A write endpoint demands a write scope. A token holding only
*:readscopes is refused with HTTP 403Route not available to API tokens.
Creating a token
Tokens live in Settings > API. The tab is provider-only: you must be a super_admin in the provider tenant, and the routes behind it require the admin.apitokens permission.

- Open Settings > API and click New token.
- Enter a Name, and a Description if you want one.
- Choose an Expiration: No expiration, 30 days, 90 days, 1 year, or Custom with a number of days.
- Select the Tenant the token reads for.
- Under Connections, pick the connections it may read. Left empty it means All connections of the tenant, including connections added later.
- Under Scopes, set at least one domain (VMs and containers, Backups, Storage, Nodes and cluster, Automation, Alerts, Reports) to Read or Write. Write includes Read. On a domain with several write scopes, toggles appear under the row to pick them: everything is selected except Delete, which you select explicitly. Automation, Alerts and Reports are read only. Hover a row or a toggle to see the exact scope ids it grants.
- If a domain is on Write, a warning appears; check the Writes per minute (60 by default) and the expiration, which switches to 90 days and can still be changed.
- Click Create.


A write scope the creating account is not allowed to grant is greyed out, see Who can mint a write token. ProxCenter then shows Copy your token now with the full secret. Copy it into your secret manager and click Done.

The secret is displayed exactly once. Only a peppered HMAC-SHA-256 of it is stored, next to the first 12 characters kept as a lookup prefix, so no one, administrator or database owner, can recover it afterwards. A lost secret means deleting the token and creating another one.
The listing then shows one row per token with its Prefix, Name, Tenant, Scopes, Expires, Last used and Created by, plus the Delete action. Never under Expires means the token has no expiry date, and Never under Last used means it has not been called yet; once it has, that cell carries the date and the caller's IP address.

Created by
Created by carries the email address of the account that minted the token, captured at creation and never refreshed afterwards. Freezing it is deliberate: the point of the column is to answer "who issued this thing" months later, including after that person has left and their account has been deleted. A token whose creator cannot be resolved shows Unknown.
Because the provenance is frozen on the token, deleting a user never deletes the trail of what they issued. It does, however, leave their tokens working: see Offboarding a user.
Token format
A secret is pxc_ followed by 32 random bytes in base64url, 47 characters in all. The Prefix column shows pxc_ plus the first 8 characters of the random part, which is the only part of the secret ProxCenter ever stores in clear or displays again.
Scopes
A scope is a bundle of RBAC permissions. The read scopes below bundle read permissions only; the write scopes have their own page, Write Tokens. Endpoints that name several scopes are satisfied by any one of them.
| Scope | Opens |
|---|---|
vms:read | The VM and container list, and the proxcenter_vm_* metrics |
nodes:read | The inventory tree, and the proxcenter_node_* metrics |
storage:read | The storage list, and the proxcenter_storage_* metrics |
backups:read | PBS snapshots, fleet backup freshness, and the proxcenter_backup_* metrics |
automation:read | No endpoint |
alerts:read | No endpoint |
reports:read | No endpoint |
The last three are selectable in the creation dialog but no endpoint requires them, so granting them changes nothing. Grant only what your integration reads.
An unknown scope, such as compliance:read, contributes no permission at all: the token is simply evaluated on its other scopes.
On the metrics endpoint a missing scope filters the corresponding metric families out of an otherwise normal 200, rather than failing the scrape.
Tenant and connection perimeter
A token is bound to one tenant, and reads only what that tenant owns. If the tenant is disabled, the token stops working.
Within the tenant, the Connections field narrows the perimeter further. Left empty the token sees every connection of the tenant, present and future; filled in it sees exactly those connections, and a connection that later moves out of the tenant drops out of the perimeter on its own. Every response is filtered through that intersection, and a perimeter that cannot be resolved is treated as empty rather than as unrestricted.
Deleting a token
Click Delete on the row and confirm. The dialog states the consequence plainly: Delete this token? Integrations using it stop working immediately, and this cannot be undone.

Deletion takes effect on the very next call, because every call resolves the token with a fresh indexed lookup and nothing is cached.
Deleting is immediate and final. Integrations using that token stop working at once, and there is no un-delete: issue a new token and update the integration.
The row is removed from the table. What survives is the audit trail: the apitoken.create entry written when the token was issued and the apitoken.delete entry written in the same transaction as the deletion, both carrying the prefix. The token table is therefore a list of tokens that exist, not a history of tokens that once did.
A token that carries a read-only Revoked chip is refused at authentication. Its Delete button removes the row like any other token.
An expiry date stops a token at its due time without removing anything, and the caller cannot tell an expired token from a deleted or an unknown one: all three answer the same HTTP 401.
Offboarding a user
A token authenticates on its own. It does not ride on its creator's session, so disabling or deleting the account that minted it does not stop its reads: it keeps reading your fleet at the same quota until someone deletes it. Writes are different: they are refused within 60 seconds once the creator is disabled, deleted, removed from the tenant or loses the rights behind the scope, see Who can mint a write token.
The user dialogs on Security & Access > Users say so. When you disable or delete an account that minted tokens, the dialog lists them, each with its name, its prefix and when it was last used, under one of two warnings:
- Disabling: This account created N active API token(s). Disabling the account does not stop them: a token authenticates on its own.
- Deleting: This account created N active API token(s). They survive the deletion: a token authenticates on its own.
A checkbox, Delete these tokens as well, deletes them in the same gesture. It is unchecked by default, on both dialogs, and it is reset every time the dialog opens: keeping a token alive past its creator is a legitimate choice, so nothing is destroyed unless you ask for it in that exact dialog.
When the box is ticked, the tokens are deleted before the account is written. If the deletion fails, the account stays as it was rather than ending up disabled or deleted with live tokens behind it. The audit log records how many tokens went, and which prefixes, alongside the account change.
Listing the tokens of a user requires admin.users, the permission that already governs the Users page, rather than admin.apitokens: an administrator offboarding somebody needs to see what that person issued without being handed the keys to the whole token table.
The same information is available the other way round from Settings > API, where the Created by column names the account that issued each token.
Audit trail
Token management, token writes and refusals are written to the audit log under category api_tokens:
| Action | Notes |
|---|---|
apitoken.create | Written in the same transaction as the token itself, with the tenant, the scopes, the connections and the expiry date |
apitoken.delete | Written in the same transaction as the deletion, once per token, with the prefix. This is the only trace left once the row is gone |
apitoken.write | Every write made with a token, success or failure, after the handler has answered. It carries the token name and prefix, the method, the path, the endpoint id, the HTTP status and the Proxmox UPID(s) when the answer holds any. The handler's own audit entry, when it has one, is kept as well |
apitoken.denied | Every refused call, with the reason, the HTTP status and the token prefix. Never the secret |
Tokens deleted while offboarding a user are recorded on the user's own audit entry, with the number of tokens and their prefixes.
Older entries may carry the action apitoken.revoke. They are kept and read normally.
Successful reads are not audited one by one, the Last used timestamp carries that. Writes are: each one is journaled as apitoken.write, and the actor column of the audit page shows the token name and its prefix instead of a user. A failed audit write never turns an answered request into an error. Rows written while a token is the caller are attributed to the token, not to a user, and the UPID stored on the row is what lets a vDC token read the outcome of a task it started.

Permissions
| Permission | Description |
|---|---|
admin.apitokens | Create, list and delete API tokens |
Creating a token with a write scope additionally requires the permissions of that scope, see Who can mint a write token.
The Settings > API tab and the Settings > API reference page are additionally reserved for a super_admin acting in the provider tenant.