API Keys
AuthorizationBearer <token>API Key access
X-Daytona-Organization-ID?stringUse with JWT to specify the organization ID
API keys retrieved successfully.
application/json- response
[index: integer]?curl -X GET 'http://localhost:3000/api-keys'[ { "organizationId": "123e4567-e89b-12d3-a456-426614174000", "createdAt": "2024-03-14T12:00:00Z", "lastUsedAt": "2024-03-14T12:00:00Z", "permissions": [ "write:registries", "write:registries" ], "name": "My API Key", "value": "bb_********************def", "userId": "123", "expiresAt": "2024-03-14T12:00:00Z" }]AuthorizationBearer <token>API Key access
X-Daytona-Organization-ID?stringUse with JWT to specify the organization ID
application/json- body
name*stringThe name of the API key
permissions*array<>The list of organization resource permissions explicitly assigned to the API key
expiresAt?|When the API key expires
date-timeAPI key created successfully.
application/json- response
name*stringThe name of the API key
value*stringThe API key value
createdAt*stringWhen the API key was created
date-timepermissions*array<>The list of organization resource permissions assigned to the API key
expiresAt*|When the API key expires
date-timecurl -X POST 'http://localhost:3000/api-keys' \ -H 'Content-Type: application/json' \ -d '{ "permissions": [ "write:registries", "write:registries" ], "name": "My API Key", "expiresAt": "2025-06-09T12:00:00Z"}'{ "createdAt": "2024-03-14T12:00:00Z", "permissions": [ "write:registries", "write:registries" ], "name": "My API Key", "value": "bb_sk_1234567890abcdef", "expiresAt": "2025-06-09T12:00:00Z"}AuthorizationBearer <token>API Key access
X-Daytona-Organization-ID?stringUse with JWT to specify the organization ID
API key retrieved successfully.
application/json- response
name*stringThe name of the API key
value*stringThe masked API key value
createdAt*stringWhen the API key was created
date-timepermissions*array<>The list of organization resource permissions assigned to the API key
lastUsedAt*|When the API key was last used
date-timeexpiresAt*|When the API key expires
date-timeuserId*stringThe user ID of the user who created the API key
organizationId?stringThe organization ID associated with the API key
curl -X GET 'http://localhost:3000/api-keys/current'{ "organizationId": "123e4567-e89b-12d3-a456-426614174000", "createdAt": "2024-03-14T12:00:00Z", "lastUsedAt": "2024-03-14T12:00:00Z", "permissions": [ "write:registries", "write:registries" ], "name": "My API Key", "value": "bb_********************def", "userId": "123", "expiresAt": "2024-03-14T12:00:00Z"}AuthorizationBearer <token>API Key access
name*stringX-Daytona-Organization-ID?stringUse with JWT to specify the organization ID
API key retrieved successfully.
application/json- response
name*stringThe name of the API key
value*stringThe masked API key value
createdAt*stringWhen the API key was created
date-timepermissions*array<>The list of organization resource permissions assigned to the API key
lastUsedAt*|When the API key was last used
date-timeexpiresAt*|When the API key expires
date-timeuserId*stringThe user ID of the user who created the API key
organizationId?stringThe organization ID associated with the API key
curl -X GET 'http://localhost:3000/api-keys/string'{ "organizationId": "123e4567-e89b-12d3-a456-426614174000", "createdAt": "2024-03-14T12:00:00Z", "lastUsedAt": "2024-03-14T12:00:00Z", "permissions": [ "write:registries", "write:registries" ], "name": "My API Key", "value": "bb_********************def", "userId": "123", "expiresAt": "2024-03-14T12:00:00Z"}AuthorizationBearer <token>API Key access
name*stringX-Daytona-Organization-ID?stringUse with JWT to specify the organization ID
API key deleted successfully.
curl -X DELETE 'http://localhost:3000/api-keys/string'AuthorizationBearer <token>API Key access
userId*stringname*stringX-Daytona-Organization-ID?stringUse with JWT to specify the organization ID
API key deleted successfully.
curl -X DELETE 'http://localhost:3000/api-keys/string/string'