# Taisly API Documentatie - **OpenAPI Version:** `3.1.0` - **API Version:** `1.0.0` # Taisly API Documentatie Met de Taisly API kunt u het plaatsen en herplaatsen van video's naar meerdere sociale mediaplatforms automatiseren met eenvoudige API-sleutelauthenticatie. ## Functies - Video's uploaden en plaatsen op meerdere platforms tegelijk - Automatisch herplaatsen van het ene platform naar anderen instellen - Berichten voor later plannen - Verbonden sociale media-accounts beheren - Plaatsingsgeschiedenis en status bijhouden ## Vereisten - **Plan**: STARTER, INFLUENCER of PRO (API-sleutels niet beschikbaar op FREE-plan) - **API-sleutel**: Genereer vanuit uw dashboard op - **HTTPS**: Alle API-verzoeken moeten HTTPS gebruiken ## Rate Limits | Plan | Verzoeken per uur | | ---------- | ----------------- | | STARTER | 50 | | INFLUENCER | 200 | | PRO | 1000 | Wanneer u de limiet overschrijdt, ontvangt u een 429-fout met een `retryAfter`-veld dat aangeeft hoeveel seconden u moet wachten. ## Beveiligingsbest practices 1. Commiteer nooit API-sleutels naar versiebeheer 2. Sla sleutels op in omgevingsvariabelen 3. Regenereer onmiddellijk als ze zijn gecompromitteerd 4. Gebruik alleen HTTPS ## Video-vereisten - **Formaat**: MP4, MOV of andere gangbare video-indelingen - **Grootte**: Maximaal 500MB - **Duur**: 3-90 seconden - **Oriëntatie**: Verticaal (9:16) ## Snelstartvoorbeeld ```bash # 1. Haal uw verbonden platforms op curl -X GET https://app.taisly.com/api/private/platform/platforms \ -H "Authorization: Bearer taisly_your_api_key_here" # 2. Upload een video 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=Bekijk mijn nieuwe video!" # 3. Controleer plaatsingsgeschiedenis curl -X GET https://app.taisly.com/api/private/post/history \ -H "Authorization: Bearer taisly_your_api_key_here" ``` ## Python-voorbeeld ```python import requests API_KEY = 'taisly_your_api_key_here' BASE_URL = 'https://app.taisly.com/api/private' headers = { 'Authorization': f'Bearer {API_KEY}' } # Platforms ophalen response = requests.get(f'{BASE_URL}/platform/platforms', headers=headers) platforms = response.json()['data'] print(f"Verbonden platforms: {len(platforms)}") # Video uploaden files = {'video': open('video.mp4', 'rb')} data = { 'platforms': str([platforms[0]['_id']]), 'description': 'Mijn videobeschrijving' } 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:** Productieserver ## Operations ### API-sleutelinformatie ophalen - **Method:** `GET` - **Path:** `/user/api-key` - **Tags:** API Key Management Informatie over uw huidige API-sleutel ophalen. #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 403 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### API-sleutel genereren - **Method:** `POST` - **Path:** `/user/api-key/generate` - **Tags:** API Key Management Een nieuwe API-sleutel genereren of regenereren als er al een bestaat. **BELANGRIJK**: - De volledige API-sleutel wordt slechts één keer getoond. Bewaar deze veilig. - Als u regenereert, wordt de oude sleutel onmiddellijk ongeldig. #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### API-slekel intrekken - **Method:** `POST` - **Path:** `/user/api-key/revoke` - **Tags:** API Key Management Trek uw huidige API-sleutel onmiddellijk in. Alle verzoeken met deze sleutel zullen mislukken. #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 403 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### Verbonden platforms ophalen - **Method:** `GET` - **Path:** `/platform/platforms` - **Tags:** Platforms Alle sociale media-accounts ophalen die met uw account zijn verbonden. #### 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 ### Bericht maken - **Method:** `POST` - **Path:** `/post` - **Tags:** Posts Een video uploaden naar een of meer verbonden platforms. **Video-vereisten:** - Formaat: MP4, MOV of andere gangbare video-indelingen - Grootte: Maximaal 500MB - Duur: 3-90 seconden - Oriëntatie: Verticaal (9:16) **Plannen:** - Geef `scheduled` door als Unix-tijdstempel in milliseconden voor geplande plaatsing (laat deze parameter weg als u niet wilt plannen) #### Request Body ##### Content-Type: multipart/form-data - **`platforms` (required)** `array` — Lijst van ID's **Items:** `string` - **`video` (required)** `string`, format: `binary` — - **`description`** `string` - **`previewTime`** `number` — Tijdstempel in seconden voor video-voorbeeld (standaard: 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 ### Plaatsingsgeschiedenis ophalen - **Method:** `GET` - **Path:** `/post/history` - **Tags:** Posts Uw plaatsingsgeschiedenis ophalen met statusinformatie voor elk platform. **Paginering:** - Gebruik de `page`-parameter voor paginering (10 items per pagina) - Of gebruik `startTime` en `endTime` voor datumbereikfiltering (retourneert alle overeenkomende berichten) **Statuswaarden:** - PENDING: Bericht is in wachtrij - SUCCESS: Succesvol geplaatst - FAILED: Plaatsing mislukt (controleer het berichtenveld voor foutcode) #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 401 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### Gepland bericht annuleren - **Method:** `GET` - **Path:** `/post/cancelSchedule` - **Tags:** Posts Een bericht dat voor later was gepland annuleren. Het bericht wordt permanent verwijderd. #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 401 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### Herplaatsingsconfiguraties ophalen - **Method:** `GET` - **Path:** `/reposts` - **Tags:** Reposts Alle geconfigureerde automatische herplaatsingsregels ophalen. Wanneer u naar een 'van'-platform plaatst, wordt de content automatisch herplaatst naar alle 'naar'-platforms. #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 401 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### Herplaatsingsconfiguratie toevoegen - **Method:** `POST` - **Path:** `/repost/add` - **Tags:** Reposts Automatisch herplaatsen van het ene platform naar anderen configureren. **Hoe het werkt:** - Wanneer u content naar het 'van'-platform plaatst, wordt het automatisch herplaatst naar alle 'naar'-platforms **Opmerking**: Circulaire afhankelijkheden worden voorkomen. U kunt A→B niet maken als B→A al bestaat. #### Request Body ##### Content-Type: application/json - **`from` (required)** `string` — Platform-ID - **`to` (required)** `array` — Lijst van platform-ID's **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 ### Herplaatsingsconfiguratie verwijderen - **Method:** `POST` - **Path:** `/repost/delete` - **Tags:** Reposts Een automatische herplaatsingsregel verwijderen. Toekomstige berichten naar het bronplatform worden niet meer automatisch herplaatst. #### 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 ### Herplaatsingsconfiguratie pauzeren/hervatten - **Method:** `POST` - **Path:** `/repost/pause` - **Tags:** Reposts Automatisch herplaatsen tijdelijk pauzeren of hervatten. Nuttig wanneer u tijdelijk wilt stoppen met herplaatsen zonder de configuratie te verwijderen. #### 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