Sign Up

API Keys

GET/api-keys
AuthorizationBearer <token>

API Key access

In: header

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Response Body

application/json

curl -X GET "https://example.com/api-keys"
[  {    "name": "My API Key",    "value": "bb_********************def",    "createdAt": "2024-03-14T12:00:00.000Z",    "permissions": [      "write:registries"    ],    "lastUsedAt": "2024-03-14T12:00:00.000Z",    "expiresAt": "2024-03-14T12:00:00.000Z",    "userId": "123"  }]
POST/api-keys
AuthorizationBearer <token>

API Key access

In: header

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api-keys" \  -H "Content-Type: application/json" \  -d '{    "name": "My API Key",    "permissions": [      "write:registries"    ]  }'
{  "name": "My API Key",  "value": "bb_sk_1234567890abcdef",  "createdAt": "2024-03-14T12:00:00.000Z",  "permissions": [    "write:registries"  ],  "expiresAt": "2025-06-09T12:00:00.000Z"}
GET/api-keys/current
AuthorizationBearer <token>

API Key access

In: header

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Response Body

application/json

curl -X GET "https://example.com/api-keys/current"
{  "name": "My API Key",  "value": "bb_********************def",  "createdAt": "2024-03-14T12:00:00.000Z",  "permissions": [    "write:registries"  ],  "lastUsedAt": "2024-03-14T12:00:00.000Z",  "expiresAt": "2024-03-14T12:00:00.000Z",  "userId": "123"}
GET/api-keys/{name}
AuthorizationBearer <token>

API Key access

In: header

Path Parameters

name*string

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Response Body

application/json

curl -X GET "https://example.com/api-keys/string"
{  "name": "My API Key",  "value": "bb_********************def",  "createdAt": "2024-03-14T12:00:00.000Z",  "permissions": [    "write:registries"  ],  "lastUsedAt": "2024-03-14T12:00:00.000Z",  "expiresAt": "2024-03-14T12:00:00.000Z",  "userId": "123"}
DELETE/api-keys/{name}
AuthorizationBearer <token>

API Key access

In: header

Path Parameters

name*string

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Response Body

curl -X DELETE "https://example.com/api-keys/string"
Empty
DELETE/api-keys/{userId}/{name}
AuthorizationBearer <token>

API Key access

In: header

Path Parameters

userId*string
name*string

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Response Body

curl -X DELETE "https://example.com/api-keys/string/string"
Empty