## Panel certificate (`panel-cert`)

Admin only. Status of the panel's own HTTPS certificate; one click issues a Let's Encrypt certificate for the panel domain, renewed with certificate management.

Authentication: Admin only · Docs: https://www-demo.kuxitong.com/en/docs/api/panel-cert

### GET `/api/v2/panel-cert`

Get panel certificate status · Authentication: Admin only

```sh
curl "https://panel.example.com/api/v2/panel-cert" \
  -H "X-API-Key: $GOCDN_API_KEY"
```

### POST `/api/v2/panel-cert/issue`

Issue panel certificate · Authentication: Admin only

```sh
curl -X POST "https://panel.example.com/api/v2/panel-cert/issue" \
  -H "X-API-Key: $GOCDN_API_KEY"
```

Panel certificate object:

| Field | Type | Required | Description |
|---|---|---|---|
| `acme` | CertAcme |  | Automatic issuance state (state, challenge type, renewal and the last failure reason). |
| `cert` | Cert |  | Certificate (responses carry the chain, names, expiry and status but never the private key; export the key via the export endpoint). |
| `cert_id` | integer |  | panel.tls.cert_id; 0 when no panel certificate is configured. |
| `domain` | string |  | Panel domain; empty when not set. |
| `https` | string |  | Current state of panel HTTPS. on = the panel certificate is usable and the controller listens for HTTPS; no_domain = no panel domain set (no certificate is requested); no_cert = a domain is set but there is no usable panel certificate; issuing = the certificate is being issued; failed = issuance failed (see acme.last_error; automatic requests retry at intervals); no_listen = the certificate exists but the controller config file has no HTTPS listener (listen_tls); expired = the panel certificate has expired (not_after has passed and renewal has not succeeded). Values: ["on","no_domain","no_cert","issuing","failed","no_listen","expired"] |
