> ## Documentation Index
> Fetch the complete documentation index at: https://docs.postinger.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Your first draft

> Choose the interface that fits your workflow.

## Prepare your project

Sign in to [Postinger](https://app.dev.postinger.dev), select your project, and connect a social account under **Connections**. You need a project admin to authorize a CLI/MCP connection or create an API key.

<Tabs>
  <Tab title="CLI">
    Install Node.js 24.15.0 or newer, then run:

    ```bash theme={null}
    npm install -g @postinger/cli@0.2.0
    postinger auth login
    postinger accounts list
    postinger accounts capabilities ACCOUNT_ID
    postinger upload ./photo.jpg
    postinger posts create --content "Hello from Postinger" \
      --account ACCOUNT_ID --media MEDIA_ID
    ```

    Use the account ID from the list and the media ID from the upload result. Save the returned post ID. Continue with the [CLI quickstart](/cli/quickstart).
  </Tab>

  <Tab title="MCP">
    Add `https://api.dev.postinger.dev/mcp` as a remote MCP server in your client, complete browser authorization, then ask:

    > List my connected accounts and check the publishing rules for the account I choose. Upload this image from its public HTTPS URL and create a draft. Show me the draft before publishing.

    See [MCP connection setup](/mcp/quickstart).
  </Tab>

  <Tab title="API">
    Create a project API key with `posts-write`. Set `POSTINGER_API_KEY` in your environment, then create a draft without targets:

    ```bash theme={null}
    curl --fail-with-body 'https://api.dev.postinger.dev/public/v1/posts' \
      -H "Authorization: Bearer $POSTINGER_API_KEY" \
      -H 'Content-Type: application/json' \
      -H 'Idempotency-Key: first-draft-001' \
      -d '{"content":"Hello from Postinger","targets":[],"mediaIds":[]}'
    ```

    An empty-target draft lets you test the API before uploading media. Add a connected account and ready media before publishing. See the [API quickstart](/api-reference/quickstart).
  </Tab>
</Tabs>

## Publish when ready

Review the draft, then explicitly publish or schedule it. Follow the [publishing guide](/guides/publishing) to verify the final result.


## Related topics

- [Build with Postinger](/introduction.md)
- [Pagination and filtering](/guides/pagination.md)
- [Publish a post](/guides/publishing.md)
- [MCP examples](/mcp/examples.md)
- [API quickstart](/api-reference/quickstart.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.