Skip to main content
Create a new post on X with optional poll and media attachments.

Overview

The Create Post endpoint allows you to publish a new post. Supports plain text, polls, and media attachments.

Authentication

Requires a valid API key with a connected X account.
curl -X POST https://api.trigify.io/v1/x/create-post \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Excited to announce our new API integration!"
  }'

Input

FieldTypeDescription
textstringRequired. The post text (max 280 characters)
poll_optionsstring[]Poll choices (2-4 options)
poll_duration_minutesnumberPoll duration in minutes (5-10080)
media_idsstring[]Pre-uploaded media IDs to attach (max 4)

Polls

To create a poll, provide both poll_options and poll_duration_minutes:
  • Minimum 2 options, maximum 4
  • Duration range: 5 minutes to 7 days (10,080 minutes)

Credit Usage

This endpoint charges 1 credit per post created.