Terminal
Terminal/Skill
Covers the Infisical REST API, including Universal Auth login, secret CRUD, projects, identities, pagination and rate limits.
By Infisical
Works with
npx skills add infisical/ai-skills --skill infisical-apiThis skill provides guidance for working with the Infisical REST API. Use it when you need to:
| If the user wants... | Use |
|---|---|
| The CLI, an SDK, or a platform integration | infisical-setup |
| Terraform/HCL | infisical-terraform |
| Human login via SAML/OIDC/LDAP | infisical-sso |
| Roles, permissions, and approval policies | infisical-access-control |
| The KMS encrypt/decrypt/sign endpoints | infisical-kms |
| Certificate endpoints | infisical-pki |
| Secret sync / rotation / App Connection endpoints | the matching product skill |
This skill covers the core secrets, projects, and identities API. Product-specific endpoints are documented in their own skills, where the surrounding concepts live.
/api/v4/secrets is not paginated — it returns every secret at the requested path in one response and ignores offset/limit. Scope results with secretPath, recursive, tagSlugs, or metadataFilter instead. Pagination exists on other collection endpoints (identities, memberships, certificates), which return { <resource>: [...], totalCount: n }retry-after header (seconds remaining, not a timestamp)POST/PATCH/DELETE /api/v4/secrets/batch rather than per-secret calls; batch delete takes secrets: [{ secretKey }]curl -X POST https://us.infisical.com/api/v1/auth/universal-auth/login \
-H "Content-Type: application/json" \
-d '{
"clientId": "YOUR_CLIENT_ID",
"clientSecret": "YOUR_CLIENT_SECRET"
}'
Response:
{
"accessToken": "eyJ...",
"expiresIn": 3600,
"accessTokenMaxTTL": 86400,
"tokenType": "Bearer"
}
curl -X GET 'https://us.infisical.com/api/v4/secrets?projectId=PROJECT_ID&environment=dev' \
-H "Authorization: Bearer eyJ..."
Returns every secret at the path — there is no pagination on this endpoint.
curl -X GET 'https://us.infisical.com/api/v4/secrets?projectId=PROJECT_ID&environment=dev' \
-H "Authorization: Bearer TOKEN"
Add recursive=true to include subfolders:
curl -X GET 'https://us.infisical.com/api/v4/secrets?projectId=PROJECT_ID&environment=dev&secretPath=/&recursive=true' \
-H "Authorization: Bearer TOKEN"
Response is { "secrets": [...], "imports": [...] } — no total, offset, or limit keys.
curl -X POST 'https://us.infisical.com/api/v4/secrets/MY_SECRET' \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{
"projectId": "PROJECT_ID",
"environment": "dev",
"secretPath": "/",
"secretValue": "super-secret-value",
"type": "shared"
}'
curl -X GET 'https://us.infisical.com/api/v4/secrets/MY_SECRET?projectId=PROJECT_ID&environment=dev&secretPath=/' \
-H "Authorization: Bearer TOKEN"
curl -X PATCH 'https://us.infisical.com/api/v4/secrets/MY_SECRET' \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{
"projectId": "PROJECT_ID",
"environment": "dev",
"secretPath": "/",
"secretValue": "new-value"
}'
curl -X DELETE 'https://us.infisical.com/api/v4/secrets/MY_SECRET?projectId=PROJECT_ID&environment=dev&secretPath=/' \
-H "Authorization: Bearer TOKEN"
Content-Type: application/json on any request that carries a JSON bodyexpiresIn seconds; implement refresh logic for long-running operationsus.infisical.com with your custom domainviewSecretValue defaults to true; set it to false when you only need key namesrecursive parameter on list secrets includes secrets in all subdirectories/api/v4/secrets also exposes /move, /duplicate, /batch (POST, PATCH, DELETE), /id/:secretId, and secret-reference tree endpoints