Content API
REST-API für das Content Studio.
| Base-URL | /api/v1/content |
|---|---|
| Format | JSON |
| Authentifizierung | Keine (lokales Netzwerk) |
Endpoints
| Methode | Endpoint | Beschreibung |
|---|---|---|
| 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:
| Methode | Endpoint | Beschreibung |
|---|---|---|
| POST | /content/{id}/generate | Content generieren |
| POST | /content/{id}/critique | Kritik-Runde starten |
| POST | /content/{id}/revise | Revision erstellen |
| POST | /content/{id}/approve | Content genehmigen |
| POST | /content/{id}/decline | Content ablehnen |