X

X (Twitter) operations

Create an X (Twitter) post or thread request

post

Creates a request to generate and publish a tweet or thread from various content sources. Supports immediate execution or scheduling.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
typestring · enumRequired

Whether to create a single tweet or a thread

Example: tweetPossible values:
feedIdsstringOptional

Optional feed IDs to use as content sources (max 10). When using multipart/form-data, send as comma-separated string.

Example: 101,202
deepResearchIdsstringOptional

Optional deep research request IDs to use as content sources (max 10). When using multipart/form-data, send as comma-separated string.

Example: 550e8400-e29b-41d4-a716-446655440000,660e8400-e29b-41d4-a716-446655440000
projectIdsstringOptional

Optional project IDs to use as context for generation (max 10). When using multipart/form-data, send as comma-separated string.

Example: 123e4567-e89b-12d3-a456-426614174000,234e5678-f90a-23e4-b567-537725285111
audioUrlstringOptional

Optional audio URL to transcribe and use as content source

Example: https://example.com/audio.mp3
promptAudioFilestring · binaryOptional

Audio file to upload and transcribe as style instructions (alternative to promptAudioUrl)

urlstringOptional

Optional URL to scrape and use as content source

Example: https://example.com/article
textstringOptional

Optional raw text to post (or to seed generation)

Example: Here are my thoughts on today's AI news...
promptstringOptional

Optional style instructions to guide the content generation

Example: Make it funny and casual, use emojis
tweetStylestring · enumOptional

Optional formatting style for the tweet. OneLiner for concise tweets, Paragraphs for story-style tweets, Explainer for educational content. If not specified, a random style will be selected.

Example: ParagraphsPossible values:
countinteger · min: 1 · max: 10Optional

Number of tweets/threads to generate (default 1)

Example: 3
deepResearchbooleanOptional

If true, triggers deep research to gather additional context and insights before generating the tweet/thread. This enhances the content with supporting evidence, implications, and key learnings.

Example: false
imageUrlstringOptional

URL to an image to include context from (will be analyzed and described)

Example: https://example.com/image.jpg
imageFilestring · binaryOptional

Image file to upload and include context from (will be analyzed and described). Max 10MB.

callbackDatastringOptional

Optional opaque value returned in eventual callbacks

Example: user-specific-data
isScheduledbooleanOptional

If true, creates a recurring schedule instead of a one-time request

Example: false
dailyCountinteger · min: 1 · max: 100Optional

Number of times per day to execute when scheduled (default 1)

Example: 2
scheduleEndDatestring · date-timeOptional

Optional end date for the schedule. If not provided, schedule runs indefinitely.

Example: 2024-12-31T23:59:59Z
Responses
200

Request accepted

application/json
Responseone of
or
post
/x/post
POST /x/post HTTP/1.1
Host: api.autocontentapi.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 658

{
  "type": "tweet",
  "feedIds": "101,202",
  "deepResearchIds": "550e8400-e29b-41d4-a716-446655440000,660e8400-e29b-41d4-a716-446655440000",
  "projectIds": "123e4567-e89b-12d3-a456-426614174000,234e5678-f90a-23e4-b567-537725285111",
  "audioUrl": "https://example.com/audio.mp3",
  "promptAudioFile": "binary",
  "url": "https://example.com/article",
  "text": "Here are my thoughts on today's AI news...",
  "prompt": "Make it funny and casual, use emojis",
  "tweetStyle": "Paragraphs",
  "count": 3,
  "deepResearch": false,
  "imageUrl": "https://example.com/image.jpg",
  "imageFile": "binary",
  "callbackData": "user-specific-data",
  "isScheduled": false,
  "dailyCount": 2,
  "scheduleEndDate": "2024-12-31T23:59:59Z"
}
{
  "request_id": "550e8400-e29b-41d4-a716-446655440000"
}

Quick-create an X (Twitter) post or thread

post

Minimal input endpoint. Provide type and either queryText or queryAudioFile, optionally an image.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
typestring · enumRequired

Whether to create a single tweet or a thread

Example: tweetPossible values:
queryTextstringOptional

Text query to drive the generation (required if queryAudioFile not provided)

Example: Top 3 AI news today in an engaging tone
tweetStylestring · enumOptional

Optional formatting style for the tweet. OneLiner for concise tweets, Paragraphs for story-style tweets, Explainer for educational content. If not specified, a random style will be selected.

Example: ParagraphsPossible values:
countinteger · min: 1 · max: 10Optional

Number of tweets/threads to generate (default 1)

Example: 3
deepResearchbooleanOptional

If true, triggers deep research to gather additional context and insights before generating the tweet/thread. This enhances the content with supporting evidence, implications, and key learnings.

Example: false
queryAudioFilestring · binaryOptional

Optional audio file to upload and transcribe as the query (required if queryText not provided)

imageFilestring · binaryOptional

Optional image to upload and include context from

Responses
200

Request accepted

application/json
post
/x/post/quick
POST /x/post/quick HTTP/1.1
Host: api.autocontentapi.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 174

{
  "type": "tweet",
  "queryText": "Top 3 AI news today in an engaging tone",
  "tweetStyle": "Paragraphs",
  "count": 3,
  "deepResearch": false,
  "queryAudioFile": "binary",
  "imageFile": "binary"
}
{
  "request_id": "550e8400-e29b-41d4-a716-446655440000"
}

Refine an existing X (Twitter) post

post

Refines an existing tweet based on user instructions while maintaining context. Costs 1 credit. Can update the tweet text and any associated data tables or charts.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
tweetIdstringRequired

The unique ID of the tweet to refine

Example: 550e8400-e29b-41d4-a716-446655440000
promptstringOptional

Instructions for how to refine the tweet

Example: Make it more engaging and add relevant emojis
promptAudioUrlstringOptional

URL to an audio file to transcribe and use as refinement instructions. Required if prompt is not provided.

Example: https://example.com/refinement-audio.mp3
Responses
200

Tweet refined successfully

application/json
post
/x/refine
POST /x/refine HTTP/1.1
Host: api.autocontentapi.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 167

{
  "tweetId": "550e8400-e29b-41d4-a716-446655440000",
  "prompt": "Make it more engaging and add relevant emojis",
  "promptAudioUrl": "https://example.com/refinement-audio.mp3"
}
{
  "success": true,
  "post": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "requestId": "660e8400-e29b-41d4-a716-446655440000",
    "result": "🚀 Just launched our new AI feature! It's revolutionizing how teams collaborate. Check it out! 💡",
    "type": "tweet",
    "order": 1,
    "createdOn": "2024-01-15T10:35:00Z",
    "tweetImageUrl": "https://cdn.example.com/user-image.jpg",
    "dataTableImageUrl": "https://cdn.example.com/table-updated.png",
    "barChartImageUrl": "https://cdn.example.com/chart-updated.png"
  }
}

Get generated X (Twitter) posts for the authenticated user

get

Returns the list of generated X posts and threads, including visualization image URLs when available. Supports optional pagination.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
pageinteger · min: 1Optional

Page number for pagination (starts at 1). If not provided, returns all results.

Example: 1
limitinteger · min: 1 · max: 100Optional

Number of items per page (max 100, default 50 if page is specified)

Example: 20
Responses
200

Successfully retrieved X posts

application/json
get
/x/posts
GET /x/posts HTTP/1.1
Host: api.autocontentapi.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "posts": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "requestId": "660e8400-e29b-41d4-a716-446655440000",
      "result": "text",
      "type": "tweet",
      "order": 0,
      "createdOn": "2024-01-15T10:35:00Z",
      "tweetImageUrl": "https://cdn.example.com/user-image.jpg",
      "dataTableImageUrl": "https://cdn.example.com/table.png",
      "barChartImageUrl": "https://cdn.example.com/chart.png",
      "sources": [
        {
          "type": "feed-item",
          "sourceId": "c0a8015c-82ff-455b-b3d5-8bfab98809c2",
          "reference": "https://twitter.com/autocontentapi/status/123",
          "description": "Reddit: Launch post announcing v2",
          "metadata": {
            "ANY_ADDITIONAL_PROPERTY": "anything"
          }
        }
      ],
      "shareUrl": "https://autocontentapi.com/share/podcast/550e8400-e29b-41d4-a716-446655440000/20240115"
    }
  ]
}

Get a single generated X (Twitter) post by ID

get

Returns a single generated tweet or thread item belonging to the authenticated user by its unique ID.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

The unique ID of the post to retrieve

Example: 550e8400-e29b-41d4-a716-446655440000
Responses
200

Successfully retrieved the X post

application/json
get
/x/posts/{id}
GET /x/posts/{id} HTTP/1.1
Host: api.autocontentapi.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "post": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "requestId": "660e8400-e29b-41d4-a716-446655440000",
    "result": "Just launched our new AI feature! It's amazing.",
    "type": "tweet",
    "order": 0,
    "createdOn": "2024-01-15T10:35:00Z",
    "tweetImageUrl": "https://cdn.example.com/user-image.jpg",
    "dataTableImageUrl": "https://cdn.example.com/table.png",
    "barChartImageUrl": "https://cdn.example.com/chart.png"
  }
}

Get recurring X (Twitter) templates

get

Returns all recurring tweet/thread templates for the authenticated user with their configuration and scheduling details.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

Successfully retrieved recurring templates

application/json
get
/x/recurring
GET /x/recurring HTTP/1.1
Host: api.autocontentapi.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "success": true,
  "templates": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "type": "tweet",
      "deletedOn": null,
      "feedIds": [
        101,
        202
      ],
      "deepResearchIds": [
        "550e8400-e29b-41d4-a716-446655440000"
      ],
      "projectIds": [
        "123e4567-e89b-12d3-a456-426614174000"
      ],
      "audioUrl": "https://example.com/audio.mp3",
      "url": "https://example.com/article",
      "text": "Breaking news about AI...",
      "prompt": "Make it engaging with emojis",
      "imageUrl": "https://example.com/image.jpg",
      "promptAudioUrl": "https://example.com/prompt.mp3",
      "queryText": "Top AI news today",
      "queryAudioUrl": "https://example.com/query.mp3",
      "fast": false,
      "tweetStyle": "Paragraphs",
      "callbackData": "user-data-123",
      "dailyCount": 2,
      "scheduleEndDate": "2024-12-31T23:59:59Z",
      "lastRunAt": "2024-01-15T10:30:00Z",
      "nextRunAt": "2024-01-15T14:30:00Z",
      "createdOn": "2024-01-01T00:00:00Z"
    }
  ]
}

Update a recurring X (Twitter) template

post

Updates specific fields of a recurring template. Can be used to pause/resume, change frequency, update end date, or modify prompt.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

The unique ID of the recurring template to update

Example: 550e8400-e29b-41d4-a716-446655440000
Body
promptstringOptional

New style instructions for generation

Example: Use a more professional tone
dailyCountinteger · min: 1 · max: 100Optional

New number of executions per day

Example: 3
scheduleEndDatestring · date-time | nullableOptional

New end date for the recurring executions (null to remove end date)

Example: 2025-01-31T23:59:59Z
isActivebooleanOptional

Set to false to pause the recurring template, true to resume

Example: false
feedIdsinteger[]Optional

Feed IDs to use as content sources (replaces existing)

Example: [101,202]
deepResearchIdsstring[]Optional

Deep research template IDs to use as content sources (replaces existing)

Example: ["550e8400-e29b-41d4-a716-446655440000"]
Responses
200

Recurring template updated successfully

application/json
post
/x/recurring/{id}
POST /x/recurring/{id} HTTP/1.1
Host: api.autocontentapi.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 193

{
  "prompt": "Use a more professional tone",
  "dailyCount": 3,
  "scheduleEndDate": "2025-01-31T23:59:59Z",
  "isActive": false,
  "feedIds": [
    101,
    202
  ],
  "deepResearchIds": [
    "550e8400-e29b-41d4-a716-446655440000"
  ]
}
{
  "success": true,
  "message": "Recurring template updated successfully",
  "template": {}
}

Last updated