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

# Create a website

> Create a website with a name and its allowed origins. Account-wide keys with sites:write only.

Creates a site and returns its id, which the SDK script tag and every storefront endpoint use. `allowed_origins` are full origins (`https://www.example.com`); all origins on one site must share a root domain. A site-bound key cannot create websites.


## OpenAPI

````yaml openapi.json POST /sdk
openapi: 3.1.0
info:
  title: NextIntent API
  version: 1.0.0
  description: >-
    Websites, switches, the facts sheet and API keys, per account. Authenticate
    with an API key (ni_live_...) or a console session as a Bearer token. A key
    is account-wide or bound to one website; a bound key sees only that website
    and cannot create or delete websites.
servers:
  - url: https://api.nextintent.ai/v1
security:
  - bearer: []
paths:
  /sdk:
    post:
      summary: Create a website
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - allowed_origins
              properties:
                name:
                  type: string
                allowed_origins:
                  type: array
                  items:
                    type: string
      responses:
        '201':
          description: Site
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Site'
        '400':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Site:
      type: object
      properties:
        _id:
          type: string
        name:
          type: string
        host:
          type: string
        enabled:
          type: boolean
        shadow:
          type: boolean
          description: true = messages off
        card_enabled:
          type: boolean
        holdout_pct:
          type: number
          description: share of stuck shoppers held back to compare, 0.05 to 0.5
        vertical:
          type: string
          nullable: true
        state:
          type: object
          properties:
            deployed:
              type: boolean
            connected:
              type: boolean
    Error:
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````