PATCH
/
api
/
v1
/
project-templates
/
{templateId}
curl --request PATCH \
  --url https://us.infisical.com/api/v1/project-templates/{templateId} \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "roles": [
    {
      "name": "<string>",
      "slug": "<string>",
      "permissions": [
        {
          "subject": "secrets",
          "inverted": true,
          "action": "read",
          "conditions": {
            "environment": "<string>",
            "secretPath": "<string>",
            "secretName": "<string>",
            "secretTags": {
              "$in": [
                "<string>"
              ]
            }
          }
        }
      ]
    }
  ],
  "environments": [
    {
      "name": "<string>",
      "slug": "<string>",
      "position": 2
    }
  ]
}'
{
  "projectTemplate": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "description": "<string>",
    "roles": [
      {
        "name": "<string>",
        "slug": "<string>",
        "permissions": [
          {
            "subject": "<string>",
            "action": "<string>",
            "conditions": "<any>",
            "inverted": true
          }
        ]
      }
    ],
    "environments": [
      {
        "name": "<string>",
        "slug": "<string>",
        "position": 2
      }
    ],
    "orgId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

You can read more about the role’s permissions field in the permissions documentation.

Path Parameters

templateId
string
required

The ID of the project template to be updated.

Body

application/json
name
string

The updated name of the project template. Must be slug-friendly.

Required string length: 1 - 32
description
string

The updated description of the project template.

Maximum length: 256
roles
object[]

The updated roles to be created when the template is applied to a project.

environments
object[]

The updated environments to be created when the template is applied to a project.

Response

200
application/json
Default Response
projectTemplate
object
required

Was this page helpful?