API v1 · Stable

Rescora API

Integriere Rescora's Deal Intelligence direkt in deine Tools. Echtzeit-Rescue Scores, Pipeline Health und Forecast-Daten über eine einfache REST API.

Getting Started

1. API Key erstellen

Gehe zu app.rescora.de → Settings → API Keys und erstelle einen neuen Key. Der Key wird nur einmal angezeigt — speichere ihn sicher.

POST https://api.rescora.de/api-keys
Authorization: Bearer <dein-jwt-token>

{
  "name": "Meine Integration",
  "scopes": ["read"]
}

⚠️ API Keys beginnen immer mit rsc_ — speichere sie wie Passwörter.

2. Erster API Call

curl https://api.rescora.de/api/v1/pipeline-health \
  -H "Authorization: Bearer rsc_dein_api_key"

Response:

{
  "total_deals": 42,
  "total_pipeline_value": 1250000.00,
  "at_risk_deals": 8,
  "at_risk_value": 340000.00,
  "critical_deals": 3,
  "health_score": 81.0,
  "generated_at": "2026-05-12T10:00:00Z"
}

Authentication

Alle API Requests erfordern einen API Key im Authorization Header:

Authorization: Bearer rsc_your_api_key_here

read

GET Endpoints

write

POST/PATCH (coming soon)

admin

Alle Operationen

Endpoints

GET /api/v1

API Info und verfügbare Endpoints.

curl https://api.rescora.de/api/v1 \
  -H "Authorization: Bearer rsc_..."
GET /api/v1/deals

Alle offenen Deals mit Rescue Scores und Risikobewertung.

Query Parameters

ParameterTypeDefaultBeschreibung
limitinteger50Max 200
offsetinteger0Pagination offset
curl "https://api.rescora.de/api/v1/deals?limit=10&offset=0" \
  -H "Authorization: Bearer rsc_..."

# Response
{
  "data": [
    {
      "id": "98089340-f14e-4e34-...",
      "account_name": "Siemens Energy GmbH",
      "amount": 75000.0,
      "stage": "Negotiation",
      "rescue_score": 87,
      "risk_bucket": "Likely Slip",
      "close_date": "2026-05-31",
      "owner_name": "Max Müller"
    }
  ],
  "total": 10,
  "limit": 10,
  "offset": 0
}
GET /api/v1/deals/{id}

Vollständige Details für einen einzelnen Deal.

curl https://api.rescora.de/api/v1/deals/98089340-f14e-4e34-8762-1c93ce469591 \
  -H "Authorization: Bearer rsc_..."
GET /api/v1/pipeline-health

Aggregierte Pipeline Health Metriken — ideal für Dashboards und Alerts.

curl https://api.rescora.de/api/v1/pipeline-health \
  -H "Authorization: Bearer rsc_..."

# Response
{
  "total_deals": 42,
  "total_pipeline_value": 1250000.00,
  "at_risk_deals": 8,
  "at_risk_value": 340000.00,
  "critical_deals": 3,
  "health_score": 81.0,
  "generated_at": "2026-05-12T10:00:00Z"
}
GET /api/v1/forecast

Forecast-Daten für den aktuellen Monat (Commit / Best Case / Pipeline).

curl https://api.rescora.de/api/v1/forecast \
  -H "Authorization: Bearer rsc_..."

# Response
{
  "commit": 320000.00,
  "best_case": 580000.00,
  "pipeline": 350000.00,
  "total": 1250000.00,
  "period": "2026-05"
}

Rate Limits

Endpoint Limit Window
/api/v1/deals60 Requestspro Minute
/api/v1/deals/{id}60 Requestspro Minute
/api/v1/pipeline-health30 Requestspro Minute
/api/v1/forecast30 Requestspro Minute

Bei Überschreitung: HTTP 429 mit Retry-After Header.

Error Codes

Code Bedeutung Lösung
401UnauthorizedAPI Key fehlt oder ungültig
403ForbiddenScope fehlt für diese Operation
404Not FoundRessource existiert nicht oder falsche Org
422Validation ErrorUngültige Parameter
429Too Many RequestsRate Limit erreicht — Retry-After beachten
500Server ErrorInterner Fehler — bitte support@rescora.de

Code Examples

🐍 Python

import requests

API_KEY = "rsc_your_api_key"
BASE_URL = "https://api.rescora.de/api/v1"

headers = {"Authorization": f"Bearer {API_KEY}"}

# Pipeline Health abrufen
health = requests.get(f"{BASE_URL}/pipeline-health", headers=headers).json()
print(f"Health Score: {health['health_score']}%")
print(f"Kritische Deals: {health['critical_deals']}")

# Alle at-risk Deals laden
deals = requests.get(f"{BASE_URL}/deals", headers=headers).json()
for deal in deals["data"]:
    if deal["rescue_score"] >= 70:
        print(f"⚠ {deal['account_name']}: Score {deal['rescue_score']}")

⚡ JavaScript / Node.js

const API_KEY = "rsc_your_api_key";
const BASE_URL = "https://api.rescora.de/api/v1";

const headers = { "Authorization": `Bearer ${API_KEY}` };

// Pipeline Health
const health = await fetch(`${BASE_URL}/pipeline-health`, { headers })
  .then(r => r.json());

console.log(`Health Score: ${health.health_score}%`);

// Deals mit hohem Rescue Score
const { data: deals } = await fetch(`${BASE_URL}/deals?limit=50`, { headers })
  .then(r => r.json());

const criticalDeals = deals.filter(d => d.rescue_score >= 70);
console.log(`${criticalDeals.length} kritische Deals`);

🖥 cURL

# Pipeline Health
curl https://api.rescora.de/api/v1/pipeline-health \
  -H "Authorization: Bearer rsc_your_api_key"

# Alle Deals (paginiert)
curl "https://api.rescora.de/api/v1/deals?limit=50&offset=0" \
  -H "Authorization: Bearer rsc_your_api_key"

# Deal Detail
curl https://api.rescora.de/api/v1/deals/DEAL_UUID \
  -H "Authorization: Bearer rsc_your_api_key"

Interaktive API-Dokumentation

Teste alle Endpoints direkt im Browser mit deinem API Key.

Swagger UI öffnen →