Publishing lets you post content to social media platforms immediately or schedule it for later. Currently supports TikTok, with more platforms coming soon.
Posts or schedules content to a social media platform. Uses the standard user job creation endpoint.
POST /v1/user_jobs?agent_id={agent_id}
Parameter Type Required Description agent_idstring Yes The agent ID (query parameter). user_job_typestring Yes Must be publish_content. datastring (JSON) Yes JSON-stringified object containing the post configuration (see Data fields below).
The data value is a JSON string containing:
Field Type Required Description platformstring Yes Target platform. Currently tiktok. media_urlstring Yes Public URL to the media file (S3 presigned URL, CDN link, etc). Must be accessible at post time. descriptionstring Yes Post caption/description. Max ~2200 characters for TikTok. Include hashtags inline. titlestring No Post title (used on some platforms). media_typestring No VIDEO (default) or IMAGE.schedule_typestring Yes now for immediate posting. scheduled for future posting.scheduled_timestring Conditional ISO 8601 UTC datetime (e.g. 2026-03-16T15:00:00Z). Required when schedule_type is scheduled. Must be in the future. thumbnail_urlstring No Custom thumbnail URL. Auto-generated from video if not provided. timezone_offsetinteger No Timezone offset in minutes from UTC. Default 0.
Value Behavior nowPosts immediately via the connected social account. scheduledQueues for posting at scheduled_time.
Poll status via GET /v1/user_jobs/{id}?agent_id={agent_id}.
Status Description pendingJob created, queued for processing. processingPost is being submitted to the platform. completedPost published successfully. The result field contains the post_id from the platform. failedPublishing failed. Check failed_reason.
curl -X POST " https://api.gen.pro/v1/user_jobs?agent_id=your-agent-id " \
-H " X-API-Key: your-api-key " \
-H " Content-Type: application/json " \
"user_job_type": "publish_content",
"data": "{\"platform\": \"tiktok\", \"media_url\": \"https://cdn.example.com/video.mp4\", \"description\": \"Factory price reveal #sourcing #china\", \"schedule_type\": \"now\", \"media_type\": \"VIDEO\"}"
curl -X POST " https://api.gen.pro/v1/user_jobs?agent_id=your-agent-id " \
-H " X-API-Key: your-api-key " \
-H " Content-Type: application/json " \
"user_job_type": "publish_content",
"data": "{\"platform\": \"tiktok\", \"media_url\": \"https://cdn.example.com/video.mp4\", \"description\": \"Your $12 beauty sponge costs 10 cents #beauty #factory\", \"title\": \"Beauty sponge price reveal\", \"schedule_type\": \"scheduled\", \"scheduled_time\": \"2026-03-16T15:00:00Z\", \"media_type\": \"VIDEO\"}"
Agent must have a connected TikTok social account (connected via AURA)
Video/image must be publicly accessible via URL at post time
For scheduled posts, scheduled_time must be in the future
Status Error code Description 401unauthorizedMissing or invalid API key. 403permission_deniedYou do not have access to this agent. 422validation_errorInvalid or missing required fields. 422no_active_credit_purchaseThe agent’s workspace has no active credit purchase.