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

# Quickstart

> Create and schedule your first post in 2 minutes

## Try it in the docs

Every **API Reference** endpoint page includes an interactive playground (**Try it** / **Send**). You run the same requests as below against the real API without leaving the docs.

1. Open the linked reference page for the step you are on.
2. Under **Authorization**, choose **Bearer** and paste your `mk_live_…` key (the same value you use in `curl`).
3. Fill path or body fields if needed, then **Send**.

<Note>
  Mintlify shows one playground per reference page. Use the **Try it** cards under each step to jump straight to the matching operation.
</Note>

## Prerequisites

* A Marky account with at least one business set up
* An API key ([create one here](/authentication))
* Your business ID (find it in your dashboard URL: `app.mymarky.ai/businesses/{business_id}`)

## 1. List your businesses

Find your business ID:

<Card title="Try it: List businesses" icon="code" href="/api-reference/list-businesses">
  **GET** `/api/businesses` — interactive playground on the reference page.
</Card>

```bash theme={null}
curl https://api.mymarky.ai/api/businesses \
  -H "Authorization: Bearer mk_live_your_key_here"
```

Response:

```json theme={null}
[
  {
    "id": "your-business-uuid",
    "title": "My Business",
    "description": "A great company",
    "industry": "Marketing",
    "website": "https://mybusiness.com"
  }
]
```

## 2. Create a post

Push a post into your Marky queue:

<Card title="Try it: Create post" icon="code" href="/api-reference/create-post">
  **POST** `/api/businesses/{business_id}/posts` — set `caption` and `restrict_publish_to`, then send.
</Card>

```bash theme={null}
curl -X POST https://api.mymarky.ai/api/businesses/your-business-uuid/posts \
  -H "Authorization: Bearer mk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "caption": "Exciting news! We just launched our new product line. Each piece is handcrafted with sustainable materials and comes with a lifetime warranty.",
    "restrict_publish_to": ["instagram", "linkedin"]
  }'
```

Response:

```json theme={null}
{
  "id": "post-uuid",
  "business_id": "your-business-uuid",
  "caption": "Exciting news! ...",
  "status": "NEW",
  "restrict_publish_to": ["instagram", "linkedin"]
}
```

## 3. Schedule it

Set a publish time and the post goes out automatically:

<Card title="Try it: Schedule post" icon="code" href="/api-reference/schedule-post">
  **POST** `/api/businesses/{business_id}/posts/{post_id}/schedule` — use the `id` from the create-post response as `post_id`.
</Card>

```bash theme={null}
curl -X POST https://api.mymarky.ai/api/businesses/your-business-uuid/posts/post-uuid/schedule \
  -H "Authorization: Bearer mk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "scheduled_publish_time": "2026-12-01T14:00:00Z",
    "restrict_publish_to": ["instagram", "linkedin"]
  }'
```

The post will be published automatically at the scheduled time.

## 4. Set up a webhook (optional)

Get notified when posts are published:

<Card title="Try it: Register webhook" icon="code" href="/api-reference/create-webhook">
  **POST** `/api/webhooks` — register `url` and `events` (e.g. `post.published`).
</Card>

```bash theme={null}
curl -X POST https://api.mymarky.ai/api/webhooks \
  -H "Authorization: Bearer mk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-app.com/webhook",
    "events": ["post.published"]
  }'
```

When a post publishes, Marky sends a `POST` request to your URL with the post payload,
signed with HMAC-SHA256 (verify using the `X-Marky-Signature` header and the secret
returned when you registered the webhook).

## Next steps

<CardGroup cols={2}>
  <Card title="Create posts" icon="pen" href="/api-reference/create-post">
    Full post creation reference
  </Card>

  <Card title="Manage topics" icon="tags" href="/api-reference/list-topics">
    CRUD on topics
  </Card>

  <Card title="Webhooks" icon="bell" href="/api-reference/create-webhook">
    Set up event notifications
  </Card>

  <Card title="Integration guides" icon="plug" href="/ai-agents">
    Connect Claude Code, Zapier, GHL
  </Card>
</CardGroup>
