Sign Up

Secret

List secrets

Deprecated
GET/secret

This endpoint is deprecated and fails for organizations with more than 1500 secrets. Use listSecretsPaginated instead.

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/secret"
[  {    "id": "123e4567-e89b-12d3-a456-426614174000",    "name": "MY_API_KEY",    "description": "API key for external service",    "createdAt": "2024-01-31T12:00:00Z",    "placeholder": "dtn_secret_a7f3b2c1e9d4f6g8",    "hosts": [      "api.anthropic.com"    ],    "updatedAt": "2024-01-31T12:00:00Z"  }]
POST/secret
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/secret" \  -H "Content-Type: application/json" \  -d '{    "name": "MY_API_KEY",    "value": "string"  }'
{  "id": "123e4567-e89b-12d3-a456-426614174000",  "name": "MY_API_KEY",  "description": "API key for external service",  "createdAt": "2024-01-31T12:00:00Z",  "placeholder": "dtn_secret_a7f3b2c1e9d4f6g8",  "hosts": [    "api.anthropic.com"  ],  "updatedAt": "2024-01-31T12:00:00Z"}
GET/secret/paginated
AuthorizationBearer <token>

API Key access

In: header

Query Parameters

cursor?string

Pagination cursor from a previous response

limit?number

Number of results per page

Range1 <= value <= 200
Default100
name?string

Filter by partial name match

sort?string

Field to sort by

Default"createdAt"

Value in

  • "name"
  • "createdAt"
  • "updatedAt"
order?string

Direction to sort by

Default"desc"

Value in

  • "asc"
  • "desc"

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/secret/paginated"
{  "items": [    {      "id": "123e4567-e89b-12d3-a456-426614174000",      "name": "MY_API_KEY",      "description": "API key for external service",      "createdAt": "2024-01-31T12:00:00Z",      "placeholder": "dtn_secret_a7f3b2c1e9d4f6g8",      "hosts": [        "api.anthropic.com"      ],      "updatedAt": "2024-01-31T12:00:00Z"    }  ],  "total": 0,  "nextCursor": "string"}
GET/secret/{secretId}
AuthorizationBearer <token>

API Key access

In: header

Path Parameters

secretId*string

ID of the secret

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/secret/string"
{  "id": "123e4567-e89b-12d3-a456-426614174000",  "name": "MY_API_KEY",  "description": "API key for external service",  "createdAt": "2024-01-31T12:00:00Z",  "placeholder": "dtn_secret_a7f3b2c1e9d4f6g8",  "hosts": [    "api.anthropic.com"  ],  "updatedAt": "2024-01-31T12:00:00Z"}
PATCH/secret/{secretId}
AuthorizationBearer <token>

API Key access

In: header

Path Parameters

secretId*string

ID of the secret

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 PATCH "https://example.com/secret/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "123e4567-e89b-12d3-a456-426614174000",  "name": "MY_API_KEY",  "description": "API key for external service",  "createdAt": "2024-01-31T12:00:00Z",  "placeholder": "dtn_secret_a7f3b2c1e9d4f6g8",  "hosts": [    "api.anthropic.com"  ],  "updatedAt": "2024-01-31T12:00:00Z"}
DELETE/secret/{secretId}
AuthorizationBearer <token>

API Key access

In: header

Path Parameters

secretId*string

ID of the secret

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Response Body

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