APIsThreadThread With Image

Twitter Thread with Images API

Creates a new Twitter thread where individual tweets can include image attachments. Each tweet in the thread can contain up to 4 media files, allowing for rich visual storytelling and enhanced engagement.

Endpoint Details

POST https://portfolio.tigest.club/api/v1/dashboard/post/webhook

Content-Type: multipart/form-data

Request Parameters

ParameterTypeRequiredDescriptionValid ValuesExample
channelstringYesTarget platform (always Twitter)"Twitter"”Twitter”
post_typestringYesType of content being posted"thread"”thread”
post_contentstringYesJSON string defining thread structure and contentValid JSON with thread segmentsSee examples below
calendar_uuidstringYesUnique identifier for your content calendarValid UUID format”69a1bf45-c48e-46cf-bd53-f47f3efa9763”
scheduled_atstringYesPublication date and time in ISO 8601 formatFuture datetime in UTC”2025-05-30T21:30:00Z”
statusstringYesPost publication status"draft", "published", "scheduled"”draft”
images{n}fileOptionalImage files for thread segment nJPEG, PNG, GIF, WebP (max 5MB each)images0, images1, images2, etc.

Parameter Details

post_content Structure:

{
  "0": {
    "text": "First tweet content here...",
    "images": []
  },
  "1": {
    "text": "Second tweet content here...",
    "images": []
  }
}

Image Upload Pattern:

  • images0 - Images for thread segment 0 (first tweet)
  • images1 - Images for thread segment 1 (second tweet)
  • Continue pattern for additional segments
  • Multiple images per segment: repeat the same parameter name

Content Guidelines:

  • Thread Length: Maximum 25 tweets per thread
  • Character Limit: Each tweet segment must be 280 characters or less
  • Image Limits: Up to 4 images per individual tweet
  • Image Formats: JPEG, PNG, GIF, WebP supported
  • File Size: Maximum 5MB per image file
  • Image Quality: High-resolution images recommended for better engagement

Example Requests

Product Launch Thread

curl --location 'https://portfolio.tigest.club/api/v1/dashboard/post/webhook' \
--header 'X-API-KEY: your_api_key_here' \
--form 'channel="Twitter"' \
--form 'post_type="thread"' \
--form 'post_content="{
  \"0\": {\"text\": \"🚀 Excited to introduce our new dashboard! Here'\''s what makes it special... (Thread 1/3)\", \"images\": []},
  \"1\": {\"text\": \"✨ Key features that will transform your workflow:\n• Real-time analytics\n• Intuitive interface\n• Advanced automation\n\nSee it in action below! 👇\", \"images\": []},
  \"2\": {\"text\": \"🎯 Ready to boost your productivity? Get early access now!\n\nWhat feature are you most excited about? Let me know in the comments! 👇\", \"images\": []}
}"' \
--form 'scheduled_at="2025-05-30T15:00:00Z"' \
--form 'status="scheduled"' \
--form 'calendar_uuid="69a1bf45-c48e-46cf-bd53-f47f3efa9763"' \
--form 'images0=@"/path/to/dashboard-hero.jpg"' \
--form 'images0=@"/path/to/dashboard-features.png"' \
--form 'images1=@"/path/to/feature-analytics.jpg"' \
--form 'images1=@"/path/to/feature-interface.jpg"' \
--form 'images1=@"/path/to/feature-automation.png"' \
--form 'images2=@"/path/to/cta-banner.jpg"'

Simple Visual Thread

curl --location 'https://portfolio.tigest.club/api/v1/dashboard/post/webhook' \
--header 'X-API-KEY: your_api_key_here' \
--form 'channel="Twitter"' \
--form 'post_type="thread"' \
--form 'post_content="{
  \"0\": {\"text\": \"Thread 1 - Introduction to our design system\", \"images\": []},
  \"1\": {\"text\": \"Thread 2 - Color palette and typography choices\", \"images\": []}
}"' \
--form 'scheduled_at="2025-05-30T21:30:00Z"' \
--form 'status="draft"' \
--form 'calendar_uuid="69a1bf45-c48e-46cf-bd53-f47f3efa9763"' \
--form 'images0=@"/path/to/image1.gif"' \
--form 'images0=@"/path/to/image2.jpg"' \
--form 'images0=@"/path/to/image3.jpg"' \
--form 'images1=@"/path/to/colors.json"' \
--form 'images1=@"/path/to/typography.jpg"' \
--form 'images1=@"/path/to/examples.png"'

Response Format

Successful Response

Status Code: 200 OK

{
  "data": {
    "id": 1074016,
    "uuid": "fbbf3449-edec-4f7d-b800-2703446edee4",
    "calendar_uuid": "69a1bf45-c48e-46cf-bd53-f47f3efa9763",
    "calendar_user_uuid": "cb3c071c-319a-4dfb-ab0c-538339d18325",
    "content": "",
    "channel": "Twitter",
    "images": [],
    "status": "draft",
    "scheduled_at": "2025-05-30T21:30:00Z",
    "created_at": "2025-05-29T15:22:01.49379665Z",
    "is_active": true,
    "updated_at": "2025-05-29T15:22:01.49379665Z",
    "post_type": "thread",
    "post_content": {
      "0": {
        "text": "Thread 1",
        "images": [
          "https://tigestdashboard.blob.core.windows.net/dashboard/fb08551d-b175-4bb6-afc7-4152e4f8a43d.gif",
          "https://tigestdashboard.blob.core.windows.net/dashboard/2e265e1a-d5ae-4050-9047-6263737db28e.jpg",
          "https://tigestdashboard.blob.core.windows.net/dashboard/b153711b-6e7c-46e5-8bf6-97e252f93542.jpg"
        ]
      },
      "1": {
        "text": "Thread 2",
        "images": [
          "https://tigestdashboard.blob.core.windows.net/dashboard/3656aff5-165a-480e-866f-8b33ad2d0f60.json",
          "https://tigestdashboard.blob.core.windows.net/dashboard/4a14add1-17ed-4d5b-9d7d-9318d64a273b.jpg",
          "https://tigestdashboard.blob.core.windows.net/dashboard/091861e3-e8fb-4f44-af27-8f7620dda230.png"
        ]
      }
    },
    "metadata": {},
    "campaign_uuid": null,
    "analytics": {}
  },
  "success": true
}

Response Fields Explained

FieldTypeDescription
idintegerUnique numeric identifier for the thread
uuidstringUnique string identifier (use for API references)
calendar_uuidstringLinks the thread to your content calendar
calendar_user_uuidstringIdentifies the calendar owner
contentstringEmpty for threads (content is in post_content)
channelstringAlways “Twitter” for this endpoint
imagesarrayEmpty array (images are in post_content)
statusstringCurrent thread status (draft/scheduled/published)
scheduled_atstringScheduled publication time in UTC
created_atstringThread creation timestamp
is_activebooleanWhether the thread is active in the system
updated_atstringLast modification timestamp
post_typestringAlways “thread” for this endpoint
post_contentobjectContains the complete thread structure and images
metadataobjectAdditional metadata about the thread
campaign_uuidstringAssociated campaign identifier (if any)
analyticsobjectThread performance data (populated after publication)

post_content Object Structure

The post_content object contains the complete thread with uploaded images:

{
  "0": {
    "text": "Thread 1",
    "images": [
      "https://tigestdashboard.blob.core.windows.net/dashboard/image1.gif",
      "https://tigestdashboard.blob.core.windows.net/dashboard/image2.jpg"
    ]
  },
  "1": {
    "text": "Thread 2",
    "images": [
      "https://tigestdashboard.blob.core.windows.net/dashboard/image3.jpg"
    ]
  }
}
  • Numbered Keys: Each thread segment is numbered starting from “0”
  • Text Field: Contains the tweet content for that segment
  • Images Array: Contains URLs of uploaded images for that segment
  • URL Format: Images are hosted on Azure Blob Storage with unique identifiers

Error Handling

Thread-Specific Errors

Invalid Thread Structure (Code: 4006)

{
  "errors": {
    "code": 4006,
    "message": "Thread structure is invalid. Please check your post_content format."
  },
  "success": false
}

Solution: Ensure post_content is valid JSON with sequential numbered keys starting from “0”.

Image Upload Failed (Code: 4007)

{
  "errors": {
    "code": 4007,
    "message": "One or more images failed to upload. Please check file formats and sizes."
  },
  "success": false
}

Solution: Verify image files are in supported formats (JPEG, PNG, GIF, WebP) and under 5MB each.

Thread Too Long (Code: 4008)

{
  "errors": {
    "code": 4008,
    "message": "Thread exceeds maximum length of 25 tweets."
  },
  "success": false
}

Solution: Reduce thread length to 25 segments or fewer.

Character Limit Exceeded (Code: 4009)

{
  "errors": {
    "code": 4009,
    "message": "Tweet segment exceeds 280 character limit."
  },
  "success": false
}

Solution: Ensure each tweet segment in your thread is 280 characters or less.

Last updated: May 29, 2025