PATCH
/
api
/
v3
/
secrets
/
raw
/
{secretName}
curl --request PATCH \
  --url https://us.infisical.com/api/v3/secrets/raw/{secretName} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "workspaceId": "<string>",
  "environment": "<string>",
  "secretValue": "<string>",
  "secretPath": "/",
  "skipMultilineEncoding": true,
  "type": "shared",
  "tagIds": [
    "<string>"
  ],
  "metadata": {},
  "secretMetadata": [
    {
      "key": "<string>",
      "value": ""
    }
  ],
  "secretReminderNote": "<string>",
  "secretReminderRepeatDays": 123,
  "newSecretName": "<string>",
  "secretComment": "<string>"
}'
{
  "secret": {
    "id": "<string>",
    "_id": "<string>",
    "workspace": "<string>",
    "environment": "<string>",
    "version": 123,
    "type": "<string>",
    "secretKey": "<string>",
    "secretValue": "<string>",
    "secretComment": "<string>",
    "secretReminderNote": "<string>",
    "secretReminderRepeatDays": 123,
    "skipMultilineEncoding": false,
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "actor": {
      "actorId": "<string>",
      "actorType": "<string>",
      "name": "<string>",
      "membershipId": "<string>"
    },
    "secretValueHidden": true
  }
}

Authorizations

Authorization
string
header
required

An access token in Infisical

Path Parameters

secretName
string
required

The name of the secret to update.

Minimum length: 1

Body

application/json
workspaceId
string
required

The ID of the project to update the secret in.

environment
string
required

The slug of the environment where the secret is located.

secretValue
string
required

The new value of the secret.

secretPath
string
default:/

The default path for secrets to update or upsert, if not provided in the secret details.

skipMultilineEncoding
boolean

Skip multiline encoding for the secret value.

type
enum<string>
default:shared

The type of the secret to update.

Available options:
shared,
personal
tagIds
string[]

The ID of the tags to be attached to the updated secret.

metadata
object
secretMetadata
object[]
secretReminderNote
string | null

Note to be attached in notification email.

Maximum length: 1024
secretReminderRepeatDays
number | null

Interval for secret rotation notifications, measured in days.

newSecretName
string

The new name for the secret.

Minimum length: 1
secretComment
string

Update comment to the secret.

Response

200
application/json
Default Response
secret
object
required

Was this page helpful?