# Taisly API Documentation - **OpenAPI Version:** `3.1.0` - **API Version:** `1.0.0` # Taisly API Documentation The Taisly API allows you to automate video posting and reposting to multiple social media platforms using simple API key authentication. ## Features - Upload and post videos to multiple platforms simultaneously - Set up automated reposting from one platform to others - Schedule posts for later - Manage connected social media accounts - Track post history and status ## Requirements - **Plan**: STARTER, INFLUENCER, or PRO (API keys not available on FREE plan) - **API Key**: Generate from your dashboard at - **HTTPS**: All API requests must use HTTPS ## Rate Limits | Plan | Requests per Hour | | ---------- | ----------------- | | STARTER | 50 | | INFLUENCER | 200 | | PRO | 1000 | When you exceed the rate limit, you'll receive a 429 error with a `retryAfter` field indicating how many seconds to wait. ## Security Best Practices 1. Never commit API keys to version control 2. Store keys in environment variables 3. Regenerate immediately if compromised 4. Use HTTPS only ## Video Requirements - **Format**: MP4, MOV, or other common video formats - **Size**: Maximum 500MB - **Duration**: 3-90 seconds - **Orientation**: 9:16 ## Quick Start Example ```bash # 1. Get your connected platforms curl -X GET https://app.taisly.com/api/private/platform/platforms \ -H "Authorization: Bearer taisly_your_api_key_here" # 2. Upload a 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=Check out my new video!" # 3. Check post history curl -X GET https://app.taisly.com/api/private/post/history \ -H "Authorization: Bearer taisly_your_api_key_here" ``` ## Python Example ```python import requests API_KEY = 'taisly_your_api_key_here' BASE_URL = 'https://app.taisly.com/api/private' headers = { 'Authorization': f'Bearer {API_KEY}' } # Get platforms response = requests.get(f'{BASE_URL}/platform/platforms', headers=headers) platforms = response.json()['data'] print(f"Connected platforms: {len(platforms)}") # Upload video files = {'video': open('video.mp4', 'rb')} data = { 'platforms': str([platforms[0]['_id']]), 'description': 'My video description' } 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:** Production server ## Operations ### Get API Key Information - **Method:** `GET` - **Path:** `/user/api-key` - **Tags:** API Key Management Retrieve information about your current API key. #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 403 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### Generate API Key - **Method:** `POST` - **Path:** `/user/api-key/generate` - **Tags:** API Key Management Generate a new API key or regenerate if one already exists. **IMPORTANT**: - The full API key is only shown once. Save it securely. - If you regenerate, the old key will be invalidated immediately. #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### Revoke API Key - **Method:** `POST` - **Path:** `/user/api-key/revoke` - **Tags:** API Key Management Immediately revoke your current API key. All requests using this key will fail. #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 403 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### Get Connected Platforms - **Method:** `GET` - **Path:** `/platform/platforms` - **Tags:** Platforms Retrieve all social media accounts connected to your account. #### 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 ### Create a Post - **Method:** `POST` - **Path:** `/post` - **Tags:** Posts Upload a video to one or more connected platforms. **Video Requirements:** - Format: MP4, MOV, or other common video formats - Size: Maximum 500MB - Duration: 3-90 seconds - Orientation: Vertical (9:16) **Scheduling:** - Pass `scheduled` as a Unix timestamp in milliseconds for scheduled posting (omit this parameter if you don't want to schedule) #### Request Body ##### Content-Type: multipart/form-data - **`platforms` (required)** `array` — List of IDs **Items:** `string` - **`video` (required)** `string`, format: `binary` — - **`description`** `string` - **`previewTime`** `number` — Timestamp in seconds for thumbnail generation (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 ### Get Post History - **Method:** `GET` - **Path:** `/post/history` - **Tags:** Posts Retrieve your posting history with status information for each platform. **Pagination**: - Use `page` parameter for pagination (10 items per page) - Or use `startTime` and `endTime` for date range filtering (returns all matching posts) **Status Values**: - PENDING: Post is queued - SUCCESS: Posted successfully - FAILED: Post failed (check message field for error code) #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 401 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### Cancel Scheduled Post - **Method:** `GET` - **Path:** `/post/cancelSchedule` - **Tags:** Posts Cancel a post that was scheduled for later. The post will be permanently deleted. #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 401 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### Get Repost Configurations - **Method:** `GET` - **Path:** `/reposts` - **Tags:** Reposts Retrieve all configured automatic reposting rules. When you post to a 'from' platform, the content will be automatically reposted to all 'to' platforms. #### Responses ##### Status: 200 ###### Content-Type: application/json ##### Status: 401 ###### Content-Type: application/json ##### Status: 500 ###### Content-Type: application/json ### Add Repost Configuration - **Method:** `POST` - **Path:** `/repost/add` - **Tags:** Reposts Configure automatic reposting from one platform to others. **How it works**: - When you post content to the 'from' platform, it will automatically be reposted to all 'to' platforms **Note**: Circular dependencies are prevented. You cannot create A→B if B→A already exists. #### Request Body ##### Content-Type: application/json - **`from` (required)** `string` — Platform ID - **`to` (required)** `array` — List of platforms 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 ### Delete Repost Configuration - **Method:** `POST` - **Path:** `/repost/delete` - **Tags:** Reposts Remove an automatic reposting rule. Future posts to the source platform will no longer be automatically reposted. #### 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 ### Pause/Resume Repost Configuration - **Method:** `POST` - **Path:** `/repost/pause` - **Tags:** Reposts Temporarily pause or resume automatic reposting. Useful when you want to stop reposting temporarily without deleting the configuration. #### 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