Secret
List secrets
DeprecatedThis endpoint is deprecated and fails for organizations with more than 1500 secrets. Use listSecretsPaginated instead.
AuthorizationBearer <token>API Key access
X-Daytona-Organization-ID?stringUse with JWT to specify the organization ID
List of all secrets (metadata only, values are not returned)
application/json- response
[index: integer]?curl -X GET 'http://localhost:3000/secret'[ { "createdAt": "2024-01-31T12:00:00Z", "hosts": [ "api.anthropic.com" ], "name": "MY_API_KEY", "description": "API key for external service", "id": "123e4567-e89b-12d3-a456-426614174000", "placeholder": "dtn_secret_a7f3b2c1e9d4f6g8", "updatedAt": "2024-01-31T12:00:00Z" }]AuthorizationBearer <token>API Key access
X-Daytona-Organization-ID?stringUse with JWT to specify the organization ID
application/json- body
name*stringSecret name (alphanumeric, hyphens, underscores)
value*stringSecret value
description?stringOptional description of the secret
hosts?array<string>Allowed hosts this secret may be sent to
The secret has been successfully created.
application/json- response
id*stringSecret ID
name*stringSecret name
description?stringOptional description of the secret
createdAt*stringCreation timestamp
date-timeplaceholder*stringOpaque placeholder token injected as env var value in sandboxes
hosts*array<string>Allowed hosts this secret may be sent to
updatedAt*stringLast update timestamp
date-timecurl -X POST 'http://localhost:3000/secret' \ -H 'Content-Type: application/json' \ -d '{ "hosts": [ "api.anthropic.com" ], "name": "MY_API_KEY", "description": "description", "value": "value"}'{ "createdAt": "2024-01-31T12:00:00Z", "hosts": [ "api.anthropic.com" ], "name": "MY_API_KEY", "description": "API key for external service", "id": "123e4567-e89b-12d3-a456-426614174000", "placeholder": "dtn_secret_a7f3b2c1e9d4f6g8", "updatedAt": "2024-01-31T12:00:00Z"}AuthorizationBearer <token>API Key access
cursor?stringPagination cursor from a previous response
limit?integerNumber of results per page
1 <= value <= 200100name?stringFilter by partial name match
sort?stringField to sort by
"createdAt""name""createdAt""updatedAt"order?stringDirection to sort by
"desc""asc""desc"X-Daytona-Organization-ID?stringUse with JWT to specify the organization ID
Paginated list of secrets (metadata only, values are not returned)
application/json- response
items*array<>List of results for the current page
total*integerTotal number of secrets matching the filters
nextCursor*|Cursor for the next page of results
curl -X GET 'http://localhost:3000/secret/paginated'{ "nextCursor": "nextCursor", "total": 0, "items": [ { "createdAt": "2024-01-31T12:00:00Z", "hosts": [ "api.anthropic.com" ], "name": "MY_API_KEY", "description": "API key for external service", "id": "123e4567-e89b-12d3-a456-426614174000", "placeholder": "dtn_secret_a7f3b2c1e9d4f6g8", "updatedAt": "2024-01-31T12:00:00Z" }, { "createdAt": "2024-01-31T12:00:00Z", "hosts": [ "api.anthropic.com" ], "name": "MY_API_KEY", "description": "API key for external service", "id": "123e4567-e89b-12d3-a456-426614174000", "placeholder": "dtn_secret_a7f3b2c1e9d4f6g8", "updatedAt": "2024-01-31T12:00:00Z" } ]}AuthorizationBearer <token>API Key access
secretId*stringID of the secret
X-Daytona-Organization-ID?stringUse with JWT to specify the organization ID
The secret metadata (value is not returned)
application/json- response
id*stringSecret ID
name*stringSecret name
description?stringOptional description of the secret
createdAt*stringCreation timestamp
date-timeplaceholder*stringOpaque placeholder token injected as env var value in sandboxes
hosts*array<string>Allowed hosts this secret may be sent to
updatedAt*stringLast update timestamp
date-timecurl -X GET 'http://localhost:3000/secret/string'{ "createdAt": "2024-01-31T12:00:00Z", "hosts": [ "api.anthropic.com" ], "name": "MY_API_KEY", "description": "API key for external service", "id": "123e4567-e89b-12d3-a456-426614174000", "placeholder": "dtn_secret_a7f3b2c1e9d4f6g8", "updatedAt": "2024-01-31T12:00:00Z"}AuthorizationBearer <token>API Key access
secretId*stringID of the secret
X-Daytona-Organization-ID?stringUse with JWT to specify the organization ID
application/json- body
value?stringNew secret value
description?stringOptional description of the secret
hosts?array<string>Allowed hosts this secret may be sent to
The secret has been successfully updated.
application/json- response
id*stringSecret ID
name*stringSecret name
description?stringOptional description of the secret
createdAt*stringCreation timestamp
date-timeplaceholder*stringOpaque placeholder token injected as env var value in sandboxes
hosts*array<string>Allowed hosts this secret may be sent to
updatedAt*stringLast update timestamp
date-timecurl -X PATCH 'http://localhost:3000/secret/string' \ -H 'Content-Type: application/json' \ -d '{ "hosts": [ "api.anthropic.com" ], "description": "description", "value": "value"}'{ "createdAt": "2024-01-31T12:00:00Z", "hosts": [ "api.anthropic.com" ], "name": "MY_API_KEY", "description": "API key for external service", "id": "123e4567-e89b-12d3-a456-426614174000", "placeholder": "dtn_secret_a7f3b2c1e9d4f6g8", "updatedAt": "2024-01-31T12:00:00Z"}AuthorizationBearer <token>API Key access
secretId*stringID of the secret
X-Daytona-Organization-ID?stringUse with JWT to specify the organization ID
The secret has been successfully deleted.
curl -X DELETE 'http://localhost:3000/secret/string'