# Quickstart: Publish Your First Post

OmniSocials is an API for scheduling and publishing social media posts across 12 channels (11 platforms, with LinkedIn split into a personal profile and a company page) from a single endpoint. This guide gets you from zero to your first published post in five steps.

## 1. Create an API key

Sign in to [app.omnisocials.com](https://app.omnisocials.com), open **Settings → API**, and click **Create API Key**.

Pick the scopes your integration needs. For most use cases, start with `posts:write`, `media:write`, and `accounts:read`. You can add more later.

The key is shown once. Copy it and store it somewhere safe. Keys start with `omsk_live_` (production) or `omsk_test_` (test mode).

```bash
export OMNISOCIALS_API_KEY="omsk_live_<YOUR_KEY>"
```

## 2. Verify access

Every request authenticates with a Bearer token in the `Authorization` header. The easiest way to check the key works is to list your connected accounts.

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

A `200` response with an `accounts` array means you're in. If you see `401`, the key is wrong. If you see `403`, the key is missing the `accounts:read` scope.

## 3. Connect a social account

You cannot connect social accounts through the API. Accounts are connected once through OAuth in the OmniSocials dashboard, and then become available to every API key in the workspace.

Open **Settings → Channels**, pick the platform you want, and complete the OAuth flow. Re-run the `GET /accounts` call from step 2 to confirm the account appears in the list. Copy its `id` for the next step.

## 4. Upload media (optional)

Text-only posts skip this step. Platforms that require media (Instagram, TikTok, Pinterest, stories, reels) need a media file or URL.

```bash
curl -X POST https://api.omnisocials.com/v1/media/upload \
  -H "Authorization: Bearer $OMNISOCIALS_API_KEY" \
  -F "file=@photo.jpg"
```

Response:

```json
{ "id": "123", "url": "https://cdn.omnisocials.com/...", "type": "image" }
```

Alternatively, skip the upload step entirely and pass external URLs directly in `media_urls` on the post. The API downloads and attaches them for you. See [Media](/media) for the full reference.

## 5. Create your first post

Use the account `id` from step 3 and, optionally, the media `id` from step 4.

```bash
curl -X POST https://api.omnisocials.com/v1/posts/create \
  -H "Authorization: Bearer $OMNISOCIALS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": { "default": "Hello from the OmniSocials API" },
    "accounts": ["your-account-id"],
    "media_ids": ["123"]
  }'
```

A successful response returns the new post record with `"status": "draft"`. To publish immediately instead of leaving it as a draft, POST to `/v1/posts/:id/publish` or use `/v1/posts/create-and-publish` to do both in one call.

## Next steps

- [SDKs](/sdks) wrap this API in 8 languages (Node, Python, Go, Ruby, PHP, Java, .NET, Rust) so you skip the raw HTTP
- [Creating posts](/creating-posts) covers scheduling, per-platform content, post types, and updates
- [Cross-posting](/cross-posting) covers publishing the same post to many platforms at once (the reason to use OmniSocials instead of calling every platform's API directly)
- [Media](/media) covers upload methods, formats, and size limits
- [Platforms](/platforms) lists channel IDs and platform-specific options
- [Rate limits and errors](/rate-limits-and-errors) lists the limits and status codes you need to handle
- [API reference](/api) is the full endpoint spec generated from the OpenAPI schema
