How to create and revoke an API key
This guide shows you how to give your code access to the Picked API. Use a key where your own code calls the API, such as a server-side integration.
An API key does not sign the CLI in. The CLI reads a session, which
picked login writes. See
How to authenticate the CLI for the commands that CI can
run without one.
Create a key
- Open your organization.
- Click API Keys.
- Click Create API Key.
- Enter a Name, such as
Production key. - Set Project to one project. The default, All projects, gives the key every project.
- Choose the Permissions that your integration needs.
- Click Create API Key.
Revoke a key
- Open the API keys list.
- Click Revoke next to the key.
- Click Revoke Key to confirm.
Picked invalidates the key immediately. No later request can use it.
API and MCP
You can also do this task with the Management API, the MCP server, or code that you send to picked_run.
| Task | GraphQL | MCP tool | Run |
|---|---|---|---|
| Create the key | apiKeyCreate | None | None |
| Find the key in the list | apiKeys | None | None |
| Revoke the key | apiKeyRevoke | None | None |
apiKeyCreate needs a user session. An API key cannot create a different key.
Related
- API keys — the scopes.
- Authentication — how to send the key.
