# SSL API

SSL sertifikası yönetimi endpoint'leri.

## Endpoint'ler

<ApiEndpointCard method="GET" path="/api/v1/ssl/certificates" description="Tüm sertifikaları listele" />

<ApiEndpointCard method="POST" path="/api/v1/ssl/certificates" description="Let's Encrypt sertifikası al" />

<ApiEndpointCard method="DELETE" path="/api/v1/ssl/certificates/{id}" description="Sertifikayı iptal et ve kaldır" />

<ApiEndpointCard method="POST" path="/api/v1/ssl/certificates/custom" description="Özel sertifika yükle" />

<ApiEndpointCard method="POST" path="/api/v1/ssl/certificates/{id}/renew" description="Sertifikayı yenile" />

## Sertifika İsteme

```bash
POST /api/v1/ssl/certificates
Content-Type: application/json

{
    "domains": ["example.com", "www.example.com"],
    "account_username": "musteri",
    "challenge": "http-01"
}
```

Yanıt (asenkron — kuyruğa alınır):

```json
{
    "success": true,
    "data": {
        "job_id": "job_ssl_abc123",
        "status": "queued",
        "domains": ["example.com", "www.example.com"],
        "check_url": "/api/v1/jobs/job_ssl_abc123"
    }
}
```

## Sertifika Durumu Kontrolü

```bash
GET /api/v1/ssl/certificates?domain=example.com
```

```json
{
    "success": true,
    "data": [{
        "id": 5,
        "domains": ["example.com", "www.example.com"],
        "issuer": "Let's Encrypt",
        "valid_from": "2026-05-13T00:00:00Z",
        "valid_until": "2026-08-11T00:00:00Z",
        "days_remaining": 89,
        "auto_renew": true,
        "status": "active"
    }]
}
```

---

*Wildcard (DNS-01) ve özel CA endpoint'leri yakında eklenecek.*
