API keys
API keys let programs and agents act in an organization with the scopes chosen at creation.
List
https://api.akter.dev/v1/organizations/{organization}/api-keysList an organization's API keys with their scopes; secrets are never listed.
Path parameters
organizationstringrequiredAn organization's name, unique across Akter Cloud. 1 to 63 characters: a lowercase letter, then lowercase letters, digits or single hyphens, ending in a letter or digit.
Query parameters
cursorstringThe nextCursor of the previous page.
limitintegerAt most this many items, 1 to 100. Defaults to 50.
Response 200ApiKeyPage
itemsApiKey[]requireditems[].appsstring[]Allowed app names in this organization. Omit for organization-wide access. App-restricted keys cannot read organization-wide usage.
items[].createdAtstringrequireditems[].createdBystringThe person who created the key, who is asked to approve its dangerous actions.
items[].expiresAtstringWhen the key stops getting tokens. Every key made since Phase 8 has one.
items[].idstringrequiredAn opaque id that starts with key_.
items[].lastUsedAtstringitems[].namestringrequiredA name for people to read, 1 to 100 characters.
items[].scopes("deploy" | "usage" | "call" | "read" | "export" | "delete" | "branch" | "snapshot" | "fork")[]requiredWhat the key may do: one or more scopes.
items[].spendCapintegerThe key's monthly cap in whole US dollars. Every key made since Phase 8 has one; an older key without it is bounded by its organization's cap.
items[].startstringrequiredThe first characters of the secret, to tell keys apart.
nextCursorstringPass as cursor for the next page.
Errors
401UnauthorizedError403ForbiddenError404NotFoundError | FeatureNotEnabledError503ActorUnavailableError | AuthUnavailableError | BillingUnavailableError | BuildStorageUnavailableError | ExecUnavailableError
Create
https://api.akter.dev/v1/organizations/{organization}/api-keysCreate an API key with at least one scope, optionally limited to some apps, with a monthly spend cap and an expiry. The secret is returned once, in this response.
Path parameters
organizationstringrequiredAn organization's name, unique across Akter Cloud. 1 to 63 characters: a lowercase letter, then lowercase letters, digits or single hyphens, ending in a letter or digit.
Request bodyCreateApiKey
appsstring[]Allowed app names in this organization. Omit for organization-wide access. App-restricted keys cannot read organization-wide usage.
expiresAtstringrequiredWhen the key stops getting tokens. Required: every key expires (Decision 11A).
namestringrequiredA name for people to read, 1 to 100 characters.
scopes("deploy" | "usage" | "call" | "read" | "export" | "delete" | "branch" | "snapshot" | "fork")[]requiredWhat the key may do: one or more scopes.
spendCapintegerrequiredThe most the work this key starts may cost in a calendar month, in whole US dollars. Raising it needs a person's confirmation.
Response 201CreatedApiKey
keyApiKeyrequiredkey.appsstring[]Allowed app names in this organization. Omit for organization-wide access. App-restricted keys cannot read organization-wide usage.
key.createdAtstringrequiredkey.createdBystringThe person who created the key, who is asked to approve its dangerous actions.
key.expiresAtstringWhen the key stops getting tokens. Every key made since Phase 8 has one.
key.idstringrequiredAn opaque id that starts with key_.
key.lastUsedAtstringkey.namestringrequiredA name for people to read, 1 to 100 characters.
key.scopes("deploy" | "usage" | "call" | "read" | "export" | "delete" | "branch" | "snapshot" | "fork")[]requiredWhat the key may do: one or more scopes.
key.spendCapintegerThe key's monthly cap in whole US dollars. Every key made since Phase 8 has one; an older key without it is bounded by its organization's cap.
key.startstringrequiredThe first characters of the secret, to tell keys apart.
secretstringrequiredThe bearer secret. It is returned once and never again.
Errors
401UnauthorizedError403ForbiddenError404NotFoundError | FeatureNotEnabledError503ActorUnavailableError | AuthUnavailableError | BillingUnavailableError | BuildStorageUnavailableError | ExecUnavailableError
Update
https://api.akter.dev/v1/organizations/{organization}/api-keys/{key}Change an API key's monthly spend cap. An API key changing it needs a person's approval.
Path parameters
organizationstringrequiredAn organization's name, unique across Akter Cloud. 1 to 63 characters: a lowercase letter, then lowercase letters, digits or single hyphens, ending in a letter or digit.
keystringrequiredAn opaque id that starts with key_.
Request bodyUpdateApiKey
spendCapintegerrequiredThe most the work this key starts may cost in a calendar month, in whole US dollars. Raising it needs a person's confirmation.
Response 200ApiKey
appsstring[]Allowed app names in this organization. Omit for organization-wide access. App-restricted keys cannot read organization-wide usage.
createdAtstringrequiredcreatedBystringThe person who created the key, who is asked to approve its dangerous actions.
expiresAtstringWhen the key stops getting tokens. Every key made since Phase 8 has one.
idstringrequiredAn opaque id that starts with key_.
lastUsedAtstringnamestringrequiredA name for people to read, 1 to 100 characters.
scopes("deploy" | "usage" | "call" | "read" | "export" | "delete" | "branch" | "snapshot" | "fork")[]requiredWhat the key may do: one or more scopes.
spendCapintegerThe key's monthly cap in whole US dollars. Every key made since Phase 8 has one; an older key without it is bounded by its organization's cap.
startstringrequiredThe first characters of the secret, to tell keys apart.
Errors
401UnauthorizedError403ForbiddenError404NotFoundError | FeatureNotEnabledError428ConfirmationRequiredError503ActorUnavailableError | AuthUnavailableError | BillingUnavailableError | BuildStorageUnavailableError | ExecUnavailableError
Revoke
https://api.akter.dev/v1/organizations/{organization}/api-keys/{key}Revoke an API key. Its secret gets no new token at once; a token it already holds works until it expires, at most a minute.
Path parameters
organizationstringrequiredAn organization's name, unique across Akter Cloud. 1 to 63 characters: a lowercase letter, then lowercase letters, digits or single hyphens, ending in a letter or digit.
keystringrequiredAn opaque id that starts with key_.
Response 204<No Content>
Errors
401UnauthorizedError403ForbiddenError404NotFoundError | FeatureNotEnabledError428ConfirmationRequiredError503ActorUnavailableError | AuthUnavailableError | BillingUnavailableError | BuildStorageUnavailableError | ExecUnavailableError