SSL API

Skip to main content
Du bist hier:
Drucken

SSL API

SSL API

In this guide we explain how to use our SSL API. The API allows you to retrieve your SSL certificates and trigger renewals automatically.

 

Step 1: Enable API access

Before you can use the SSL API, go to admin.firestorm.ch and log in with your FireStorm ID. Enable the API under Account => Customer Profile => API Access.

Step 2: Copy the API key

After activation, your personal API key is displayed. Copy this key and use it for all API requests.

Step 3: Use the API

With API key (recommended)

curl -H "X-API-Key: DEIN_API_KEY" https://api.firestorm.ch/ssl/v1/certificates

Alternative: Basic Auth

curl -u "DEINE_EMAIL:DEIN_PASSWORT" https://api.firestorm.ch/ssl/v1/certificates

 

API endpoints

Method Endpoint Description
GET /ssl/v1/certificates List all SSL certificates
GET /ssl/v1/certificate?service_id={id} Retrieve the details of a certificate (incl. history)
POST /ssl/v1/renew Trigger the renewal of an SSL certificate

 

Examples

List all certificates

curl -H "X-API-Key: DEIN_API_KEY" https://api.firestorm.ch/ssl/v1/certificates

Response:

{
    "status": "OK",
    "count": 2,
    "certificates": [
        {
            "service_id": 12345,
            "domain": "example.ch",
            "product": "PositiveSSL",
            "service_status": "Active",
            "ssl_status": "Completed",
            "next_due_date": "2027-02-17",
            "valid_from": "2026-02-17",
            "valid_to": "2026-08-17",
            "days_until_expiry": 180,
            "common_name": "example.ch",
            "auto_reissue_count": 1,
            "last_auto_reissue": "2026-02-17 03:00:00"
        }
    ]
}

 

Filter by domain

curl -H "X-API-Key: DEIN_API_KEY" "https://api.firestorm.ch/ssl/v1/certificates?domain=example.ch"

 

Certificate details with history

curl -H "X-API-Key: DEIN_API_KEY" "https://api.firestorm.ch/ssl/v1/certificate?service_id=12345"

Response:

{
    "status": "OK",
    "certificate": {
        "service_id": 12345,
        "domain": "example.ch",
        "product": "PositiveSSL",
        "service_status": "Active",
        "ssl_status": "Completed",
        "next_due_date": "2027-02-17",
        "valid_from": "2026-02-17",
        "valid_to": "2026-08-17",
        "days_until_expiry": 180,
        "common_name": "example.ch",
        "auto_reissue_count": 1,
        "last_auto_reissue": "2026-02-17 03:00:00",
        "history": [
            {
                "valid_from": "2025-08-17",
                "valid_to": "2026-02-17",
                "common_name": "example.ch",
                "reissued_at": "2026-02-17 03:00:00"
            }
        ]
    }
}

 

Renew an SSL certificate

A renewal is possible if the due date is within the next 90 days. A new order and invoice are created automatically.

curl -X POST -H "X-API-Key: DEIN_API_KEY" -H "Content-Type: application/json" -d '{"service_id": 12345}' https://api.firestorm.ch/ssl/v1/renew

Response on success:

{
    "status": "OK",
    "message": "Renewal order created successfully.",
    "order_id": 67890,
    "invoice_id": 11111,
    "service": {
        "service_id": 12345,
        "domain": "example.ch",
        "product": "PositiveSSL",
        "next_due_date": "2027-02-17",
        "price_chf": 24.80
    }
}

 

Error messages

HTTP Code Meaning
200 Request successful
400 Missing parameters or renewal not yet possible
401 Authentication failed
404 Certificate not found or does not belong to your account
500 Server error while creating the order

 

Notes

  • Automatic reissue: Your SSL certificates are automatically renewed before they expire (reissue). You only need to trigger the annual renewal via the API.
  • Renewal period: The renewal can be triggered no earlier than 90 days before the due date.
  • Invoice: When renewing, an invoice is automatically created with your stored payment method.
  • Rate limiting: After 25 failed authentication attempts, your IP address is blocked for 6 hours.

 

Automation with cron

Example: daily check whether a renewal is due (requires jq):

#!/bin/bash
API_KEY="DEIN_API_KEY"
API_URL="https://api.firestorm.ch/ssl/v1"

# Alle Zertifikate abrufen
CERTS=$(curl -s -H "X-API-Key: $API_KEY" "$API_URL/certificates")

# Service IDs extrahieren und prüfen
echo "$CERTS" | jq -r ".certificates[] | .service_id" | while read SID; do
  DUE=$(echo "$CERTS" | jq -r ".certificates[] | select(.service_id == $SID) | .next_due_date")
  DAYS=$(( ($(date -d "$DUE" +%s) - $(date +%s)) / 86400 ))

  if [ "$DAYS" -le 30 ] && [ "$DAYS" -ge 0 ]; then
    echo "Service $SID: fällig in $DAYS Tagen - verlängere..."
    curl -s -X POST -H "X-API-Key: $API_KEY" 
      -H "Content-Type: application/json" 
      -d "{"service_id": $SID}" "$API_URL/renew"
  fi
done

 

For questions or support, please contact us via our ticket system.

Related Post