---
title: "WordPress API: post and schedule from code"
url: "https://get1post.com/developers/wordpress.md"
canonical_url: "https://get1post.com/developers/wordpress"
last_updated: "2026-10-26"
type: "reference"
summary: "Post and schedule to WordPress with the 1Post API and MCP server: the request, the reply, every rule it is checked against and a dry run."
related: ["https://get1post.com/platforms/wordpress.md", "https://get1post.com/platforms/wordpress/specs.md", "https://get1post.com/docs/api-posts.md", "https://get1post.com/docs/mcp.md"]
---

# WordPress API: post and schedule from code

Post and schedule to WordPress with the 1Post API and MCP server: the request, the reply, every rule it is checked against and a dry run.

Post to WordPress from code with one request: POST /v1/posts with your site id, the text and a schedule_at time. WordPress has no text length that 1Post checks. 1Post allows up to 20 posts a day for each connected site, and a dry run checks a post against every rule first.

## Connect WordPress first

1. In your WordPress profile, create an Application Password.
2. Open Accounts in 1Post and choose Connect, then WordPress.
3. Enter your site address, your username and the Application Password.
4. Choose the site in the composer.

Then GET /v1/accounts returns the id of the WordPress site to use in the request.

## Send a post to WordPress

**Schedule a post**

```bash
curl https://api.get1post.com/v1/posts \
  -H "Authorization: Bearer $ONEPOST_API_KEY" \
  -H "Idempotency-Key: wordpress-first-post" \
  -d '{"accounts":["ACCOUNT_ID"],"text":"Release notes for the autumn update.","schedule_at":"2026-11-02T15:00:00Z"}'
```

The reply is 202 with the post (status scheduled) and one destination for WordPress, which moves from queued to published or failed.

## What you can send to WordPress

- Post with a title
- HTML body
- Featured image
- Categories and tags
- Publish status

## WordPress rules the request is checked against

| Rule | What 1Post checks |
| --- | --- |
| Text limit | No length check |
| Media accepted | Images |
| Images per post | 1 |
| Threads | No |
| First comment | No |
| Posts per day, per connected account (1Post) | 20 |

The same table with sources is on the [WordPress specs page](https://get1post.com/platforms/wordpress/specs.md).

## Check the post before it is queued

Add "dry_run": true to test a post: nothing is kept, a valid one answers 200 and a broken one answers 422 naming the rule.

**A refused request, abridged**

```json
{
  "error": {
    "code": "invalid_for_platform",
    "message": "wordpress refuses this post: WordPress needs some content. (empty_text).",
    "fix": "Fix the rule named in the message and send the post again.",
    "retryable": false,
    "request_id": "REQUEST_ID"
  }
}
```

An assistant connected to the [MCP server](https://get1post.com/docs/mcp.md) sends the same fields to create_post; [set one up](https://get1post.com/assistants.md).

## Questions

**Can I post to WordPress with an API key?**

Yes. A key with write scope can create, change and cancel WordPress posts for the workspace it belongs to, with the role of the member who made it. See [API authentication](https://get1post.com/docs/api-authentication.md).

**What happens if a WordPress post breaks a rule?**

The request is refused with invalid_for_platform and the failing rule is named. Fix it and send the request again, or send it with dry_run to test the fix first.

**How many WordPress posts can I send in a day?**

Up to 20 for each connected site. A request that would pass that answers daily_cap with the time the day frees up.

## Related

- [Schedule WordPress posts: formats, limits, setup](https://get1post.com/platforms/wordpress.md)
- [WordPress specs and limits: text, media, daily cap](https://get1post.com/platforms/wordpress/specs.md)
- [Creating and changing posts with the API: 1Post docs](https://get1post.com/docs/api-posts.md)
- [The MCP server: 1Post docs](https://get1post.com/docs/mcp.md)
