API Keys
API keys let you authenticate with the Timefold Model APIs without a user context. This page describes how to generate and revoke API keys in the Platform UI.
See Model API usage for recommended permissions for common integration patterns.
Generating API keys
When you are logged in, click on the dropdown at the top right next to your username. Click on Manage tenant. In the menu on the left hand side click API Keys to access the API Keys available for your tenant.
-
Click Create API Key to generate a new API Key.
-
Select All Models or Selected Models and specify which models the key has access to.
We recommend creating one key for each model you use. -
Select All Permissions or Selected Permissions and specify which permissions the key has.
The Read permission can be used with the GET method to retrieve existing information. It cannot be used, for instance, to request recommendations as this involves creating the recommendations. -
Specify an expiry duration.
If you don’t pick a date, the key will expire after 30 days. -
Give the API a descriptive name.
-
Click Add API Key.
All API Keys generated for a tenant are visible for all administrators of the tenant. An API Key doesn’t have any user context and is purely connected to the tenant (and optionally to the models of the tenant).
Revoking API keys
From the API Keys overview table you can revoke existing keys. This can be done if an API key is no longer needed, or if an API key has leaked. Once an API key is revoked, all subsequent API calls where the key is used will fail.
API key permissions
The table below lists which permissions can call which model endpoints and will help decide which API keys require which permissions.
| Method | Endpoint | Create | Read | Update | Delete |
|---|---|---|---|---|---|
POST |
|
Yes |
No |
No |
No |
DELETE |
|
No |
No |
Yes |
No |
GET |
|
Yes |
Yes |
Yes |
Yes |
POST |
|
No |
No |
Yes |
No |
PUT |
|
No |
No |
Yes |
Yes |
POST |
|
Yes |
No |
No |
No |
POST |
|
Yes |
No |
No |
No |
PATCH |
|
No |
No |
Yes |
No |
POST |
|
Yes |
No |
No |
No |
DELETE |
|
No |
No |
No |
Yes |
PATCH |
|
No |
No |
Yes |
No |
GET |
|
Yes |
Yes |
Yes |
Yes |
GET |
|
Yes |
Yes |
Yes |
Yes |
POST |
|
Yes |
No |
No |
No |
POST |
|
Yes |
No |
No |
No |
POST |
|
Yes |
No |
No |
No |
GET |
|
Yes |
Yes |
Yes |
Yes |
GET |
|
No |
Yes |
No |
No |
GET |
|
No |
Yes |
No |
No |
| When deciding on which permissions to grant an API key, we recommend following the Principle of Least Privilege and only providing the permissions required for the task the API key has been created for. |