Create an API key
Workspace members can create their own keys. Managing other members’ keys requires separate workspace permission.1
Open API key settings
In the Windmill Dashboard, open Settings → API keys. The browser route is
/s/{company}/config/api-keys.2
Choose access and expiration
Select Create API key and enter a descriptive name, such as
Employee reporting. Choose Read for searches and other read operations, or Read/write when your integration needs to change data. Choose an expiration, then select Create. The dialog initially selects Read/write and 90 days; select Read explicitly for the getting-started example.3
Store the key
Copy the plaintext key into a secret manager. Windmill shows the full key only once. Keys start with
wm_api_. If you lose the value, create a replacement and revoke the old key.Send the bearer header
Use this header on every API-key request:WINDMILL_API_KEY, then use:
Understand permissions
A key inherits its creator’s current workspace permissions and is further limited by its selected access mode. A read/write key doesn’t grant employee-management permissions that its creator lacks. Resource visibility and access rules still apply. Read keys can call read operations such as Search employee profiles, even though that operation usesPOST. They can’t call mutations such as Update an employee profile.
A key belongs to the workspace where you created it. Changing the company ID in the URL doesn’t authorize access to another workspace, even if you belong to both.
Resolve authentication failures
- 401: check the
Bearerheader, the full key value, and whether the key is expired or revoked. Replace an invalid key. - 403: check that the key belongs to the requested workspace, its access mode permits the operation, and its creator still has the required workspace and resource permissions.