/v1/api-keysCreates a personal API key. The full token appears only in this response. Store it
securely, because it cannot be retrieved again.
Keys expire after 365 days by default. Set expires_in_days to choose a lifetime (capped at
730 days), or set never_expires to true. Do not send both.
Authentication
Send your API key as Authorization: Bearer <token>.
Request body
namestringRequiredLabel for the key. Must be unique among your keys.
expires_in_daysintegerDays until the key expires. Defaults to 365. Values above 730 are capped at 730.
min 1 · max 730
never_expiresbooleanCreate a key that never expires. Cannot be combined with expires_in_days.
Default false
scopestringWhat the key is for. cli covers the CLI and REST API. mcp is for the Rumpty MCP server.
Default cliOne ofclimcp
permissionsarray of stringsPermissions this key may use, capped by your role in each workspace. Omit it to
grant the default set (workspace.read, resource.write, runtime.connect,
secrets.read, secrets.manage). Keys that already exist keep that same default
until you replace them.
One ofworkspace.readresource.writeruntime.connectsecrets.readsecrets.managemembers.manageaudit.readbilling.readbilling.manageworkspace.manageworkspace.transferworkspace.delete
Response
The key was created. The response includes the one-time token.
successbooleanRequiredtrue when the request succeeded.
messagestringRequiredHuman-readable status message.
dataobjectShow attributesHide attributes
uidstringRequiredUnique identifier of the key.
namestringRequiredLabel you gave the key.
prefixstringRequiredFirst 8 characters of the token's identifier, used to recognise the key.
scopesarray of stringsRequiredWhat the key can be used for.
One ofclimcp
permissionsarray of stringsRequiredPermissions the key may use. A request also needs your role in that workspace to grant the same permission. A key with no stored list uses the default set.
One ofworkspace.readresource.writeruntime.connectsecrets.readsecrets.managemembers.manageaudit.readbilling.readbilling.manageworkspace.manageworkspace.transferworkspace.delete
never_expiresbooleanPresent and true when the key has no expiry.
expires_atstring (date-time)When the key expires (RFC 3339, UTC). Omitted for keys that never expire.
created_atstring (date-time)RequiredWhen the key was created.
last_used_atstring (date-time)When the key last authenticated a request. Omitted if it has never been used.
tokenstringRequiredThe full secret token. Shown only once.
Errors
| Status | Meaning |
|---|---|
400 | Validation failed: name is missing or already used, scope is not cli or mcp, permissions contains an unknown value, or both never_expires and expires_in_days were sent. |
401 | The API key is missing, invalid, expired or revoked. |
Errors use the standard error format.