# Dokumentasi API Taisly - **OpenAPI Version:** `3.1.0` - **API Version:** `1.0.0` # Dokumentasi API Taisly API Taisly memungkinkan Anda mengotomatiskan posting dan repost video ke beberapa platform media sosial menggunakan autentikasi kunci API yang sederhana. ## Fitur - Unggah dan posting video ke beberapa platform secara bersamaan - Atur repost otomatis dari satu platform ke platform lain - Jadwalkan posting untuk nanti - Kelola akun media sosial yang terhubung - Lacak riwayat dan status posting ## Persyaratan - **Paket**: STARTER, INFLUENCER, atau PRO (kunci API tidak tersedia di paket FREE) - **Kunci API**: Hasilkan dari dasbor Anda di - **HTTPS**: Semua permintaan API harus menggunakan HTTPS ## Batas Permintaan | Paket | Permintaan per Jam | | ---------- | ------------------ | | STARTER | 50 | | INFLUENCER | 200 | | PRO | 1000 | Ketika Anda melebihi batas, Anda akan menerima kesalahan 429 dengan kolom `retryAfter` yang menunjukkan berapa detik harus menunggu. ## Praktik Keamanan Terbaik 1. Jangan pernah memasukkan kunci API ke kontrol versi 2. Simpan kunci di variabel lingkungan 3. Regenerasi segera jika terkompromi 4. Gunakan HTTPS saja ## Persyaratan Video - **Format**: MP4, MOV, atau format video umum lainnya - **Ukuran**: Maksimal 500MB - **Durasi**: 3-90 detik - **Orientasi**: Vertikal (9:16) ## Contoh Mulai Cepat ```bash # 1. Dapatkan platform yang terhubung curl -X GET https://app.taisly.com/api/private/platform/platforms \ -H "Authorization: Bearer taisly_your_api_key_here" # 2. Unggah 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=Lihat video baru saya!" # 3. Periksa riwayat posting curl -X GET https://app.taisly.com/api/private/post/history \ -H "Authorization: Bearer taisly_your_api_key_here" ``` ## Contoh Python ```python import requests API_KEY = 'taisly_your_api_key_here' BASE_URL = 'https://app.taisly.com/api/private' headers = { 'Authorization': f'Bearer {API_KEY}' } # Dapatkan platform response = requests.get(f'{BASE_URL}/platform/platforms', headers=headers) platforms = response.json()['data'] print(f"Platform terhubung: {len(platforms)}") # Unggah video files = {'video': open('video.mp4', 'rb')} data = { 'platforms': str([platforms[0]['_id']]), 'description': 'Deskripsi video saya' } 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:** Server produksi ## Operations ### Dapatkan Informasi Kunci API - **Method:** `GET` - **Path:** `/user/api-key` - **Tags:** API Key Management Ambil informasi tentang kunci API Anda saat ini. #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 403 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### Hasilkan Kunci API - **Method:** `POST` - **Path:** `/user/api-key/generate` - **Tags:** API Key Management Hasilkan kunci API baru atau regenerasi jika sudah ada. **PENTING**: - Kunci API lengkap hanya ditampilkan sekali. Simpan dengan aman. - Jika Anda meregenerasi, kunci lama akan segera tidak berlaku. #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### Cabut Kunci API - **Method:** `POST` - **Path:** `/user/api-key/revoke` - **Tags:** API Key Management Cabut kunci API Anda saat ini segera. Semua permintaan menggunakan kunci ini akan gagal. #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 403 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### Dapatkan Platform Terhubung - **Method:** `GET` - **Path:** `/platform/platforms` - **Tags:** Platforms Ambil semua akun media sosial yang terhubung ke akun Anda. #### 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 ### Buat Posting - **Method:** `POST` - **Path:** `/post` - **Tags:** Posts Unggah video ke satu atau beberapa platform terhubung. **Persyaratan video:** - Format: MP4, MOV, atau format video umum lainnya - Ukuran: Maksimal 500MB - Durasi: 3-90 detik - Orientasi: Vertikal (9:16) **Penjadwalan:** - Lewatkan `scheduled` sebagai stempel waktu Unix dalam milidetik untuk posting terjadwal (lewatkan parameter ini jika Anda tidak ingin menjadwalkan) #### Request Body ##### Content-Type: multipart/form-data - **`platforms` (required)** `array` — Daftar ID **Items:** `string` - **`video` (required)** `string`, format: `binary` — - **`description`** `string` - **`previewTime`** `number` — Stempel waktu dalam detik untuk pratinjau video (default: 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 ### Dapatkan Riwayat Posting - **Method:** `GET` - **Path:** `/post/history` - **Tags:** Posts Ambil riwayat posting Anda dengan informasi status untuk setiap platform. **Penomoran halaman:** - Gunakan parameter `page` untuk penomoran halaman (10 item per halaman) - Atau gunakan `startTime` dan `endTime` untuk filtering rentang tanggal (mengembalikan semua posting yang cocok) **Nilai status:** - PENDING: Posting dalam antrean - SUCCESS: Berhasil diposting - FAILED: Posting gagal (periksa kolom pesan untuk kode kesalahan) #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 401 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### Batalkan Posting Terjadwal - **Method:** `GET` - **Path:** `/post/cancelSchedule` - **Tags:** Posts Batalkan posting yang dijadwalkan untuk nanti. Posting akan dihapus secara permanen. #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 401 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### Dapatkan Konfigurasi Repost - **Method:** `GET` - **Path:** `/reposts` - **Tags:** Reposts Ambil semua aturan repost otomatis yang dikonfigurasi. Ketika Anda posting ke platform 'dari', konten akan otomatis di-posting ulang ke semua platform 'ke'. #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 401 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### Tambah Konfigurasi Repost - **Method:** `POST` - **Path:** `/repost/add` - **Tags:** Reposts Konfigurasi repost otomatis dari satu platform ke platform lain. **Cara kerjanya:** - Ketika Anda memposting konten ke platform 'dari', itu akan otomatis di-posting ulang ke semua platform 'ke' **Catatan**: Ketergantungan melingkar dicegah. Anda tidak dapat membuat A→B jika B→A sudah ada. #### Request Body ##### Content-Type: application/json - **`from` (required)** `string` — ID Platform - **`to` (required)** `array` — Daftar ID Platform **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 ### Hapus Konfigurasi Repost - **Method:** `POST` - **Path:** `/repost/delete` - **Tags:** Reposts Hapus aturan repost otomatis. Posting masa depan ke platform sumber tidak akan lagi di-posting ulang secara otomatis. #### 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 ### Jeda/Lanjutkan Konfigurasi Repost - **Method:** `POST` - **Path:** `/repost/pause` - **Tags:** Reposts Jeda atau lanjutkan repost otomatis sementara. Berguna ketika Anda ingin menghentikan repost sementara tanpa menghapus konfigurasi. #### 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