Skip to content

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.

Terminal window
export NATIVPOST_API_KEY="npk_live_..."

On Windows PowerShell:

Terminal window
$env:NATIVPOST_API_KEY = "npk_live_..."
Terminal window
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.

Terminal window
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"
}
Terminal window
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.

Two options for monitoring:

  • Poll GET /api/v1/content/cnt_9f2c8e7b1a3d4f60 and watch status move from scheduled to publishing to published.
  • Subscribe to the content.published webhook 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.