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

# Quickstart

> Start your first ShareSame website job in a few minutes.

## Step 1: Get your base URL and API key

ShareSame gives your team:

* a base URL
* a Bearer API key
* any rollout notes for your account

For the examples below, assume you exported both values:

```bash theme={null}
export SHARESAME_BASE_URL="https://your-base-url-from-sharesame/api/sharesame"
export SHARESAME_API_KEY="your_api_key"
```

## Step 2: Start a website job

```bash theme={null}
curl -X POST "$SHARESAME_BASE_URL/generate" \
  -H "Authorization: Bearer $SHARESAME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "build me a CRM like Salesforce but call it ForceSale",
    "user_id": "acct_123",
    "project_id": "project_123"
  }'
```

Typical response:

```json theme={null}
{
  "status": "building",
  "job_id": "c71f4f25-1d65-48e0-a5fb-8cdf7dbbd694",
  "error": "",
  "source": "generated",
  "search_score": 0,
  "sandbox_session": "",
  "cached_files": []
}
```

## Step 3: Poll until the job is ready

```bash theme={null}
curl "$SHARESAME_BASE_URL/job/c71f4f25-1d65-48e0-a5fb-8cdf7dbbd694" \
  -H "Authorization: Bearer $SHARESAME_API_KEY"
```

When the job finishes, you get a response like this:

```json theme={null}
{
  "status": "ready",
  "files": [
    {
      "path": "index.html",
      "content": "<!DOCTYPE html>...",
      "language": "html"
    }
  ],
  "error": "",
  "progress": "",
  "elapsed_seconds": 19,
  "sandbox_session": "codex-sandbox",
  "deployment_id": ""
}
```

## Step 4: Deploy the returned files

Take the `files` array and write each file to disk, object storage, or whatever build step your AI already uses. ShareSame does not force a deployment platform. You can ship the output on Cloudflare, Vercel, Netlify, or your own infrastructure.

<Tip>
  If you want to keep related edits together, reuse the same `project_id` on later requests.
</Tip>

## Step 5: Report the final public URL

After your deployment goes live, report it back:

```bash theme={null}
curl -X POST "$SHARESAME_BASE_URL/job/c71f4f25-1d65-48e0-a5fb-8cdf7dbbd694/deployed" \
  -H "Authorization: Bearer $SHARESAME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "deploy_url": "https://forcesale.example.com"
  }'
```

<CardGroup cols={2}>
  <Card title="Auth details" icon="key" href="/authentication">
    See the exact header format and optional tracking fields.
  </Card>

  <Card title="Job states" icon="loader" href="/job-lifecycle">
    Learn how `building`, `partial`, `ready`, and `failed` behave.
  </Card>
</CardGroup>
