Content API

REST-API für das Content Studio.

Base-URL/api/v1/content
FormatJSON
AuthentifizierungKeine (lokales Netzwerk)

Endpoints

MethodeEndpointBeschreibung
PUT/api/v1/content/{id}Auftrag aktualisieren

PUT /api/v1/content/{id}

Aktualisiert einen bestehenden Content-Auftrag.

Request-Body

{
  "title": "Neuer Titel",                  // required
  "briefing": "Aktualisiertes Briefing",   // required
  "author_profile_id": 1,                  // optional
  "contract_id": 1,                        // optional
  "structure_id": 1                        // optional
}

Beispiel

curl -X PUT https://dev.campus.systemische-tools.de/api/v1/content/1 \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Blogpost über Teamcoaching",
    "briefing": "Schreibe einen informativen Artikel...",
    "author_profile_id": 1,
    "structure_id": 1
  }'

Response (200 OK)

{
  "success": true,
  "data": {
    "id": 1,
    "title": "Blogpost über Teamcoaching",
    "briefing": "Schreibe einen informativen Artikel...",
    "status": "draft",
    "author_profile_id": 1,
    "contract_id": null,
    "structure_id": 1,
    "profile_name": "Akademisch",
    "contract_name": null,
    "structure_name": "Blog-Artikel",
    "created_at": "2025-12-20 10:00:00",
    "updated_at": "2025-12-20 12:30:00"
  }
}

Error-Responses

// 400 Bad Request
{
  "success": false,
  "error": "Titel ist erforderlich"
}

// 404 Not Found
{
  "success": false,
  "error": "Auftrag nicht gefunden"
}

Workflow-Endpoints (HTMX)

Die folgenden Endpoints werden primär über HTMX aufgerufen und liefern HTML-Fragmente:

MethodeEndpointBeschreibung
POST/content/{id}/generateContent generieren
POST/content/{id}/critiqueKritik-Runde starten
POST/content/{id}/reviseRevision erstellen
POST/content/{id}/approveContent genehmigen
POST/content/{id}/declineContent ablehnen

← Zurück zur Content Studio Dokumentation