diff --git a/docs/documentation/platform/pki/certificate-templates.mdx b/docs/documentation/platform/pki/certificate-templates.mdx index 9afaf456f..a014a6c01 100644 --- a/docs/documentation/platform/pki/certificate-templates.mdx +++ b/docs/documentation/platform/pki/certificate-templates.mdx @@ -55,4 +55,61 @@ In the following steps, we explore how to issue a X.509 certificate using a cert + + + + To create a certificate template, make an API request to the [Create Certificate Template](/api-reference/endpoints/certificate-templates/create) API endpoint. + + ### Sample request + + ```bash Request + curl --request POST \ + --url https://app.infisical.com/api/v1/pki/certificate-templates \ + --header 'Content-Type: application/json' \ + --data '{ + "caId": "", + "pkiCollectionId": "", + "name": "", + "commonName": "", + "subjectAlternativeName": "", + "ttl": "" + }' + ``` + + ### Sample response + + ```bash Response + { + "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", + "caId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", + "name": "", + "commonName": "", + "subjectAlternativeName": "", + "pkiCollectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", + "ttl": "", + "projectId": "", + "caName": "" + } + ``` + + + To use the certificate template, attach the certificate template ID when invoking the API endpoint for [issuing](/api-reference/endpoints/certificates/issue-certificate) or [signing](/api-reference/endpoints/certificates/sign-certificate) new certificates. + + ### Sample request + + ```bash Request + curl --request POST \ + --url https://app.infisical.com/api/v1/pki/certificates/issue-certificate \ + --header 'Content-Type: application/json' \ + --data '{ + "certificateTemplateId": "", + "friendlyName": "", + "commonName": "", + ... + }' + ``` + + + +