POST
/
api
/
v1
/
dynamic-secrets
/
leases
curl --request POST \
  --url https://us.infisical.com/api/v1/dynamic-secrets/leases \
  --header 'Content-Type: application/json' \
  --data '{
  "dynamicSecretName": "<string>",
  "projectSlug": "<string>",
  "ttl": "<string>",
  "path": "/",
  "environmentSlug": "<string>"
}'
{
  "lease": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "version": 123,
    "externalEntityId": "<string>",
    "expireAt": "2023-11-07T05:31:56Z",
    "status": "<string>",
    "statusDetails": "<string>",
    "dynamicSecretId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "dynamicSecret": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "version": 123,
    "type": "<string>",
    "defaultTTL": "<string>",
    "maxTTL": "<string>",
    "folderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "status": "<string>",
    "statusDetails": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "data": "<any>"
}

Body

application/json
dynamicSecretName
string
required

The name of the dynamic secret.

Minimum length: 1
projectSlug
string
required

The slug of the project of the dynamic secret in.

Minimum length: 1
environmentSlug
string
required

The path of the dynamic secret in.

Minimum length: 1
ttl
string

The lease lifetime TTL. If not provided the default TTL of dynamic secret will be used.

path
string
default:
/

The path of the dynamic secret in.

Response

200
application/json
Default Response
lease
object
required
dynamicSecret
object
required
data
any