---
title: "POST /api/v1/ssh/certificate-templates"
method: POST
path: "/api/v1/ssh/certificate-templates"
tags: ["SSH Certificate Templates"]
---

# POST /api/v1/ssh/certificate-templates

`POST /api/v1/ssh/certificate-templates`

## Request body

- object
  - `sshCaId` string, required — The ID of the SSH CA to associate the certificate template with.
  - `name` string, required — The name of the certificate template.
  - `ttl` string — The default time to live for issued certificates such as 1m, 1h, 1d, 1y, ...
  - `maxTTL` string — The maximum time to live for issued certificates such as 1m, 1h, 1d, 1y, ...
  - `allowedUsers` string[], required — The list of allowed users for certificates issued under this template.
  - `allowedHosts` string[], required — The list of allowed hosts for certificates issued under this template.
  - `allowUserCertificates` boolean, required — Whether or not to allow user certificates to be issued under this template.
  - `allowHostCertificates` boolean, required — Whether or not to allow host certificates to be issued under this template.
  - `allowCustomKeyIds` boolean, required — Whether or not to allow custom key IDs for certificates issued under this template.

## Response `200`

Default Response

- object
  - `id` string, uuid, required
  - `sshCaId` string, uuid, required
  - `status` string, required
  - `name` string, required
  - `ttl` string, required
  - `maxTTL` string, required
  - `allowedUsers` string[], required
  - `allowedHosts` string[], required
  - `allowCustomKeyIds` boolean, required
  - `allowUserCertificates` boolean, required
  - `allowHostCertificates` boolean, required

## Other responses

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

---

[API](https://skmtc.dev/infisical/apis/infisical-api.md) · [All operations](https://skmtc.dev/infisical/apis/infisical-api/llms.txt) · [OpenAPI document](https://skmtc.dev/infisical/apis/infisical-api/revisions/53fe4d80973f?raw)
