POST
/
api
/
v3
/
secrets
/
batch
/
raw
curl --request POST \
  --url https://app.infisical.com/api/v3/secrets/batch/raw \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "projectSlug": "<string>",
  "environment": "<string>",
  "secretPath": "<string>",
  "secrets": [
    {
      "secretKey": "<string>",
      "secretValue": "<string>",
      "secretComment": "<string>",
      "skipMultilineEncoding": true
    }
  ]
}'
{
  "secrets": [
    {
      "id": "<string>",
      "_id": "<string>",
      "workspace": "<string>",
      "environment": "<string>",
      "version": 123,
      "type": "<string>",
      "secretKey": "<string>",
      "secretValue": "<string>",
      "secretComment": "<string>"
    }
  ]
}

This endpoint requires you to disable end-to-end encryption. For more information, you should consult this note.

Authorizations

Authorization
string
headerrequired

An access token in Infisical

Body

application/json
projectSlug
string
required

The slug of the project to create the secret in.

environment
string
required

The slug of the environment to create the secret in.

secretPath
string
default: /

The path to create the secret in.

secrets
object[]
required

Response

200 - application/json
secrets
object[]
required

Was this page helpful?