Eine Kategorie erstellen
Eine Kategorie wird durch Senden einer POST-Anfrage an den Endpoint /categories erstellt.
title ist erforderlich (max. 100). slug wird aus title erzeugt, wenn du es weglässt. description ist optional (max. 2000). parent ist eine Kategorie-Id.
Kategorie-Objekt erstellen
CURL
curl -X POST https://app.ignitevideo.cloud/api/categories \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title": "Your category title", "slug":"your-category-slug"}'Antwort
Der Status der Antwort ist 201. Der Body ist das neue Kategorie-Objekt in doc, plus eine Meldung.
{
"doc": {
"id": "[CATEGORY_ID]",
"title": "Your category title",
"slug": "your-category-slug"
},
"message": "Category successfully created."
}