---
title: "Create one certificate"
method: POST
path: "/api/certificates"
tags: ["certificates"]
---

# Create one certificate

`POST /api/certificates`

Create one certificate

## Request body

- Certificate — A SSL/TLS X509 certificate
  - `autoRenew` string, required — Allow Otoroshi to renew the certificate (if self signed)
  - `ca` string, required — Certificate is a CA (read only)
  - `caRef` string, required — Reference for a CA certificate in otoroshi
  - `chain` string, required — Certificate chain of trust in PEM format
  - `domain` string, required — Domain of the certificate (read only)
  - `from` string, required — Start date of validity
  - `id` string, required — Id of the certificate
  - `privateKey` string, required — PKCS8 private key in PEM format
  - `selfSigned` string, required — Certificate is self signed read only)
  - `subject` string, required — Subject of the certificate (read only)
  - `to` string, required — End date of validity
  - `valid` string, required — Certificate is valid (read only)

## Response `200`

Successful operation

- Certificate — A SSL/TLS X509 certificate
  - `autoRenew` string, required — Allow Otoroshi to renew the certificate (if self signed)
  - `ca` string, required — Certificate is a CA (read only)
  - `caRef` string, required — Reference for a CA certificate in otoroshi
  - `chain` string, required — Certificate chain of trust in PEM format
  - `domain` string, required — Domain of the certificate (read only)
  - `from` string, required — Start date of validity
  - `id` string, required — Id of the certificate
  - `privateKey` string, required — PKCS8 private key in PEM format
  - `selfSigned` string, required — Certificate is self signed read only)
  - `subject` string, required — Subject of the certificate (read only)
  - `to` string, required — End date of validity
  - `valid` string, required — Certificate is valid (read only)

## Other responses

- `400` — Bad resource format. Take another look to the swagger, or open an issue :)
- `401` — You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication
- `404` — Resource not found or does not exist

---

[API](https://skmtc.net/maif/apis/otoroshi.md) · [All operations](https://skmtc.net/maif/apis/otoroshi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/maif/otoroshi/versions/276881687271/schema)
