Strait Docs
CLI

Manage API keys for project authentication.

api-keys create

Create a new API key.

FlagTypeDefaultDescription
--projectstringProject ID
--namestringName for the API key
--scopesstringComma-separated list of scopes

The raw API key is returned only once upon creation. Ensure you store it safely.

strait api-keys create --project my-project --name "CI/CD Key" --scopes "jobs:read,jobs:write"

api-keys list

List API keys for a project.

FlagTypeDefaultDescription
--projectstringProject ID
strait api-keys list --project my-project

api-keys revoke

Revoke an API key by its ID.

strait api-keys revoke <key-id>

api-keys rotate

Rotate an API key using the API rotation endpoint with a configurable grace window.

FlagTypeDefaultDescription
--grace-period-minutesint60How long the old key remains valid
strait api-keys rotate <key-id> --grace-period-minutes 120

Always store your API keys in a secure location, such as a password manager or a secure vault. Never commit them to version control.

Was this page helpful?

On this page