# Quickstart

> Create an API key, find your connected accounts and publish one post to three networks.

This quickstart takes about five minutes. You need a Socialit account (Free works) with at least one connected social account.

1. **Create an API key.** In the app, open **Manage → API keys** and select **Create key**. Copy the secret (`sk_live_…`); it is shown once. See [Authentication](/docs/authentication/).

2. **Find your accounts.** List the connected accounts and note the IDs (`sa_…`) you want to publish to.

    ```bash
    curl https://api.socialit.com/v1/accounts \
      -H "Authorization: Bearer $SOCIALIT_API_KEY"
    ```

3. **Upload media (optional).** Upload an image or video once and reuse its `med_…` ID in any post.

4. **Create the post.** One request publishes to every account in `account_ids`. Set `scheduled_at` to schedule it, or leave it out to publish now.

5. **Listen for the result.** Add a [webhook](/docs/webhooks/) for `post.published` and `post.failed`, or poll `GET /v1/posts/{id}`.

## Create the post

**cURL**

```bash
curl https://api.socialit.com/v1/posts \
  -H "Authorization: Bearer $SOCIALIT_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: launch-2026-10-14" \
  -d '{
    "content": "Focus mode is live. Open one account, use everything.",
    "account_ids": ["sa_instagram…", "sa_linkedin…", "sa_x…"],
    "scheduled_at": "2026-10-14T09:00:00.000Z",
    "first_comment": "#focusmode"
  }'
```

**Node.js**

```js
const res = await fetch('https://api.socialit.com/v1/posts', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SOCIALIT_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': 'launch-2026-10-14',
  },
  body: JSON.stringify({
    content: 'Focus mode is live. Open one account, use everything.',
    account_ids: ['sa_instagram…', 'sa_linkedin…', 'sa_x…'],
    scheduled_at: '2026-10-14T09:00:00.000Z',
  }),
});
const post = await res.json();
```

**Python**

```python

post = requests.post(
    "https://api.socialit.com/v1/posts",
    headers={"Authorization": f"Bearer {os.environ['SOCIALIT_API_KEY']}"},
    json={
        "content": "Focus mode is live. Open one account, use everything.",
        "account_ids": ["sa_instagram…", "sa_linkedin…", "sa_x…"],
        "scheduled_at": "2026-10-14T09:00:00.000Z",
    },
).json()
```

The response is the post with one *posting* per target account:

```json
{
  "object": "post",
  "id": "pst_2LwQ9xKfT1mB7cRzV3nYp8aHsJd",
  "status": "scheduled",
  "scheduled_at": "2026-10-14T09:00:00.000Z",
  "postings": [
    { "object": "posting", "platform": "instagram", "status": "pending" },
    { "object": "posting", "platform": "linkedin", "status": "pending" },
    { "object": "posting", "platform": "x", "status": "pending" }
  ]
}
```

> **Note:** If any target network would reject the post (too long for X, a video too short for TikTok), Socialit answers `422 validation_failed` with the reason per field, before anything is published. See [Errors](/docs/api-reference/errors/).

## Next steps

- [Publishing](/docs/publishing/): queues, drafts, per-network options, editing and deleting.
- [Webhooks](/docs/webhooks/): receive `post.published` and verify signatures.
- [Network guides](/docs/networks/): what each network accepts.

---

Source: https://socialit.com/docs/quickstart/
