Content, users & cron
Previewcapability-gated
These three resources reach into the CMS itself — the content, the users, and the scheduled tasks of an environment — as typed, scoped, capability-gated CRUD. They sit alongside components and exec as the dynamic application layer: the depth a generic PaaS won’t expose and other WP hosts surface only through raw WP-CLI.
All three resources are environment-scoped and gated on the site’s runtime.
Content and users require runtime=wordpress; cron requires a runtime that
advertises the cron capability. A runtime without the capability returns
404 not_found; a route the runtime can’t perform returns
409 capability.unsupported. Always
discover capabilities before you branch.
content
Section titled “content”CRUD over posts, pages, and media under …/{envID}/content. Reads need
wp.content:read; writes need wp.content:write.
list content
Section titled “list content”GET …/{envID}/content
| Parameter | Type | Required | Description |
|---|---|---|---|
type |
string | no | post, page, or media. Omit for all types. |
status |
string | no | publish, draft, pending, private. |
limit |
integer | no | Page size. See pagination. |
cursor |
string | no | Opaque cursor from a prior next_cursor. |
curl "https://api.managed.dev/v1/sites/site_01J7.../environments/env_01J8.../content?type=post&status=publish" \ -H "Authorization: Bearer mfk_live_9aF2..." \ -H "Forge-Version: 2026-06-23"const posts = await mf.content.list({ siteId: "site_01J7...", envId: "env_01J8...", type: "post", status: "publish",});mf content list --env env_01J8... --type post --status publish{ "data": [ { "id": "post_01J9...", "type": "post", "status": "publish", "title": "Launching on managed.dev", "slug": "launching", "modified_at": "2026-06-20T09:14:00Z" } ], "pagination": { "next_cursor": "eyJ0...", "has_more": false }, "request_id": "req_01J9..."}create / update / delete content
Section titled “create / update / delete content”POST · PATCH · DELETE …/{envID}/content[/{id}]
Writes that touch many rows return a job; single-row
edits return the updated resource directly. Send an
Idempotency-Key on creates.
CRUD over WordPress users under …/{envID}/users. Reads need wp.users:read;
writes need wp.users:write.
GET · POST · PATCH · DELETE …/{envID}/users[/{id}]
| Parameter | Type | Required | Description |
|---|---|---|---|
role |
string | no | Filter by WP role — administrator, editor, author, etc. |
email |
string | on create | The user’s email address. |
login |
string | on create | The user_login. |
CRUD over scheduled tasks under …/{envID}/cron. Reads need cron:read; writes need
cron:write. Requires a runtime that advertises the cron capability — on WordPress
that’s WP-Cron.
GET · POST · PATCH · DELETE …/{envID}/cron[/{id}]
| Parameter | Type | Required | Description |
|---|---|---|---|
hook |
string | on create | The cron hook name to schedule. |
schedule |
string | on create | A recurrence (hourly, daily, …) or a one-off timestamp. |
args |
array | no | Arguments passed to the hook. |
worked example — schedule a recurring task
Section titled “worked example — schedule a recurring task”Create a daily cron task, then confirm it appears in the schedule.
-
Create the task.
Schedule a daily cache warm curl -X POST https://api.managed.dev/v1/sites/site_01J7.../environments/env_01J8.../cron \-H "Authorization: Bearer mfk_live_9aF2..." \-H "Forge-Version: 2026-06-23" \-H "Idempotency-Key: 3b8d-91c2-44ef" \-H "Content-Type: application/json" \-d '{ "hook": "acme_warm_cache", "schedule": "daily" }'Schedule a daily cache warm const task = await mf.cron.create({ siteId: "site_01J7...", envId: "env_01J8..." },{ hook: "acme_warm_cache", schedule: "daily" },{ idempotencyKey: "3b8d-91c2-44ef" },);Schedule a daily cache warm mf cron create --env env_01J8... --hook acme_warm_cache --schedule daily201 response {"data": { "id": "cron_01J9...", "hook": "acme_warm_cache","schedule": "daily", "next_run_at": "2026-06-25T03:00:00Z" },"request_id": "req_01J9..."} -
List the schedule to confirm it’s registered.
List cron tasks curl https://api.managed.dev/v1/sites/site_01J7.../environments/env_01J8.../cron \-H "Authorization: Bearer mfk_live_9aF2..."
To run a due event by hand rather than schedule one, use
exec with wp cron event run.