Vorlagen verwalten
Vorlagen per API erstellen, laden, aktualisieren und löschen.
Vorlagen definieren, welche Felder das Formular hat. Sie können im Dashboard (Bibliothek) oder per API erstellt und verwaltet werden.
Vorlage erstellen
POST /api/embed/templatesRequest-Body
{
"token": "sk_dev_abc123...",
"orgId": "550e8400-...",
"title": "Kontaktformular",
"description": "Allgemeines Kontaktformular",
"status": "active",
"schema": {
"version": 1,
"fields": []
}
}| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
token | string | Ja | API-Token |
orgId | string | Ja | Organisations-UUID |
title | string | Ja | Name der Vorlage (1–120 Zeichen) |
description | string | Nein | Beschreibung (max. 1000 Zeichen) |
status | string | Nein | "draft" | "active" | "archived" (Standard: "draft") |
schema | object | Nein | Formular-Schema mit Feldern (Standard: leeres Schema) |
Erfolgs-Antwort (201)
{
"ok": true,
"template": {
"id": "uuid",
"identifier": "anoXYZ1234",
"title": "Kontaktformular",
"description": "Allgemeines Kontaktformular",
"status": "active",
"schema": { "version": 1, "fields": [] },
"createdAt": "2026-02-23T14:00:00Z",
"updatedAt": "2026-02-23T14:00:00Z"
}
}Die identifier wird automatisch generiert und dient als eindeutige Kennung der Vorlage.
Einzelne Vorlage laden
GET /api/embed/template?token=<token>&orgId=<org-uuid>&templateIdentifier=<id>Antwort (200)
{
"ok": true,
"template": {
"identifier": "anoXYZ1234",
"title": "Kontaktformular",
"description": "...",
"status": "active",
"schema": {
"version": 1,
"fields": [
{
"id": "f1",
"type": "text",
"key": "vorname",
"label": "Vorname"
}
]
}
}
}Alle Vorlagen auflisten
GET /api/embed/templates?token=<token>&orgId=<org-uuid>Optionaler Parameter: &limit=100 (Standard 300, Max 300)
Antwort (200)
{
"templates": [
{
"identifier": "anoXYZ1234",
"title": "Kontaktformular",
"status": "active",
"updatedAt": "2026-02-23T14:00:00Z"
},
{
"identifier": "anoABC5678",
"title": "Feedbackbogen",
"status": "draft",
"updatedAt": "2026-02-22T09:00:00Z"
}
]
}Vorlage aktualisieren
PATCH /api/embed/templates/<identifier>Nur die Felder übergeben, die geändert werden sollen.
{
"token": "sk_dev_abc123...",
"orgId": "550e8400-...",
"title": "Neuer Titel",
"status": "active",
"schema": { "version": 1, "fields": [] }
}Vorlage löschen
DELETE /api/embed/templates/<identifier>{
"token": "sk_dev_abc123...",
"orgId": "550e8400-..."
}Antwort (200)
{ "ok": true }