# Upload CA certificate

Upload (add) a Certification Authority (CA) certificate to the system.
This operation is intended to add a CA that is not present among the trusted ones already configured.
Requires a token with **administrator** privileges.
Body is `application/json` and contains:
* `certificate`: the certificate to add (typically base64 / PEM content as a string, per examples)
* `tags` (optional): object with any of: `chain`, `trusted`, `tsa`

Endpoint: POST /admin/certificates/
Version: 1.0
Security: AuthToken

## Security:

  - `AuthToken` (unknown)
    apiKey in header Authorization

## Request fields (application/json):

  - `certificate` (string, required)
    Certificate content (as string, e.g. base64/PEM as provided by clients)

  - `tags` (object)
    Optional tags to classify the certificate

  - `tags.chain` (object)

  - `tags.trusted` (object)

  - `tags.tsa` (object)

## Request examples:

  - `add` (unknown)

## Response 201:

  - `201` (unknown)
    CA certificate added successfully

## Response 201 fields (application/json):

  - `data` (object)

  - `data.hash` (string)

  - `data.certificate` (string)

  - `data.tags` (object)

  - `data.not_before` (object)

  - `data.not_before.option` (string)
    ASN.1 time option (GENERAL_TIME or UTC_TIME)
    Example: UTC_TIME

  - `data.not_before.utc` (boolean)
    True if time is UTC-based

  - `data.not_before.value` (string)
    ISO 8601 datetime
    Example: 2043-06-05T17:35:47

  - `data.cert_id` (string)

  - `data.serial_number` (string)

  - `data.subject` (string)

  - `data.issuer` (string)

## Response 401:

  - `401` (unknown)
    Unauthorized (invalid or missing token)

## Response 401 fields (application/json):

  - `title` (string)

  - `description` (string)

  - `code` (string)

  - `message` (string)

## Response 502:

  - `502` (unknown)
    Upstream/service error (HTML body)

## Response 401 examples:

  - `invalidToken` (unknown)

