Quickstart
This walkthrough creates a text-only post, approves it, and schedules it for the next hour. You need an API key from the Authentication page.
1. Set your key
Section titled “1. Set your key”export NATIVPOST_API_KEY="npk_live_..."On Windows PowerShell:
$env:NATIVPOST_API_KEY = "npk_live_..."2. Confirm the key works
Section titled “2. Confirm the key works”curl https://app.nativpost.com/api/v1/me \ -H "Authorization: Bearer $NATIVPOST_API_KEY"You should see your workspace object. If you get 401, the key is wrong. If you get 402, the workspace subscription is inactive.
3. Create a draft post
Section titled “3. Create a draft post”curl -X POST https://app.nativpost.com/api/v1/content \ -H "Authorization: Bearer $NATIVPOST_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "content_type": "text_only", "platforms": ["x", "linkedin"], "body_text": "We just shipped a public API. Docs at docs.nativpost.com." }'The response includes the new resource:
{ "object": "content", "id": "cnt_9f2c8e7b1a3d4f60", "status": "draft", "content_type": "text_only", "platforms": ["x", "linkedin"], "body_text": "We just shipped a public API. Docs at docs.nativpost.com.", "created_at": "2026-07-19T12:04:11Z"}4. Approve and schedule
Section titled “4. Approve and schedule”curl -X PATCH https://app.nativpost.com/api/v1/content/cnt_9f2c8e7b1a3d4f60 \ -H "Authorization: Bearer $NATIVPOST_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "status": "scheduled", "scheduled_at": "2026-07-19T13:00:00Z" }'The publish cron picks the post up at scheduled_at and fans it out to every listed platform.
5. Watch it publish
Section titled “5. Watch it publish”Two options for monitoring:
- Poll
GET /api/v1/content/cnt_9f2c8e7b1a3d4f60and watchstatusmove fromscheduledtopublishingtopublished. - Subscribe to the
content.publishedwebhook and receive the transition without polling.
That is the entire loop. From here, look at content types to work with media, campaigns to bundle posts, or webhooks to react to events in real time.