/certificates/ (POST)
POST
/certificates/
const url = 'https://pki.example.com/api/v1/certificates/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"caId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","subject":{"commonName":"example","organization":"example","organizationalUnit":"example","country":"example","state":"example","locality":"example"},"certificateType":"server","keyAlgorithm":"RSA-2048","validityDays":1,"sanDns":["example"],"sanIp":["example"],"sanEmail":["hello@example.com"],"tags":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://pki.example.com/api/v1/certificates/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "caId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "subject": { "commonName": "example", "organization": "example", "organizationalUnit": "example", "country": "example", "state": "example", "locality": "example" }, "certificateType": "server", "keyAlgorithm": "RSA-2048", "validityDays": 1, "sanDns": [ "example" ], "sanIp": [ "example" ], "sanEmail": [ "hello@example.com" ], "tags": [ "example" ] }'Issue a new certificate signed by a Certificate Authority
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
caId
required
ID of the issuing CA
string format: uuid
subject
required
object
commonName
required
string
organization
required
string
organizationalUnit
string
country
required
string
state
string
locality
string
certificateType
required
string
keyAlgorithm
required
string
validityDays
required
Validity period in days
integer
sanDns
DNS Subject Alternative Names
Array<string>
sanIp
IP Subject Alternative Names
Array<string>
sanEmail
Email Subject Alternative Names
Array<string>
tags
Array<string>
Responses
Section titled “Responses”Default Response
Media typeapplication/json
object
id
string format: uuid
subject
string
serialNumber
string
notBefore
string format: date-time
notAfter
string format: date-time
certificatePem
string
status
string
Example
{ "status": "active"}Default Response
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Array<object>
object
field
string
message
string
Example generated
{ "error": { "code": "example", "message": "example", "details": [ { "field": "example", "message": "example" } ] }}Default Response
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Array<object>
object
field
string
message
string
Example generated
{ "error": { "code": "example", "message": "example", "details": [ { "field": "example", "message": "example" } ] }}Default Response
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Array<object>
object
field
string
message
string
Example generated
{ "error": { "code": "example", "message": "example", "details": [ { "field": "example", "message": "example" } ] }}Default Response
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Array<object>
object
field
string
message
string
Example generated
{ "error": { "code": "example", "message": "example", "details": [ { "field": "example", "message": "example" } ] }}