Service Accounts
Service accounts allow you to create API keys for programmatic access to Promptfoo Enterprise. These are useful for CI/CD pipelines and automated testing.
note
Only global system admins can create and assign service accounts.
To create a service account:
- Navigate to your Organization Settings page
- Click on the "Users" tab and then select "Create Service Account"

- Enter a name for your service account and save the API key in a secure location.

warning
Make sure to copy your API key when it's first created. For security reasons, you won't be able to view it again after closing the dialog.
- Determine if you want to assign the API key with global admin privileges. This will provision the API key with access to everything that can be done in the organization settings page, such as managing teams, roles, users, and webhooks.
- Assign the API key to a team by navigating to the "Teams" tab and selecting the team you want to assign the API key to in the "Service Accounts" section. Service account API keys will not have programmatic access to Promptfoo Enterprise unless assigned to a team and role.

- Select the predefined role for the service account for that team.