TTWrite API Documentation: create_swift Endpoint
This document provides detailed information on creating, managing, and interacting with swifts in the TTWrite API.
Functionalities of the create_swift
Endpoint
1. How It Works
Swifts (stories) are created in a step-by-step process:
- Upload one media file (image/video).
- Publish the swift with optional description.
2. Upload Swift Media
API Endpoint
- URL:
mobile_api/upload_swift_media
Parameters
Field | Value | Remarks |
---|
session_id | Access token ID | Example: de25cc16eb00960f076... |
type | Media file type (image/video) | Example: image |
file | Media file (image or video) | Example: swift_media.jpg |
3. Publish Swift
API Endpoint
- URL:
mobile_api/publish_swift
Parameters
Field | Value | Remarks |
---|
session_id | Access token ID | Example: de25cc16eb00960f076... |
media_id | ID of the uploaded media file | Required field |
description | Optional text description | Example: My new swift! |
4. Delete Swift
API Endpoint
- URL:
mobile_api/delete_swift
Parameters
Field | Value | Remarks |
---|
session_id | Access token ID | Example: de25cc16eb00960f076... |
swid | Swift hash ID | Example: zpad2HalsbsLGhdI |
5. Get My Swifts List
API Endpoint
- URL:
mobile_api/get_swifts
Parameters
Field | Value | Remarks |
---|
session_id | Access token ID | Example: de25cc16eb00960f076... |
6. Register Swift View
API Endpoint
- URL:
mobile_api/reg_swift_view
Parameters
Field | Value | Remarks |
---|
session_id | Access token ID | Example: de25cc16eb00960f076... |
user_id | Swift user ID | Example: 12345 |