Authorization
Every action in the Temps API is guarded by a permission check. Instance accounts, project teams, and API keys use separate role vocabularies, and project-level grants can only narrow an account's instance-wide permissions. This page is the reference for all three.
Role-based access control
Temps has 144 permissions (for example deployments:create or domains:delete). Roles are named sets of those permissions, and they come in three layers:
| Layer | Roles | Applies to |
|---|---|---|
| Instance account role | Admin, User | Every human account, across the whole instance |
| Team role | Owner, Admin, Deployer, Viewer | Members of a team, on the projects that team has been granted |
| API-key role | Admin, PlatformAdmin, User, Reader, ApiReader, Custom | A single API key |
How the layers combine:
- The instance role is the ceiling. Every request is first checked against the account's instance role. A team role can remove permissions from that ceiling but cannot add any.
- A project is open until a team is granted access to it. With no team grants, every account reaches the project with its instance permissions. Once one team is granted access, only members of granted teams can reach it.
- Instance Admins are never restricted by teams. Accounts with the Admin instance role (and PlatformAdmin API keys) skip the team check.
- Team roles are per project, not per environment. A grant covers every environment of the project. There are no per-environment permissions.
Instance account roles
| Role | What they can do |
|---|---|
| Admin | Full access: users, roles, teams, platform settings, the audit log, and every project resource, including deleting projects |
| User | Create and operate projects: deployments, environments and environment variables, domains, backups, crons, managed services, and their own API keys. Cannot delete projects, manage users or teams, change platform settings, or read the audit log |
Creating teams and adding or removing their members requires the Admin instance role. Project access is different: only an instance Admin can add the first team grant to a project (which restricts it to that team) or remove its last one, but once a project is restricted, a member of a team that holds Admin or Owner on it can grant, change or revoke other teams' access up to their own team's role.
Adding users
Temps has no email invitation flow. An instance Admin creates each account directly and shares the sign-in details with the new user. From the CLI, pass --password: without it users create makes an account with no password and sends nothing, so the user can only sign in through OIDC SSO or after a password reset.
Create a user account
- 1
Go to Settings, then Users, and click Add User.
- 2
Enter the name, email and a temporary password, and leave Require a new password at first sign-in switched on.
- 3
Choose the instance role (User or Administrator).
- 4
Optionally pick a team and a team role, then save.
Checkpoint: The new user appears in Settings, then Users, and can sign in at your Temps URL with the temporary password.
- Go to Settings → Users → Add User
- Enter the name, email and a temporary password, and keep Require a new password at first sign-in on
- Choose the instance role (User or Administrator)
- Optionally add the user to a team with a team role
Users can also sign in through your identity provider with OIDC SSO, which creates the account on first login. See Manage Team Access for the step-by-step guide.
Team roles
Project access is granted to teams, not individual users. Each team member has a role in the team, and each team has a role on every project it is granted. Both use the same four roles, and each role includes everything the one above it can do:
| Team role | What it allows on a granted project |
|---|---|
| Viewer | Read-only: deployments, logs, metrics, analytics, environments, domains, backups, crons, error tracking and other project resources |
| Deployer | Viewer, plus deploy, create and edit environments (including environment variables), and run pipelines. Cannot delete anything, manage domains, or change project settings |
| Admin | Deployer, plus full operational control: project settings, domains, backups, crons, managed-service links, error tracking, uptime monitors and incidents, deployment tokens, and deleting those resources. Cannot delete the project |
| Owner | Admin, plus deleting the project |
A member's effective permissions on a project are the intersection of their role in the team and the team's role on the project. If they belong to several granted teams, the results are combined. The instance ceiling still applies: a User account with the Owner team role cannot delete the project, because the User instance role has no project-delete permission.
The four team roles are fixed. Custom roles are part of Temps Premium.
Protecting production
Because team roles apply to the whole project, you cannot give someone deploy rights on staging but not on production. Two controls help instead:
- Separate projects. Put production in its own project and grant the Deployer role on it only to the teams that should ship there.
- Protected environments. An environment marked Protected never auto-deploys on git push; it only receives deployments promoted from another environment. Set it with
"protected": trueonPUT /projects/{project_id}/environments/{environment_id}/settings. The console shows the toggle under Node Scheduling in the environment's settings when worker nodes are connected.
Deployment approval gates are part of Temps Premium. See Environments for how environments are configured.
API-key roles
Every API key has one role. A key can never hold a permission its creator does not have; Temps rejects the request with a permission-ceiling error.
| API-key role | CLI value | What it grants |
|---|---|---|
| Admin | admin | Every permission |
| PlatformAdmin | platform_admin | User, settings, audit-log and system administration, plus domains, environments, backups and other platform resources. Read-only on projects and deployments |
| User | user | The same permissions as the User instance role |
| Reader | reader | Read-only access to projects, deployments, logs, analytics and most other resources |
| ApiReader | api_reader | Read-only access to projects, deployments and analytics only |
| Custom | custom | Exactly the scopes you select, and nothing else |
A seventh role, MetricsIngest, is used by Temps for its own metrics-ingestion keys.
API key scopes
Create an API key with specific scopes
- 1
Go to Settings then API Keys and click Create API Key.
- 2
Enter a name (e.g. github-actions-deploy or monitoring-readonly).
- 3
Select only the permission scopes the integration needs.
- 4
Click Create and copy the key — it is shown only once.
Checkpoint: The key appears in Settings > API Keys and can be revoked individually without affecting other keys.
Create scoped keys in the dashboard until your installed CLI advertises custom in apikeys create --help. Older CLI releases expose legacy role labels that the current API rejects.
A key with the Custom role carries the scopes chosen at creation time and nothing more. The most commonly used scopes:
| Scope | What it grants |
|---|---|
projects:read | View projects and their settings |
projects:create | Create projects |
projects:write | Modify existing projects |
deployments:read | View deployments and build logs |
deployments:create | Trigger new deployments |
deployments:write | Modify deployment configuration and related settings |
deployments:delete | Cancel, pause, and tear down deployments |
analytics:read | View analytics data |
environments:read | View environment configuration |
metrics:read | View metrics data |
This is not the full scope list — Temps has 100+ granular permission scopes. These are the ones used most often when creating scoped API keys.
Limit a key to one project or environment
A role or a list of scopes limits what a key can do. A resource scope limits where it can do it. You can confine a key to one project, or to one environment of that project. The two limits add up: the key needs the permission and the request has to be inside its scope.
| Key | Prefix | Works on |
|---|---|---|
| Account-wide (the default) | tk_ | Everything its permissions allow |
| Project-scoped | tkp_ | One project |
| Environment-scoped | tkp_ | One environment of one project |
In the console, choose a Deployment scope (and then an Environment scope) when you create the key. The default is Account-wide access. Through the API, send project_id and, optionally, environment_id. An environment always needs its project.
# Needs a CLI that has --project-id (currently bunx @temps-sdk/cli@beta)
bunx @temps-sdk/cli@beta apikeys create --name deploy-preview --role custom \
--permissions deployments:create --expires-in 7 \
--project-id 7 --environment-id 9 --yes
What a scoped key can reach:
- Project key: the project's deployments, its deployment configuration, automatic-deploy setting and containers, the manual
trigger-pipelineendpoint, static uploads, and everything under that project's environments (deploying by source, image, image upload or static bundle, variables, domains, IP access rules, logs, resource limits and scaling). - Environment key: the same endpoints, but only for its own environment, plus
trigger-pipelinefor that environment. Theenvironment_idin the request has to match. - Both:
GET /api/user/me, so the CLI can sign in with the key.
Everything else answers 403 with the problem type api-key-scope-denied. That includes instance settings, other projects, global lists, deployment URLs that do not contain the project ID, and the API-key endpoints, so a scoped key cannot create, rotate or widen other keys. Workflow APIs and workflow credentials are closed to scoped keys too.
Things to know:
- The scope cannot be changed. To change it, create a new key and revoke the old one. Rotating a key keeps its scope.
- Expiry: a key created without an expiry date expires after one year. Choose an earlier date for CI keys.
- Deleting an environment deactivates the keys scoped to it. Creating an environment with the same name does not bring them back.
- Existing keys stay account-wide. Nothing is converted.
Principle of least privilege
Create one key per integration and grant only the scopes that integration actually needs. A CI/CD pipeline that only triggers deployments needs deployments:create — not full admin access — and, if it only deploys one project, a key limited to that project or environment. Keys can be revoked individually from Settings → API Keys without affecting other integrations.
For creating, expiring and rotating API keys, see Authentication → API keys.