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
curl -H "Authorization: Bearer aa_sk_..." \ https://authorautomations.social/api/v1/accounts
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/postsAccounts
List Accounts
Returns all connected social media accounts. Use the _id field from each account as the accountIds value when creating posts.
| Parameter | Type | Description |
|---|---|---|
| platform | string | Filter by platform (e.g., instagram, twitter, facebook) |
{
"accounts": [
{
"_id": "682a1b2c3d4e5f6a7b8c9d0e",
"platform": "instagram",
"username": "mybookaccount",
"displayName": "My Book Account",
"profileUrl": "https://instagram.com/mybookaccount",
"isActive": true
}
],
"hasAnalyticsAccess": false
}Get Account
Returns a single account by its ID.
Posts
List Posts
| Parameter | Type | Description |
|---|---|---|
| status | string | scheduled, published, or failed |
| dateFrom | string | ISO 8601 date |
| dateTo | string | ISO 8601 date |
| page | number | Page number |
| limit | number | Results per page |
Create Post
| Parameter | Type | Description |
|---|---|---|
| content | string | Post text (max 25,000 chars) |
| accountIds* | string[] | Array of account _id values |
| publishNow | boolean | Publish immediately (default: true) |
| scheduledAt | string | ISO 8601 datetime for scheduling |
| mediaItems | array | Media attachments: [{ "type": "image", "url": "..." }] |
| timezone | string | IANA timezone (e.g., America/Chicago) |
| tiktokOptions | object | TikTok-specific settings (see TikTok section below) |
{
"content": "Check out my new book!",
"accountIds": ["682a1b2c3d4e5f6a7b8c9d0e"],
"publishNow": true
}{
"content": "Coming soon!",
"accountIds": ["682a1b2c3d4e5f6a7b8c9d0e"],
"publishNow": false,
"scheduledAt": "2026-03-20T14:00:00Z",
"timezone": "America/Chicago"
}Get Post
Update Post
Update a scheduled post's content or scheduled time.
| Parameter | Type | Description |
|---|---|---|
| content | string | New post text |
| scheduledAt | string | New ISO 8601 scheduled datetime |
Delete Post
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.
| Parameter | Type | Description |
|---|---|---|
| draft | boolean | Send to TikTok Inbox instead of publishing live (default: false) |
| privacyLevel | string | PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, or SELF_ONLY |
| allowComment | boolean | Allow comments (default: true) |
| allowDuet | boolean | Allow duets — video posts only (default: true) |
| allowStitch | boolean | Allow stitches — video posts only (default: true) |
| commercialContentType | string | none, brand_organic, or brand_content |
| autoAddMusic | boolean | Let TikTok add music — photo posts only |
{
"content": "New book trailer!",
"accountIds": ["tiktok_account_id"],
"publishNow": true
}{
"content": "New book trailer!",
"accountIds": ["tiktok_account_id"],
"publishNow": true,
"tiktokOptions": {
"draft": true,
"privacyLevel": "PUBLIC_TO_EVERYONE",
"allowComment": true
}
}{
"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
- Queue schedules define recurring time slots (e.g., "Monday at 9:00 AM, Wednesday at 2:00 PM").
- Preview shows you the next available times in your queue.
- Queue a post by creating a post without
scheduledAtorpublishNow— it will be placed in the next available queue slot.
List Queue Schedules
Returns your queue configuration with all time slots.
| Parameter | Type | Description |
|---|---|---|
| all | string | Set to "true" to list all queues |
| queueId | string | Get a specific queue by ID |
{
"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.
{
"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
Shows the next available posting times in your queue. Use this to see when your next posts will go out.
| Parameter | Type | Description |
|---|---|---|
| count | number | Number of upcoming slots to show |
| queueId | string | Preview a specific queue (default queue if omitted) |
{
"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
| Parameter | Type | Description |
|---|---|---|
| filename* | string | Name of your file |
| contentType* | string | MIME type (see supported types below) |
| size | number | File size in bytes (max 5 GB) |
| Type | Supported MIME Types |
|---|---|
| Images | image/jpeg, image/png, image/webp, image/gif |
| Videos | video/mp4, video/mpeg, video/quicktime, video/webm |
| Documents | application/pdf |
{
"filename": "book-cover.jpg",
"contentType": "image/jpeg",
"size": 245000
}{
"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.
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.
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/postsFull 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/postsRate 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"
}
}| Status | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_ERROR | Invalid request body or params |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | FORBIDDEN | Subscription inactive or expired |
| 404 | NOT_FOUND | Resource not found |
| 429 | RATE_LIMITED | Too many requests |
| 500 | INTERNAL_ERROR | Server error |
| 502 | BAD_GATEWAY | Upstream 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
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:
/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:
/author-automations-social:aa-post My new book is available for pre-order!
"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:
/author-automations-social:aa-campaign 14-day campaign for my spring book launch
"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
| Tool | Description |
|---|---|
| aa_list_accounts | List your connected social accounts |
| aa_get_guides | Read your content guides (brand, prose, social) |
| aa_create_post | Create and schedule a post |
| aa_list_posts | View scheduled/published posts |
| aa_update_post | Edit a scheduled post |
| aa_delete_post | Remove a post |
| aa_upload_media | Get a presigned URL for media upload |
| aa_queue_preview | See upcoming queue slots |
| aa_create_campaign | Start a new campaign |
| aa_save_campaign_plan | Save Claude-generated content plan |
| aa_generate_media | Generate images/videos for campaign |
| aa_check_media_status | Poll media generation progress |
| aa_schedule_campaign | Schedule all campaign posts |
| aa_list_campaigns | View 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