Project Templates
Create
Overview
- Introduction
- Authentication
- Examples
Endpoints
- Identities
- Token Auth
- Universal Auth
- GCP Auth
- AWS Auth
- Azure Auth
- Kubernetes Auth
- OIDC Auth
- JWT Auth
- Groups
- Organizations
- Projects
- Project Users
- Project Groups
- Project Identities
- Project Roles
- Project Templates
- Environments
- Folders
- Secret Tags
- Secrets
- Dynamic Secrets
- Secret Imports
- Identity Specific Privilege
- App Connections
- Secret Syncs
- Integrations
- Service Tokens
- Audit Logs
Infisical PKI
- Certificate Authorities
- Certificates
- Certificate Templates
- Certificate Collections
- PKI Alerting
Infisical SSH
- Certificates
- Certificate Authorities
- Certificate Templates
Infisical KMS
- Keys
Project Templates
Create
Create a project template.
POST
/
api
/
v1
/
project-templates
curl --request POST \
--url https://us.infisical.com/api/v1/project-templates \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"description": "<string>",
"roles": [],
"environments": [
{
"name": "Development",
"slug": "dev",
"position": 1
},
{
"name": "Staging",
"slug": "staging",
"position": 2
},
{
"name": "Production",
"slug": "prod",
"position": 3
}
]
}'
{
"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.
Body
application/json
The name of the project template to be created. Must be slug-friendly.
Required string length:
1 - 32
An optional description of the project template.
Maximum length:
256
The roles to be created when the template is applied to a project.
Minimum length:
1
Required string length:
1 - 32
The entity this permission pertains to.
Available options:
secrets
Describe what action an entity can take.
Available options:
read
, create
, edit
, delete
Whether rule allows or forbids.
When specified, only matching conditions will be allowed to access given resource.
Response
200
application/json
Default Response
Minimum length:
1
Required string length:
1 - 32
Was this page helpful?
curl --request POST \
--url https://us.infisical.com/api/v1/project-templates \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"description": "<string>",
"roles": [],
"environments": [
{
"name": "Development",
"slug": "dev",
"position": 1
},
{
"name": "Staging",
"slug": "staging",
"position": 2
},
{
"name": "Production",
"slug": "prod",
"position": 3
}
]
}'
{
"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"
}
}