API Guide

Create posts, manage accounts, upload media, and schedule content programmatically.

Base URL: https://authorautomations.social/api/v1

Authentication

All requests require a Bearer token in the Authorization header.

Authorization: Bearer aa_sk_your_api_key_here

Get your API key from Settings > API Key in the dashboard. The key is shown once when created — store it securely.

Multi-profile access: If your account has access to multiple profiles, pass the X-Profile-Id header to specify which profile to use. Otherwise your default profile is used automatically.

Quick Start

1. List your connected accounts to get account IDs
curl -H "Authorization: Bearer aa_sk_..." \
  https://authorautomations.social/api/v1/accounts
2. Create a post using an account ID from step 1
curl -X POST \
  -H "Authorization: Bearer aa_sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Hello from the API!",
    "accountIds": ["682..."],
    "publishNow": true
  }' \
  https://authorautomations.social/api/v1/posts

Accounts

List Accounts

GET/accounts

Returns all connected social media accounts. Use the _id field from each account as the accountIds value when creating posts.

ParameterTypeDescription
platformstringFilter by platform (e.g., instagram, twitter, facebook)
Response
{
  "accounts": [
    {
      "_id": "682a1b2c3d4e5f6a7b8c9d0e",
      "platform": "instagram",
      "username": "mybookaccount",
      "displayName": "My Book Account",
      "profileUrl": "https://instagram.com/mybookaccount",
      "isActive": true
    }
  ],
  "hasAnalyticsAccess": false
}

Get Account

GET/accounts/:id

Returns a single account by its ID.

Posts

List Posts

GET/posts
ParameterTypeDescription
statusstringscheduled, published, or failed
dateFromstringISO 8601 date
dateTostringISO 8601 date
pagenumberPage number
limitnumberResults per page

Create Post

POST/posts
ParameterTypeDescription
contentstringPost text (max 25,000 chars)
accountIds*string[]Array of account _id values
publishNowbooleanPublish immediately (default: true)
scheduledAtstringISO 8601 datetime for scheduling
mediaItemsarrayMedia attachments: [{ "type": "image", "url": "..." }]
timezonestringIANA timezone (e.g., America/Chicago)
tiktokOptionsobjectTikTok-specific settings (see TikTok section below)
Publish now
{
  "content": "Check out my new book!",
  "accountIds": ["682a1b2c3d4e5f6a7b8c9d0e"],
  "publishNow": true
}
Schedule for later
{
  "content": "Coming soon!",
  "accountIds": ["682a1b2c3d4e5f6a7b8c9d0e"],
  "publishNow": false,
  "scheduledAt": "2026-03-20T14:00:00Z",
  "timezone": "America/Chicago"
}

Get Post

GET/posts/:id

Update Post

PATCH/posts/:id

Update a scheduled post's content or scheduled time.

ParameterTypeDescription
contentstringNew post text
scheduledAtstringNew ISO 8601 scheduled datetime

Delete Post

DELETE/posts/:id

TikTok Options

TikTok posts support additional options via the tiktokOptions field when creating a post. By default, TikTok posts are published live. Set draft: true to send the post to your TikTok Creator Inbox for review before publishing.

ParameterTypeDescription
draftbooleanSend to TikTok Inbox instead of publishing live (default: false)
privacyLevelstringPUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, or SELF_ONLY
allowCommentbooleanAllow comments (default: true)
allowDuetbooleanAllow duets — video posts only (default: true)
allowStitchbooleanAllow stitches — video posts only (default: true)
commercialContentTypestringnone, brand_organic, or brand_content
autoAddMusicbooleanLet TikTok add music — photo posts only
Publish live to TikTok (default)
{
  "content": "New book trailer!",
  "accountIds": ["tiktok_account_id"],
  "publishNow": true
}
Send to TikTok Inbox as draft
{
  "content": "New book trailer!",
  "accountIds": ["tiktok_account_id"],
  "publishNow": true,
  "tiktokOptions": {
    "draft": true,
    "privacyLevel": "PUBLIC_TO_EVERYONE",
    "allowComment": true
  }
}
Post with restricted privacy
{
  "content": "Sneak peek for friends only",
  "accountIds": ["tiktok_account_id"],
  "publishNow": true,
  "tiktokOptions": {
    "privacyLevel": "MUTUAL_FOLLOW_FRIENDS",
    "allowDuet": false,
    "allowStitch": false
  }
}

TikTok Draft vs Live

  • Live (default): Post is published directly to your TikTok profile at the scheduled time.
  • Draft: Post is sent to your TikTok app's Creator Inbox (under Profile > Creator tools > Posts from apps). You review and publish manually from the TikTok app.

Queue

The queue lets you set up recurring time slots so posts are automatically scheduled at your preferred times. Instead of picking a specific date and time for each post, you add posts to the queue and they fill the next available slot.

How Queuing Works

  1. Queue schedules define recurring time slots (e.g., "Monday at 9:00 AM, Wednesday at 2:00 PM").
  2. Preview shows you the next available times in your queue.
  3. Queue a post by creating a post without scheduledAt or publishNow — it will be placed in the next available queue slot.

List Queue Schedules

GET/queue

Returns your queue configuration with all time slots.

ParameterTypeDescription
allstringSet to "true" to list all queues
queueIdstringGet a specific queue by ID
Response — single queue
{
  "exists": true,
  "schedule": {
    "_id": "queue_abc123",
    "name": "Default Queue",
    "timezone": "America/Chicago",
    "active": true,
    "isDefault": true,
    "slots": [
      { "dayOfWeek": 1, "time": "09:00" },
      { "dayOfWeek": 1, "time": "14:00" },
      { "dayOfWeek": 3, "time": "09:00" },
      { "dayOfWeek": 5, "time": "11:00" }
    ]
  },
  "nextSlots": [
    "2026-03-17T09:00:00-05:00",
    "2026-03-17T14:00:00-05:00",
    "2026-03-19T09:00:00-05:00"
  ]
}

Days of week: 0 = Sunday, 1 = Monday, … 6 = Saturday. Times are in 24-hour format in the queue's timezone.

Response — all queues (GET /queue?all=true)
{
  "queues": [
    {
      "_id": "queue_abc123",
      "name": "Morning Posts",
      "active": true,
      "isDefault": true,
      "slots": [...]
    },
    {
      "_id": "queue_def456",
      "name": "Evening Content",
      "active": true,
      "isDefault": false,
      "slots": [...]
    }
  ],
  "count": 2
}

Preview Queue

GET/queue/preview

Shows the next available posting times in your queue. Use this to see when your next posts will go out.

ParameterTypeDescription
countnumberNumber of upcoming slots to show
queueIdstringPreview a specific queue (default queue if omitted)
Response
{
  "profileId": "69821296e40fdedc04fa993f",
  "count": 5,
  "slots": [
    "2026-03-17T09:00:00-05:00",
    "2026-03-17T14:00:00-05:00",
    "2026-03-19T09:00:00-05:00",
    "2026-03-21T11:00:00-05:00",
    "2026-03-24T09:00:00-05:00"
  ]
}

Media Upload

Uploading media is a two-step process: get a presigned URL from the API, then upload your file directly to that URL.

Step 1: Get Presigned URL

POST/media/presign
ParameterTypeDescription
filename*stringName of your file
contentType*stringMIME type (see supported types below)
sizenumberFile size in bytes (max 5 GB)
TypeSupported MIME Types
Imagesimage/jpeg, image/png, image/webp, image/gif
Videosvideo/mp4, video/mpeg, video/quicktime, video/webm
Documentsapplication/pdf
Request
{
  "filename": "book-cover.jpg",
  "contentType": "image/jpeg",
  "size": 245000
}
Response
{
  "uploadUrl": "https://storage.example.com/presigned-put-url...",
  "publicUrl": "https://cdn.example.com/media/book-cover.jpg",
  "key": "media/abc123/book-cover.jpg",
  "type": "image"
}

Step 2: Upload Your File

Upload your file to the uploadUrl using an HTTP PUT request with the file as the body. The presigned URL expires after 1 hour.

Upload via curl
curl -X PUT \
  -H "Content-Type: image/jpeg" \
  --data-binary @book-cover.jpg \
  "https://storage.example.com/presigned-put-url..."

Step 3: Use in a Post

Use the publicUrl from step 1 in your post's mediaItems array. Each item needs a type (image or video) and the url.

Create post with uploaded media
curl -X POST \
  -H "Authorization: Bearer aa_sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "content": "My new book is here!",
    "accountIds": ["682a1b2c3d4e5f6a7b8c9d0e"],
    "publishNow": true,
    "mediaItems": [
      {
        "type": "image",
        "url": "https://cdn.example.com/media/book-cover.jpg"
      }
    ]
  }' \
  https://authorautomations.social/api/v1/posts

Full Workflow Example

Upload an image and schedule a post to your next queue slot:

# 1. Get your accounts
ACCOUNTS=$(curl -s -H "Authorization: Bearer $API_KEY" \
  https://authorautomations.social/api/v1/accounts)

ACCOUNT_ID=$(echo $ACCOUNTS | jq -r '.accounts[0]._id')

# 2. Get a presigned upload URL
PRESIGN=$(curl -s -X POST \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filename":"promo.jpg","contentType":"image/jpeg"}' \
  https://authorautomations.social/api/v1/media/presign)

UPLOAD_URL=$(echo $PRESIGN | jq -r '.uploadUrl')
PUBLIC_URL=$(echo $PRESIGN | jq -r '.publicUrl')

# 3. Upload the file
curl -X PUT -H "Content-Type: image/jpeg" \
  --data-binary @promo.jpg "$UPLOAD_URL"

# 4. Check queue for next available time
curl -s -H "Authorization: Bearer $API_KEY" \
  https://authorautomations.social/api/v1/queue/preview?count=3

# 5. Create the post with the uploaded image
curl -X POST \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"content\": \"New release day! Grab your copy now.\",
    \"accountIds\": [\"$ACCOUNT_ID\"],
    \"scheduledAt\": \"2026-03-20T14:00:00Z\",
    \"publishNow\": false,
    \"mediaItems\": [{\"type\": \"image\", \"url\": \"$PUBLIC_URL\"}]
  }" \
  https://authorautomations.social/api/v1/posts

Rate Limits

The API allows 100 requests per hour per API key. When exceeded, you'll receive a 429 response with a resetAt timestamp.

Error Responses

All errors follow this format:

{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable description",
    "requestId": "req_abc123"
  }
}
StatusCodeMeaning
400VALIDATION_ERRORInvalid request body or params
401UNAUTHORIZEDMissing or invalid API key
403FORBIDDENSubscription inactive or expired
404NOT_FOUNDResource not found
429RATE_LIMITEDToo many requests
500INTERNAL_ERRORServer error
502BAD_GATEWAYUpstream API unavailable

Claude Code / Cowork Plugin

Create posts and run AI campaigns directly from Claude Code or Claude Cowork. The plugin lets Claude write your captions using the full context of your conversation — it reads your brand guides, knows what you're working on, and crafts platform-specific content in your voice.

Install the Plugin

From the Claude Code CLI
claude plugin install author-automations-social

Or search for author-automations-social in the plugin marketplace within Claude Code or Cowork.

Setup

After installing, run the setup command to connect your account:

In Claude Code
/author-automations-social:aa-setup

You'll be prompted for your API key (the same aa_sk_ key from Settings). The plugin stores it locally at ~/.config/author-automations/config.json — it's never sent to Anthropic.

Quick Post

Create a single post with a slash command or natural language:

Slash command
/author-automations-social:aa-post My new book is available for pre-order!
Or just tell Claude
"Create an Instagram and TikTok post about my book launch"

Claude reads your content guides, writes unique captions for each platform, and schedules the post — all in one conversation.

AI Campaign

Run a full multi-day campaign from the CLI:

Slash command
/author-automations-social:aa-campaign 14-day campaign for my spring book launch
Or describe what you need
"Create a 30-day social media campaign to promote Curses and Currents across Instagram, TikTok, and Facebook"

Claude will walk you through the full flow:

1. Ask about your objective and target platforms

2. Read your brand, prose, and social media guides

3. Write day-by-day captions for each platform (Claude writes these, not a server-side AI)

4. Present the plan for your review and edits

5. Generate images and videos via FreePik AI

6. Schedule everything to your content calendar or queue

The Hybrid AI Model

Unlike typical integrations, Claude writes your captions directly — not a server-side AI. This means Claude has the full context of your conversation: what book you're working on, what chapter you just finished, what your audience cares about. Media generation (images, videos, music) happens server-side through your FreePik API key.

Available Tools

ToolDescription
aa_list_accountsList your connected social accounts
aa_get_guidesRead your content guides (brand, prose, social)
aa_create_postCreate and schedule a post
aa_list_postsView scheduled/published posts
aa_update_postEdit a scheduled post
aa_delete_postRemove a post
aa_upload_mediaGet a presigned URL for media upload
aa_queue_previewSee upcoming queue slots
aa_create_campaignStart a new campaign
aa_save_campaign_planSave Claude-generated content plan
aa_generate_mediaGenerate images/videos for campaign
aa_check_media_statusPoll media generation progress
aa_schedule_campaignSchedule all campaign posts
aa_list_campaignsView your campaigns

Content Guides

For the best results, set up your content guides in the dashboard under Settings > AI Configuration:

Prose Guide — your writing tone, style, and voice preferences

Brand Guide — your brand identity, values, and personality

Copywriting Guide — principles for persuasive copy and CTAs

Social Media Guide — platform-specific strategies, hashtag usage, posting frequency

Claude reads all four guides before writing any caption. The more detail you provide, the better the output matches your voice.

Plugin Source

The plugin is open source: github.com/chellehoniker/claude-code-author-automations