# Taisly API Dokumentation - **OpenAPI Version:** `3.1.0` - **API Version:** `1.0.0` # Taisly API Dokumentation Die Taisly API ermöglicht Ihnen die Automatisierung von Video-Posting und -Reposting auf mehreren sozialen Plattformen mittels einfacher API-Schlüssel-Authentifizierung. ## Funktionen - Videos auf mehrere Plattformen gleichzeitig hochladen und veröffentlichen - Automatisches Reposting von einer Plattform zu anderen einrichten - Beiträge für später planen - Verbundene Social-Media-Konten verwalten - Posting-Verlauf und Status verfolgen ## Anforderungen - **Tarif**: STARTER, INFLUENCER oder PRO (API-Schlüssel nicht im FREE-Tarif verfügbar) - **API-Schlüssel**: Erstellen Sie ihn in Ihrem Dashboard unter - **HTTPS**: Alle API-Anfragen müssen HTTPS verwenden ## Rate Limits | Tarif | Anfragen pro Stunde | | ---------- | ------------------- | | STARTER | 50 | | INFLUENCER | 200 | | PRO | 1000 | Bei Überschreitung des Rate Limits erhalten Sie einen 429-Fehler mit einem `retryAfter`-Feld, das angibt, wie viele Sekunden Sie warten müssen. ## Sicherheitshinweise 1. Commiten Sie niemals API-Schlüssel in die Versionskontrolle 2. Speichern Sie Schlüssel in Umgebungsvariablen 3. Generieren Sie sie bei Kompromittierung sofort neu 4. Verwenden Sie nur HTTPS ## Videoanforderungen - **Format**: MP4, MOV oder andere gängige Videoformate - **Größe**: Maximal 500MB - **Dauer**: 3-90 Sekunden - **Ausrichtung**: 9:16 ## Schnellstart-Beispiel ```bash # 1. Holen Sie Ihre verbundenen Plattformen curl -X GET https://app.taisly.com/api/private/platform/platforms \ -H "Authorization: Bearer taisly_your_api_key_here" # 2. Video hochladen curl -X POST https://app.taisly.com/api/private/post \ -H "Authorization: Bearer taisly_your_api_key_here" \ -F "video=@/path/to/video.mp4" \ -F "platforms=[\"platform_id_1\"]" \ -F "description=Schauen Sie mein neues Video!" # 3. Posting-Verlauf prüfen curl -X GET https://app.taisly.com/api/private/post/history \ -H "Authorization: Bearer taisly_your_api_key_here" ``` ## Python-Beispiel ```python import requests API_KEY = 'taisly_your_api_key_here' BASE_URL = 'https://app.talsly.com/api/private' headers = { 'Authorization': f'Bearer {API_KEY}' } # Plattformen abrufen response = requests.get(f'{BASE_URL}/platform/platforms', headers=headers) platforms = response.json()['data'] print(f"Verbundene Plattformen: {len(platforms)}") # Video hochladen files = {'video': open('video.mp4', 'rb')} data = { 'platforms': str([platforms[0]['_id']]), 'description': 'Meine Video-Beschreibung' } response = requests.post(f'{BASE_URL}/post', headers=headers, files=files, data=data) print(response.json()) ``` ## Servers - **URL:** `https://app.taisly.com/api/private` - **Description:** Produktionsserver ## Operations ### API-Schlüssel-Informationen abrufen - **Method:** `GET` - **Path:** `/user/api-key` - **Tags:** API Key Management Informationen zu Ihrem aktuellen API-Schlüssel abrufen. #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 403 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### API-Schlüssel generieren - **Method:** `POST` - **Path:** `/user/api-key/generate` - **Tags:** API Key Management Einen neuen API-Schlüssel generieren oder neu generieren, wenn bereits einer existiert. **WICHTIG**: - Der vollständige API-Schlüssel wird nur einmal angezeigt. Speichern Sie ihn sicher. - Bei Neugenerierung wird der alte Schlüssel sofort ungültig. #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### API-Schlüssel widerrufen - **Method:** `POST` - **Path:** `/user/api-key/revoke` - **Tags:** API Key Management Ihren aktuellen API-Schlüssel sofort widerrufen. Alle Anfragen mit diesem Schlüssel werden fehlschlagen. #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 403 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### Verbundene Plattformen abrufen - **Method:** `GET` - **Path:** `/platform/platforms` - **Tags:** Platforms Alle mit Ihrem Konto verbundenen Social-Media-Konten abrufen. #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 401 ###### Content-Type: application/json ##### Status: 403 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### Beitrag erstellen - **Method:** `POST` - **Path:** `/post` - **Tags:** Posts Ein Video auf einer oder mehreren verbundenen Plattformen hochladen. **Videoanforderungen:** - Format: MP4, MOV oder andere gängige Videoformate - Größe: Maximal 500MB - Dauer: 3-90 Sekunden - Ausrichtung: Vertikal (9:16) **Planung:** - Übergeben Sie `scheduled` als Unix-Zeitstempel in Millisekunden für geplantes Posting (lassen Sie diesen Parameter weg, wenn Sie nicht planen möchten) #### Request Body ##### Content-Type: multipart/form-data - **`platforms` (required)** `array` — Liste der IDs **Items:** `string` - **`video` (required)** `string`, format: `binary` — - **`description`** `string` - **`previewTime`** `number` — Zeitstempel in Sekunden für Video-Vorschau (Standard: 0) - **`scheduled`** `string` **Example:** ```json { "video": {}, "platforms": [ "" ], "description": "", "previewTime": 1, "scheduled": "" } ``` #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 401 ###### Content-Type: application/json ##### Status: 403 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### Posting-Verlauf abrufen - **Method:** `GET` - **Path:** `/post/history` - **Tags:** Posts Ihren Posting-Verlauf mit Statusinformationen für jede Plattform abrufen. **Seitennummerierung:** - Verwenden Sie den `page`-Parameter für die Seitennummerierung (10 Einträge pro Seite) - Oder verwenden Sie `startTime` und `endTime` für Datumsbereichsfilterung (gibt alle passenden Beiträge zurück) **Statuswerte:** - PENDING: Beitrag ist in Warteschlange - SUCCESS: Erfolgreich gepostet - FEHLER: Posting fehlgeschlagen (prüfen Sie das message-Feld für Fehlercode) #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 401 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### Geplanten Beitrag abbrechen - **Method:** `GET` - **Path:** `/post/cancelSchedule` - **Tags:** Posts Einen für später geplanten Beitrag abbrechen. Der Beitrag wird dauerhaft gelöscht. #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 401 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### Repost-Konfigurationen abrufen - **Method:** `GET` - **Path:** `/reposts` - **Tags:** Reposts Alle konfigurierten automatischen Reposting-Regeln abrufen. Wenn Sie auf einer 'von'-Plattform posten, wird der Inhalt automatisch auf alle 'nach'-Plattformen repostet. #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 401 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### Repost-Konfiguration hinzufügen - **Method:** `POST` - **Path:** `/repost/add` - **Tags:** Reposts Automatisches Reposting von einer Plattform zu anderen konfigurieren. **So funktioniert es:** - Wenn Sie Inhalte auf der 'von'-Plattform posten, werden sie automatisch auf alle 'nach'-Plattformen repostet **Hinweis**: Zirkuläre Abhängigkeiten werden verhindert. Sie können A→B nicht erstellen, wenn B→A bereits existiert. #### Request Body ##### Content-Type: application/json - **`from` (required)** `string` — Plattform-ID - **`to` (required)** `array` — Liste der Plattform-IDs **Items:** `string` **Example:** ```json { "from": "", "to": [ "" ] } ``` #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 400 ###### Content-Type: application/json ##### Status: 401 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### Repost-Konfiguration löschen - **Method:** `POST` - **Path:** `/repost/delete` - **Tags:** Reposts Eine automatische Reposting-Regel entfernen. Zukünftige Posts auf der Quellplattform werden nicht mehr automatisch repostet. #### Request Body ##### Content-Type: application/json - **`id` (required)** `string` **Example:** ```json { "id": "" } ``` #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 401 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### Repost-Konfiguration pausieren/fortsetzen - **Method:** `POST` - **Path:** `/repost/pause` - **Tags:** Reposts Automatisches Reposting vorübergehend pausieren oder fortsetzen. Nützlich, wenn Sie das Reposting vorübergehend stoppen möchten, ohne die Konfiguration zu löschen. #### Request Body ##### Content-Type: application/json - **`id` (required)** `string` - **`isPaused` (required)** `boolean` **Example:** ```json { "id": "", "isPaused": true } ``` #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 401 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json