Pogton
Docs Quickstart

Getting started

Quickstart

Create a test key, add a sandbox account and publish your first post through the Pogton Connect API in three calls, without connecting a real social account.

This guide takes three API calls. You use a test key and a sandbox account, so nothing is published to a real platform.

1. Create a test key

In the dashboard, go to Connect → API, create a key and choose Test. Test keys start with pk_test_. The key is shown once, so store it now.

export POGTON_KEY=pk_test_...

Every request sends the key as a Bearer token. See Authentication for live keys, rate limits and errors.

2. Create a sandbox account

A sandbox account behaves like a connected social account, but has no platform behind it. user_id is your own ID for the user; Pogton creates the user if it is new.

curl -X POST https://pogton.com/api/v1/sandbox/accounts \
  -H "Authorization: Bearer $POGTON_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "user_id": "user_123", "platform": "linkedin" }'
{
  "id": "j97fk2m8q4r1t6v3w8x0y5z2a7b4c9ed",
  "platform": "linkedin",
  "type": "personal",
  "name": "Test linkedin account",
  "username": "Test linkedin account",
  "user_id": "user_123",
  "status": "active",
  "test": true
}

The response is shortened here. Keep the id: it is the account you publish to.

3. Publish a post

curl -X POST https://pogton.com/api/v1/posts \
  -H "Authorization: Bearer $POGTON_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 6f1c1d2e-first-post" \
  -d '{
    "account_ids": ["j97fk2m8q4r1t6v3w8x0y5z2a7b4c9ed"],
    "content": "Hello from Pogton Connect"
  }'
{
  "id": "k57c2d9e1f3g5h7j9k1m3n5p7q9r2s4t",
  "status": "published",
  "user_id": "user_123",
  "content": "Hello from Pogton Connect",
  "targets": [
    {
      "account_id": "j97fk2m8q4r1t6v3w8x0y5z2a7b4c9ed",
      "platform": "linkedin",
      "status": "published",
      "platform_post_id": "test_4f9a1c2b3d4e",
      "url": "https://pogton.com/test-posts/linkedin/test_4f9a1c2b3d4e",
      "error": null,
      "attempts": 1
    }
  ],
  "test": true,
  "warnings": []
}

The post is checked against LinkedIn's rules exactly as a live post would be, then published in simulation. Try a post that breaks a rule, such as 3,001 characters for LinkedIn, to see a 422 validation_failed response.

Going live

When your integration works with the sandbox:

  1. Create a live key (it starts with pk_ without test_). Live keys only see real accounts; sandbox accounts stay with test keys.
  2. Send each user a connect link so they connect their real accounts.
  3. List their accounts with GET /api/v1/accounts?user_id=… and publish with the same POST /api/v1/posts call.
  4. Register a webhook to hear when scheduled posts publish, fail, or when an account needs to reconnect.

Next steps

  • Publishing: scheduling, the queue, drafts, media, threads and per-platform options.
  • Sandbox and testing: what test mode simulates.
  • MCP server: use the API from Claude, Cursor and other AI tools.
  • OpenAPI: generate a client for your language.