---
title: "PATCH /api/v1/project-templates/{templateId}"
method: PATCH
path: "/api/v1/project-templates/{templateId}"
tags: ["Project Templates"]
---

# PATCH /api/v1/project-templates/{templateId}

`PATCH /api/v1/project-templates/{templateId}`

Update a project template.

## Path parameters

- `templateId` string, uuid, required

## Request body

- object
  - `name` string — The updated name of the project template. Must be slug-friendly.
  - `description` string — The updated description of the project template.
  - `roles` object[] — The updated roles to be created when the template is applied to a project.
    - `name` string, required
    - `slug` string, required
    - `permissions` union[], required
      - union
        - object
          - `subject` 'secrets', required — The entity this permission pertains to.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'describeSecret' | 'readValue' | 'create' | 'edit' | 'delete'
            - string[]
          - `conditions` object — When specified, only matching conditions will be allowed to access given resource.
            - `environment` union
              - …
            - `secretPath` union
              - …
            - `secretName` union
              - …
            - `secretTags` object
              - …
            - `eventType` union
              - …
        - object
          - `subject` 'secret-folders', required — The entity this permission pertains to.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete'
            - string[]
          - `conditions` object — When specified, only matching conditions will be allowed to access given resource.
            - `environment` union
              - …
            - `secretPath` union
              - …
        - object
          - `subject` 'secret-imports', required — The entity this permission pertains to.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete'
            - string[]
          - `conditions` object — When specified, only matching conditions will be allowed to access given resource.
            - `environment` union
              - …
            - `secretPath` union
              - …
        - object
          - `subject` 'dynamic-secrets', required — The entity this permission pertains to.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — Describe what action an entity can take.
            - 'read-root-credential' | 'create-root-credential' | 'edit-root-credential' | 'delete-root-credential' | 'lease'
            - string[]
          - `conditions` object — When specified, only matching conditions will be allowed to access given resource.
            - `environment` union
              - …
            - `secretPath` union
              - …
            - `metadata` object
              - …
        - object
          - `subject` 'identity', required — The entity this permission pertains to.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete' | 'grant-privileges' | 'assign-role' | 'assign-additional-privileges' | 'assume-privileges' | 'revoke-auth' | 'create-token' | 'get-token' | 'delete-token'
            - string[]
          - `conditions` object — When specified, only matching conditions will be allowed to access given resource.
            - `identityId` union
              - …
            - `assignableRole` union
              - …
            - `assignableSubject` union
              - …
            - `assignableAction` union
              - …
        - object
          - `subject` 'pki-subscribers', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete' | 'issue-cert' | 'list-certs'
            - string[]
          - `inverted` boolean — Whether rule allows or forbids.
          - `conditions` object — When specified, only matching conditions will be allowed to access given resource.
            - `name` union
              - …
        - object
          - `subject` 'certificate-templates', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete' | 'issue-cert' | 'list-certs'
            - string[]
          - `inverted` boolean — Whether rule allows or forbids.
          - `conditions` object — When specified, only matching conditions will be allowed to access given resource.
            - `name` union
              - …
        - object
          - `subject` 'secret-rotation', required — The entity this permission pertains to.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'read-generated-credentials' | 'create' | 'edit' | 'delete' | 'rotate-secrets'
            - string[]
          - `conditions` object — When specified, only matching conditions will be allowed to access given resource.
            - `environment` union
              - …
            - `secretPath` union
              - …
            - `connectionId` union
              - …
        - object
          - `subject` 'secret-syncs', required — The entity this permission pertains to.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete' | 'sync-secrets' | 'import-secrets' | 'remove-secrets'
            - string[]
          - `conditions` object — When specified, only matching conditions will be allowed to access given resource.
            - `environment` union
              - …
            - `secretPath` union
              - …
            - `connectionId` union
              - …
        - object
          - `subject` 'pki-syncs', required — The entity this permission pertains to.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete' | 'sync-certificates' | 'import-certificates' | 'remove-certificates' | 'set-post-sync-command'
            - string[]
          - `conditions` object — When specified, only matching conditions will be allowed to access given resource.
            - `name` union
              - …
            - `subscriberName` union
              - …
        - object
          - `subject` 'secret-event-subscriptions', required — The entity this permission pertains to.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — Describe what action an entity can take.
            - 'subscribe-to-creation-events' | 'subscribe-to-update-events' | 'subscribe-to-deletion-events' | 'subscribe-to-import-mutation-events'
            - string[]
          - `conditions` object — When specified, only matching conditions will be allowed to access given resource.
            - `environment` union
              - …
            - `secretPath` union
              - …
            - `connectionId` union
              - …
        - object
          - `subject` 'certificate-profiles', required — The entity this permission pertains to.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete' | 'issue-cert' | 'reveal-acme-eab-secret' | 'rotate-acme-eab-secret' | 'manage-application-attachments'
            - string[]
          - `conditions` object — When specified, only matching conditions will be allowed to access given resource.
            - `slug` union
              - …
        - object
          - `subject` 'certificate-policies', required — The entity this permission pertains to.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete'
            - string[]
          - `conditions` object — When specified, only matching conditions will be allowed to access given resource.
            - `name` union
              - …
        - object
          - `subject` 'certificate-authorities', required — The entity this permission pertains to.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete' | 'issue-ca-certificate' | 'sign-intermediate'
            - string[]
          - `conditions` object — When specified, only matching conditions will be allowed to access given resource.
            - `name` union
              - …
        - object
          - `subject` 'certificates', required — The entity this permission pertains to.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete' | 'read-private-key' | 'import'
            - string[]
          - `conditions` object — When specified, only matching conditions will be allowed to access given resource.
            - `commonName` union
              - …
            - `altNames` union
              - …
            - `serialNumber` union
              - …
            - `friendlyName` union
              - …
            - `status` union
              - …
            - `metadata` object
              - …
        - object
          - `subject` 'ssh-certificate-authorities', required — DEPRECATED. The entity belonged to a removed product; accepted for backwards compatibility.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — DEPRECATED. Accepted for backwards compatibility; grants nothing.
            - string
            - string[]
          - `conditions` object — DEPRECATED. Accepted for backwards compatibility; ignored.
        - object
          - `subject` 'ssh-certificates', required — DEPRECATED. The entity belonged to a removed product; accepted for backwards compatibility.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — DEPRECATED. Accepted for backwards compatibility; grants nothing.
            - string
            - string[]
          - `conditions` object — DEPRECATED. Accepted for backwards compatibility; ignored.
        - object
          - `subject` 'ssh-certificate-templates', required — DEPRECATED. The entity belonged to a removed product; accepted for backwards compatibility.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — DEPRECATED. Accepted for backwards compatibility; grants nothing.
            - string
            - string[]
          - `conditions` object — DEPRECATED. Accepted for backwards compatibility; ignored.
        - object
          - `subject` 'ssh-hosts', required — DEPRECATED. The entity belonged to a removed product; accepted for backwards compatibility.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — DEPRECATED. Accepted for backwards compatibility; grants nothing.
            - string
            - string[]
          - `conditions` object — DEPRECATED. Accepted for backwards compatibility; ignored.
        - object
          - `subject` 'ssh-host-groups', required — DEPRECATED. The entity belonged to a removed product; accepted for backwards compatibility.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — DEPRECATED. Accepted for backwards compatibility; grants nothing.
            - string
            - string[]
          - `conditions` object — DEPRECATED. Accepted for backwards compatibility; ignored.
        - object
          - `subject` 'mcp-endpoints', required — DEPRECATED. The entity belonged to a removed product; accepted for backwards compatibility.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — DEPRECATED. Accepted for backwards compatibility; grants nothing.
            - string
            - string[]
          - `conditions` object — DEPRECATED. Accepted for backwards compatibility; ignored.
        - object
          - `subject` 'mcp-servers', required — DEPRECATED. The entity belonged to a removed product; accepted for backwards compatibility.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — DEPRECATED. Accepted for backwards compatibility; grants nothing.
            - string
            - string[]
          - `conditions` object — DEPRECATED. Accepted for backwards compatibility; ignored.
        - object
          - `subject` 'mcp-activity-logs', required — DEPRECATED. The entity belonged to a removed product; accepted for backwards compatibility.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — DEPRECATED. Accepted for backwards compatibility; grants nothing.
            - string
            - string[]
          - `conditions` object — DEPRECATED. Accepted for backwards compatibility; ignored.
        - object
          - `subject` 'secret-approval', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete'
            - string[]
        - object
          - `subject` 'secret-rollback', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create'
            - string[]
        - object
          - `subject` 'member', required — The entity this permission pertains to.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete' | 'grant-privileges' | 'assign-role' | 'assign-additional-privileges' | 'assume-privileges'
            - string[]
          - `conditions` object — When specified, only matching conditions will be allowed to access given resource.
            - `userEmail` union
              - …
            - `assignableRole` union
              - …
            - `assignableSubject` union
              - …
            - `assignableAction` union
              - …
        - object
          - `subject` 'groups', required — The entity this permission pertains to.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete' | 'grant-privileges' | 'assign-role'
            - string[]
          - `conditions` object — When specified, only matching conditions will be allowed to access given resource.
            - `groupName` union
              - …
            - `assignableRole` union
              - …
        - object
          - `subject` 'role', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete'
            - string[]
        - object
          - `subject` 'integrations', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete'
            - string[]
        - object
          - `subject` 'webhooks', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete'
            - string[]
        - object
          - `subject` 'service-tokens', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete'
            - string[]
        - object
          - `subject` 'settings', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete'
            - string[]
        - object
          - `subject` 'environments', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete'
            - string[]
        - object
          - `subject` 'tags', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete'
            - string[]
        - object
          - `subject` 'audit-logs', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read'
            - string[]
        - object
          - `subject` 'insights', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'generate-report' | 'delete-report'
            - string[]
        - object
          - `subject` 'ip-allowlist', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete'
            - string[]
        - object
          - `subject` 'pki-alerts', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete'
            - string[]
        - object
          - `subject` 'pki-collections', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete'
            - string[]
        - object
          - `subject` 'certificate-inventory-views', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete'
            - string[]
        - object
          - `subject` 'pki-discovery', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete' | 'run-scan'
            - string[]
        - object
          - `subject` 'pki-certificate-installations', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'edit' | 'delete'
            - string[]
        - object
          - `subject` 'code-signers', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete' | 'sign'
            - string[]
        - object
          - `subject` 'workspace', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'edit' | 'delete'
            - string[]
        - object
          - `subject` 'kms', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'edit'
            - string[]
        - object
          - `subject` 'cmek', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete' | 'encrypt' | 'decrypt' | 'sign' | 'verify' | 'generate-mac' | 'verify-mac' | 'rotate' | 'export-private-key'
            - string[]
        - object
          - `subject` 'kmip', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'create-clients' | 'update-clients' | 'delete-clients' | 'read-clients' | 'generate-client-certificates'
            - string[]
        - object
          - `subject` 'commits', required — The entity this permission pertains to.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'perform-rollback'
            - string[]
          - `conditions` object — When specified, only matching conditions will be allowed to access given resource.
            - `environment` union
              - …
            - `secretPath` union
              - …
        - object
          - `subject` 'secret-scanning-data-sources', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read-data-sources' | 'create-data-sources' | 'edit-data-sources' | 'delete-data-sources' | 'trigger-data-source-scans' | 'read-data-source-scans' | 'read-data-source-resources'
            - string[]
        - object
          - `subject` 'secret-scanning-findings', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read-findings' | 'update-findings'
            - string[]
        - object
          - `subject` 'secret-scanning-configs', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read-configs' | 'update-configs'
            - string[]
        - object
          - `subject` 'app-connections', required — The entity this permission pertains to.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — Describe what action an entity can take.
            - 'read-app-connections' | 'create-app-connections' | 'edit-app-connections' | 'delete-app-connections' | 'connect-app-connections' | 'rotate-credentials'
            - string[]
          - `conditions` object — When specified, only matching conditions will be allowed to access given resource.
            - `connectionId` union
              - …
        - object
          - `subject` 'hsm-connectors', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read-hsm-connectors' | 'create-hsm-connectors' | 'edit-hsm-connectors' | 'delete-hsm-connectors' | 'test-hsm-connectors' | 'attach-hsm-connectors'
            - string[]
        - object
          - `subject` 'honey-tokens', required — The entity this permission pertains to.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'read-credentials' | 'create' | 'edit' | 'reset' | 'revoke'
            - string[]
          - `conditions` object — When specified, only matching conditions will be allowed to access given resource.
            - `environment` union
              - …
            - `secretPath` union
              - …
        - object
          - `subject` 'proxied-services', required — The entity this permission pertains to.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create' | 'edit' | 'delete' | 'proxy' | 'report-usage'
            - string[]
          - `conditions` object — When specified, only matching conditions will be allowed to access given resource.
            - `environment` union
              - …
            - `secretPath` union
              - …
        - object
          - `subject` 'approval-requests', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'create'
            - string[]
        - object
          - `subject` 'approval-request-grants', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read' | 'revoke'
            - string[]
        - object
          - `subject` 'secret-approval-request', required — The entity this permission pertains to.
          - `action` union, required — Describe what action an entity can take.
            - 'read'
            - string[]
        - object
          - `subject` 'project-folder-grant', required — The entity this permission pertains to.
          - `inverted` boolean — Whether rule allows or forbids.
          - `action` union, required — Describe what action an entity can take.
            - 'read-grant' | 'create-grant' | 'revoke-grant'
            - string[]
          - `conditions` object — When specified, only matching conditions will be allowed to access given resource.
            - `environment` union
              - …
            - `secretPath` union
              - …
  - `environments` object[], nullable — The updated environments to be created when the template is applied to a project.
    - `name` string, required
    - `slug` string, required
    - `position` number, required
  - `users` object[], nullable — The updated users to be automatically added to projects created from this template. Each user is identified by username and assigned one or more roles.
    - `username` string, required
    - `roles` string[], required
  - `groups` object[], nullable — The updated groups to be automatically added to projects created from this template. Each group is identified by slug and assigned one or more roles.
    - `groupSlug` string, required
    - `roles` string[], required
  - `identities` object[], nullable — The updated organization-owned identities to be automatically added to projects created from this template. Each identity is identified by ID and assigned one or more roles.
    - `identityId` string, uuid, required
    - `roles` string[], required
  - `projectManagedIdentities` object[], nullable — The updated project-owned identities to be automatically created for projects created from this template. Each identity is identified by name and assigned one or more roles.
    - `name` string, required
    - `roles` string[], required

## Response `200`

Default Response

- object
  - `projectTemplate` object, required
    - `id` string, uuid, required
    - `name` string, required
    - `description` string, nullable
    - `roles` object[], required
      - `name` string, required
      - `slug` string, required
      - `permissions` object[], required
        - `subject` union
          - string
          - string[]
        - `action` union, required
          - string
          - string[]
        - `conditions` unknown
        - `inverted` boolean
    - `environments` object[], nullable, required
      - `name` string, required
      - `slug` string, required
      - `position` number, required
    - `orgId` string, uuid, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `type` string
    - `projectManagedIdentities` object[], nullable, required
      - `name` string, required
      - `roles` string[], required
    - `users` object[], nullable, required
      - `username` string, required
      - `roles` string[], required
    - `groups` object[], nullable, required
      - `groupSlug` string, required
      - `roles` string[], required
    - `identities` object[], nullable, required
      - `identityId` string, uuid, required
      - `identityName` string, required
      - `roles` string[], required

## Other responses

- `400` — Default Response
- `401` — Default Response
- `403` — Default Response
- `404` — Default Response
- `422` — Default Response
- `500` — Default Response

---

[API](https://skmtc.net/infisical/apis/infisical-api.md) · [All operations](https://skmtc.net/infisical/apis/infisical-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/infisical/infisical-api/versions/885aef3e6c11/schema)
