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

# Quickstart

> Create a key and make your first request.

**1. Create a workspace API key**

In your dashboard go to **Configuration → Integrations → REST API** and create a key. For this guide, give it `salesbot:contacts:read` and `publishing:accounts:read`. Copy the key; it is shown only once.

**2. Check the key**

```bash theme={null}
curl https://app.onlysocial.io/api/v1/account \
  -H "Authorization: Bearer osk_YOUR_SECRET"
```

```json theme={null}
{
  "data": {
    "id": "c2a4f0d1-58e4-4c1b-a1f7-2b6f3e9d0a11",
    "name": "Acme Marketing",
    "created_at": "2026-01-14T10:22:31+00:00"
  }
}
```

The `id` is your **workspace UUID**. You need it for the Publishing API.

## Messaging

List your contacts:

```bash theme={null}
curl "https://app.onlysocial.io/api/v1/contacts?per_page=10" \
  -H "Authorization: Bearer osk_YOUR_SECRET"
```

Lists return `data`, `links` and `meta`. Use `per_page` (up to 100) and `page` to move through them. See the [Messaging API reference](https://api.onlysocial.io/messaging/account/get-the-authenticated-workspace.md) for every endpoint.

## Publishing

Publishing URLs include your workspace UUID:

```bash theme={null}
curl https://app.onlysocial.io/os/api/WORKSPACE_UUID/accounts \
  -H "Authorization: Bearer osk_YOUR_SECRET"
```

To create and schedule a post, you need the account `id`s from that response. This also needs `publishing:posts:write` and `publishing:posts:publish` on your key:

```bash theme={null}
curl -X POST https://app.onlysocial.io/os/api/WORKSPACE_UUID/posts \
  -H "Authorization: Bearer osk_YOUR_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "accounts": [12],
    "date": "2026-10-20",
    "time": "09:00",
    "timezone": "Europe/London",
    "schedule": true,
    "versions": [
      { "account_id": 0, "is_original": true, "content": [ { "body": "Our autumn sale starts today!" } ] }
    ]
  }'
```

## Next steps

> [card] [Permissions](https://api.onlysocial.io/authentication.md#permissions)
>
> Pick the narrowest set your integration needs.

> [card] [Webhooks](https://api.onlysocial.io/webhooks/overview.md)
>
> React to events instead of polling.


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