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

# Create Website Draft

> Save a link-in-bio page as a draft and get a link to finish it in the editor

Send a short page config (the same shape Bouncy's AI website builder produces) and get back `editorUrl`. Opening it shows the page in the Bouncy editor, fully built, where it can be reviewed and published. Nothing goes live until it is published from the editor, and the draft does not count toward link limits.

Drafts that are never opened expire after 30 days. Once a draft is edited in the editor it is kept like any other draft.

## Request

### Headers

<ParamField header="Content-Type" type="string" required>
  Must be `application/json`
</ParamField>

### Body

<ParamField body="templateId" type="string">
  The design. One of: `y2k-card`, `cover-stack`, `simple-stack-v2`, `modern-card-v2`, `minimal-card-v2`, `spotlight-card-v2`, `professional-link-bio-v2`, `bento-grid`, `neo-brutalist`, `music-release`, `music-sleeve`, `music-onyx`, `root-terminal`, `bonbon-card`, `portrait-card`, `scene-card`, `noir-publisher`. May be given as `semantic.templateId` instead; when both are sent, this one wins.
</ParamField>

<ParamField body="semantic" type="object" required>
  The page config (max 64 KB as JSON). The editor fills anything left out with the design's defaults.

  <Expandable title="properties">
    <ParamField body="profile" type="object">
      `name`, `handle` (e.g. `@amy`) and `bio`
    </ParamField>

    <ParamField body="avatar" type="object">
      `type` (`letter` or `emoji`) and `value`
    </ParamField>

    <ParamField body="theme" type="object">
      `background` (`type`: `preset`, `gradient` or `solid`, plus `preset`, `gradient` or `solid`), `page` and `typography` (`nameStyle`, `nameColor`, `handleColor`, `bioColor`)
    </ParamField>

    <ParamField body="links" type="array">
      Blocks in order. Each has `type` (`simple`, `featured`, `header`, `text`, `divider` or `media`), `title`, `subtitle`, `text`, `url`, `style`, `colors` (`background`, `text`), `animation` and, for media blocks, `platform`
    </ParamField>

    <ParamField body="socials" type="array">
      `{ "platform": "instagram", "handle": "amy" }` items (a handle or a full profile URL)
    </ParamField>

    <ParamField body="seo" type="object">
      `pageTitle` and `metaDescription`
    </ParamField>

    <ParamField body="countdown" type="object">
      `spotlight-card-v2` only: `enabled`, `text`, `durationMinutes`
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="name" type="string">
  Draft name shown in the dashboard's Drafts list (max 120 characters). Defaults to `semantic.profile.name`, then `semantic.seo.pageTitle`.
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Whether the draft was saved
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="properties">
    <ResponseField name="id" type="string">
      Draft ID
    </ResponseField>

    <ResponseField name="templateId" type="string">
      The design
    </ResponseField>

    <ResponseField name="name" type="string">
      Draft name
    </ResponseField>

    <ResponseField name="editorUrl" type="string">
      Link that opens the draft in the editor (the account owner must be signed in)
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.bouncy.ai/v1/websites/drafts \
    -H "Authorization: Bearer bcy_live_pk_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "templateId": "y2k-card",
      "semantic": {
        "profile": { "name": "Amy Rose", "handle": "@amyrose", "bio": "Photographer and traveller" },
        "links": [
          { "type": "simple", "title": "My portfolio", "subtitle": "", "text": "", "url": "https://amyrose.com", "style": "pink", "colors": { "background": "", "text": "" }, "animation": "none", "platform": "youtube" }
        ],
        "socials": [{ "platform": "instagram", "handle": "amyrose" }],
        "seo": { "pageTitle": "Amy Rose", "metaDescription": "Photographer and traveller" }
      }
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.bouncy.ai/v1/websites/drafts', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer bcy_live_pk_YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      templateId: 'y2k-card',
      semantic: {
        profile: { name: 'Amy Rose', handle: '@amyrose', bio: 'Photographer and traveller' },
        socials: [{ platform: 'instagram', handle: 'amyrose' }]
      }
    })
  });

  const { data } = await response.json();
  console.log('Finish it here:', data.editorUrl);
  ```
</RequestExample>

<ResponseExample>
  ```json 201 Created theme={null}
  {
    "success": true,
    "data": {
      "id": "Xk2q9ZpL0aBcD3eF4gHi",
      "templateId": "y2k-card",
      "name": "Amy Rose",
      "editorUrl": "https://app.bouncy.ai/create-website/editor/y2k-card?draft=Xk2q9ZpL0aBcD3eF4gHi"
    }
  }
  ```

  ```json 400 Bad Request theme={null}
  {
    "error": "Bad Request",
    "message": "templateId must be one of: y2k-card, cover-stack, ...",
    "field": "templateId"
  }
  ```
</ResponseExample>
