Skip to main content
POST
/
api
/
v1
/
project-templates
cURL
curl --request POST \
  --url https://us.infisical.com/api/v1/project-templates \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "type": "secret-manager",
  "description": "<string>",
  "roles": [],
  "environments": [
    {
      "name": "<string>",
      "slug": "<string>",
      "position": 2
    }
  ],
  "users": [],
  "groups": [],
  "identities": [],
  "projectManagedIdentities": []
}
'
{
  "projectTemplate": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "roles": [
      {
        "name": "<string>",
        "slug": "<string>",
        "permissions": [
          {
            "action": "<string>",
            "subject": "<string>",
            "conditions": "<unknown>",
            "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",
    "projectManagedIdentities": [
      {
        "name": "<string>",
        "roles": [
          "<string>"
        ]
      }
    ],
    "users": [
      {
        "username": "<string>",
        "roles": [
          "<string>"
        ]
      }
    ],
    "groups": [
      {
        "groupSlug": "<string>",
        "roles": [
          "<string>"
        ]
      }
    ],
    "identities": [
      {
        "identityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "roles": [
          "<string>"
        ]
      }
    ],
    "description": "<string>",
    "type": "secret-manager"
  }
}
You can read more about the role’s permissions field in the permissions documentation.

Body

application/json
name
string
required

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

Required string length: 1 - 64
type
enum<string>
required

The type of project template to be created.

Available options:
secret-manager,
cert-manager,
kms,
ssh,
secret-scanning,
pam,
ai
description
string

An optional description of the project template.

Maximum string length: 256
roles
object[]

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

environments
object[] | null

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

users
object[]

The users to be automatically added to projects created from this template. Each user is identified by username and assigned one or more roles.

groups
object[]

The groups to be automatically added to projects created from this template. Each group is identified by slug and assigned one or more roles.

identities
object[]

The 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.

projectManagedIdentities
object[]

The 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.

Response

Default Response

projectTemplate
object
required