# How to Schedule Social Media Posts from the Command Line
Author: Davis Baer
Author URL: https://www.oneupapp.io/blog/author/davis-baer
Published: 2026-10-12
Meta Description: How to schedule social media posts from the command line with curl and OneUp's REST API, or from a terminal coding agent over MCP.
URL: https://www.oneupapp.io/blog/how-to-schedule-social-media-posts-from-the-command-line

If you'd rather schedule social posts without opening a dashboard, there are two practical ways to do it from a terminal with OneUp: call its REST API with `curl`, or connect a coding agent over MCP and describe what you want. This guide walks through both.

## Before you start

- A OneUp account with your social accounts connected
- Your API key from OneUp's API Access page
- A terminal with `curl`

Store the key in an environment variable instead of pasting it into commands:

```bash bash
export ONEUP_API_KEY="your-api-key"

```

OneUp's API takes the key as an `apiKey` query parameter on every request, so keep it out of shared scripts, screenshots, and logs.

## Option 1: Schedule with curl

### Step 1: List your categories

Categories are how OneUp groups your social accounts. Find the ID of the one you want to post to:

```bash bash
curl "https://www.oneupapp.io/api/listcategory?apiKey=$ONEUP_API_KEY"

```

The response lists each category with its `id` and `category_name`.

### Step 2: List the accounts in that category

```bash bash
curl "https://www.oneupapp.io/api/listcategoryaccount?apiKey=$ONEUP_API_KEY&category_id=49839"

```

Each account comes back with a `social_network_id` and its network type. To see every connected account regardless of category, use the `listsocialaccounts` endpoint instead.

### Step 3: Schedule a text post

```bash bash
curl -G -X POST "https://www.oneupapp.io/api/scheduletextpost" \
  --data-urlencode "apiKey=$ONEUP_API_KEY" \
  --data-urlencode "category_id=49839" \
  --data-urlencode 'social_network_id=["123456789","987654321"]' \
  --data-urlencode "scheduled_date_time=2026-12-25 14:00" \
  --data-urlencode "content=Your post text here"

```

The parameters, per OneUp's reference:

- `category_id` (required): the category containing your target accounts
- `social_network_id` (required): a JSON array of account IDs, or `"ALL"` to post to every account in the category
- `scheduled_date_time` (required): publish time in `YYYY-MM-DD HH:MM` format
- `content` (required): the post text
- `title` (optional): used on platforms that support titles
- `first_comment` (optional): publishes a first comment on Facebook, Instagram, LinkedIn, and YouTube only

A successful call returns a message like `1 new Posts Scheduled.` with `"error": false`.

### Step 4: Schedule images and video

Use the image and video endpoints for media posts:

- `/api/scheduleimagepost` takes an `image_url`. Separate several URLs with `~~~` to publish a carousel.
- `/api/schedulevideopost` takes a `video_url` and an optional `thumbnail_url`.

Both accept the same category, account, time, and content parameters as the text endpoint.

### Step 5: Check what happened

OneUp has endpoints for listing scheduled, published, and failed posts ( `getscheduledposts`, `getpublishedposts`, `getfailedposts`). Checking the failed list after a batch is a good habit. The reference docs list the exact parameters for each.

## Option 2: Use a coding agent

If you'd rather not construct requests by hand, connect OneUp to a terminal-based agent. For Claude Code:

```bash bash
claude mcp add --transport http --scope user oneup "https://feed.oneupapp.io/mcp/oneup"

```

For Codex:

```bash bash
codex mcp add oneup --url "https://feed.oneupapp.io/mcp/oneup"

```

Authenticate in the browser, then ask: _"Use OneUp to list my connected social accounts."_ From there you can schedule posts in plain language. OneUp's [coding agent setup guide](https://docs.oneupapp.io/docs/oneup-mcp/coding-agents-setup) also covers Cursor and other MCP clients.

## Which should you use?

Use `curl` when you want something repeatable that you can drop into a script. Use an agent for one-off scheduling and cleanup, where describing the task is faster than building the request. Many people use both.

For a broader look at terminal options, see [Is There a CLI for Scheduling Social Media Posts?](https://www.oneupapp.io/blog/is-there-a-cli-for-scheduling-social-media-posts)

Ready to try it? [Read OneUp's API documentation](https://docs.oneupapp.io/).


---
This blog is powered by Superblog. Visit https://superblog.ai to know more.
---

