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

# Provision Website

> Creates a fully configured website in a single call, skipping the onboarding wizard. Optionally configures competitors, prompts, and a processing schedule. Requires a global API key. **Partner integrations** may include an `external_id` to map their own identifier onto the new Athena website.

> **Beta**: This endpoint is in beta. The request and response schemas may change.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/websites/provision
openapi: 3.1.0
info:
  title: AthenaHQ API
  description: >-
    AthenaHQ API provides programmatic access to manage your websites and
    prompts for AI-powered content optimization.
  version: 1.0.0
  contact:
    email: support@athenahq.ai
servers:
  - url: https://api.athenahq.ai
    description: Production server
security:
  - apiKey: []
tags:
  - name: Basics
    description: Core API operations for managing websites and prompts
  - name: Metrics
    description: Metrics and analytics endpoints for tracking AI visibility
  - name: Billing
    description: Billing and credits endpoints for managing usage
  - name: Team Management
    description: Endpoints for managing team members and invitations
  - name: Groups
    description: Endpoints for managing groups of websites
  - name: Content
    description: >-
      Endpoints for accessing Content Hub data — tabs, tracked URLs, and per-URL
      prompt breakdowns.
  - name: Pitch Workspace
    description: >-
      Endpoints for accessing pitch workspace reports — org-scoped pitch runs
      with competitors, prompts, attributes, and aggregate metrics.
  - name: Knowledge Base
    description: >-
      Endpoints for reading the brand Knowledge Base — approved brand facts and
      the pillars that organize them.
paths:
  /api/v1/websites/provision:
    post:
      tags:
        - Basics
      summary: Provision Website
      description: >-
        Creates a fully configured website in a single call, skipping the
        onboarding wizard. Optionally configures competitors, prompts, and a
        processing schedule. Requires a global API key. **Partner integrations**
        may include an `external_id` to map their own identifier onto the new
        Athena website.


        > **Beta**: This endpoint is in beta. The request and response schemas
        may change.
      operationId: provisionWebsite
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProvisionWebsiteRequest'
      responses:
        '201':
          description: Website provisioned successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  website:
                    $ref: '#/components/schemas/ProvisionedWebsite'
                  billingEntityCreated:
                    type: boolean
                    description: >-
                      Whether the billing entity exists after provisioning. When
                      false, entity creation failed even after a retry: the
                      website exists but has no credits, and setting credits
                      fails with a 400 until it is repaired. Contact AthenaHQ
                      support in that case.
                required:
                  - website
                  - billingEntityCreated
              example:
                website:
                  id: 123e4567-e89b-12d3-a456-426614174000
                  url: acme.com
                  name: Acme Corp
                  orgId: 987e6543-e21b-12d3-a456-426614174000
                  promptCount: 2
                  competitorCount: 1
                  hasSchedule: true
                billingEntityCreated: true
        '400':
          description: Bad request - Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                invalid_json:
                  value:
                    error: Invalid JSON body
                missing_url:
                  value:
                    error: 'url: String must contain at least 1 character(s)'
                missing_name:
                  value:
                    error: 'name: String must contain at least 1 character(s)'
                invalid_prompt_type:
                  value:
                    error: >-
                      prompts.0.type: Invalid enum value. Expected 'discovery' |
                      'high_intent', received 'invalid'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Forbidden - Requires a global API key, or (partner-only field) the
            key lacks partner identity for an `external_id`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                global_required:
                  summary: Global API key required
                  value:
                    error: 'Forbidden: global API key required'
                partner_required:
                  summary: Partner API key required for external_id
                  value:
                    error: 'Forbidden: partner API key required'
        '409':
          description: >-
            Conflict - (partners only) the supplied `external_id` is already
            mapped to another website.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalIdConflictError'
              examples:
                external_id_conflict:
                  summary: Partner external_id already mapped
                  value:
                    error: external_id_conflict
                    message: external_id ws_a7f3b2c9 is already mapped to a website
                    existing:
                      id: 123e4567-e89b-12d3-a456-426614174000
                      externalId: ws_a7f3b2c9
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - apiKey: []
components:
  schemas:
    ProvisionWebsiteRequest:
      type: object
      description: Request body for provisioning a fully configured website
      required:
        - url
        - name
      properties:
        url:
          type: string
          description: Website URL. Protocol (https://) is stripped automatically.
          example: acme.com
        name:
          type: string
          description: Brand name
          example: Acme Corp
        description:
          type: string
          description: Brand description
          default: ''
          example: Enterprise widgets company
        country:
          type: string
          description: Base country for the website
          default: United States
          example: United States
        language:
          type: string
          description: >-
            Default language. If omitted, derived from country (e.g., Germany →
            German). Falls back to English.
          example: English
        industry:
          type: string
          description: >-
            Industry category. Common values: `SaaS & Software`, `E-commerce &
            Retail`, `Healthcare & Medical`, `Information Technology`, `Banking
            & Financial Services`, `Education & E-learning`, `Consulting`,
            `Manufacturing`, `Hospitality & Travel`, `Real Estate`, and more.
            Accepts any string.
          example: SaaS & Software
        identifiers:
          type: array
          items:
            type: string
          description: >-
            Brand names, aliases, and abbreviations used for mention detection.
            If empty, auto-generated by AI on the first processing run.
          default: []
          example:
            - Acme
            - Acme Corp
        competitors:
          type: array
          items:
            $ref: '#/components/schemas/CompetitorInput'
          description: Competitors to track. Deduplicated by URL.
          default: []
        prompts:
          type: array
          items:
            $ref: '#/components/schemas/PromptInput'
          description: Prompts (queries) to monitor across AI models. Deduplicated by text.
          default: []
        schedule:
          $ref: '#/components/schemas/ScheduleInput'
        external_id:
          type: string
          minLength: 1
          description: >-
            **Partner-only.** An identifier from your own system to map to this
            Athena website. Accepted only when authenticating with an API key
            for an organization flagged as a partner. Sending this field as a
            direct customer returns `403 Forbidden`. Must be unique per resource
            type within your organization — duplicates return `409` with the
            existing resource in the payload.
          example: ws_a7f3b2c9
    ProvisionedWebsite:
      type: object
      description: The provisioned website response
      required:
        - id
        - url
        - name
        - orgId
        - promptCount
        - competitorCount
        - hasSchedule
      properties:
        id:
          type: string
          format: uuid
          description: Unique website identifier
          example: 123e4567-e89b-12d3-a456-426614174000
        url:
          type: string
          description: Cleaned website URL (protocol stripped)
          example: acme.com
        name:
          type: string
          description: Brand name
          example: Acme Corp
        orgId:
          type: string
          format: uuid
          description: Organization ID the website belongs to
          example: 987e6543-e21b-12d3-a456-426614174000
        promptCount:
          type: integer
          description: Number of prompts created
          example: 2
        competitorCount:
          type: integer
          description: Number of competitors created
          example: 1
        hasSchedule:
          type: boolean
          description: Whether a processing schedule was configured
          example: true
        externalId:
          type: string
          nullable: true
          description: >-
            **Partner-only.** Echoes the `external_id` from the provision
            request if provided, or `null` if the partner did not supply one.
            Only present on responses to partner API keys — direct-customer
            responses omit the field.
          example: ws_a7f3b2c9
    Error:
      type: object
      description: Error response object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message describing what went wrong
          example: Unauthorized
    ExternalIdConflictError:
      type: object
      description: >-
        Returned when a partner tries to set an `external_id` that is already
        mapped to another resource of the same type within the organization. The
        `existing` field identifies the resource that currently holds the ID,
        letting the partner recover from a retry or reconcile their mapping.
      required:
        - error
        - message
        - existing
      properties:
        error:
          type: string
          enum:
            - external_id_conflict
          description: Machine-readable error code. Always `external_id_conflict`.
          example: external_id_conflict
        message:
          type: string
          description: Human-readable explanation of the conflict.
          example: external_id ws_a7f3b2c9 is already mapped to a website
        existing:
          type: object
          required:
            - id
            - externalId
          description: The resource that currently holds the conflicting `external_id`.
          properties:
            id:
              type: string
              format: uuid
              description: Athena ID of the existing resource.
              example: 123e4567-e89b-12d3-a456-426614174000
            externalId:
              type: string
              description: The external_id that is already mapped.
              example: ws_a7f3b2c9
    CompetitorInput:
      type: object
      description: A competitor to track
      required:
        - name
        - url
      properties:
        name:
          type: string
          description: Competitor name
          example: WidgetCo
        url:
          type: string
          description: Competitor website URL
          example: widgetco.com
        identifiers:
          type: array
          items:
            type: string
          description: >-
            Additional aliases beyond the name and domain (which are included
            automatically). If empty, auto-generated on the first processing
            run.
          default: []
          example:
            - WidgetCo
    PromptInput:
      type: object
      description: A prompt (query) to monitor across AI models
      required:
        - text
      properties:
        text:
          type: string
          description: The prompt/query text to send to AI models
          example: best widget software
        topic:
          type: string
          description: Topic name to group the prompt under. Created if it doesn't exist.
          default: Uncategorized
          example: Products
        type:
          type: string
          enum:
            - discovery
            - high_intent
          description: >-
            Prompt type. `discovery` for informational queries, `high_intent`
            for purchase-intent queries.
          default: discovery
          example: discovery
    ScheduleInput:
      type: object
      description: >-
        Processing schedule configuration. If omitted entirely, no schedule is
        created — the user can configure one via the UI. All fields within the
        schedule are optional with sensible defaults.
      properties:
        days:
          type: object
          description: >-
            Which days to run processing. Keys are day names (Monday–Sunday),
            values are booleans.
          additionalProperties:
            type: boolean
          default:
            Monday: true
            Tuesday: true
            Wednesday: true
            Thursday: true
            Friday: true
            Saturday: true
            Sunday: true
          example:
            Monday: true
            Wednesday: true
            Friday: true
        models:
          type: object
          description: >-
            Which AI models to query. Available model IDs: `chatgpt`,
            `ai_overview`, `perplexity`, `gemini`, `copilot`, `grok`, `ai_mode`,
            `claude`.
          additionalProperties:
            type: boolean
          default:
            chatgpt: true
            gemini: true
            copilot: true
            perplexity: true
            ai_overview: true
          example:
            chatgpt: true
            gemini: true
            perplexity: true
        isActive:
          type: boolean
          description: Whether automatic scheduled runs are enabled
          default: true
        processingHour:
          type: integer
          minimum: 0
          maximum: 23
          description: >-
            UTC hour when scheduled processing fires. If omitted, assigned
            randomly between 0–17.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. You can create one
        [here](https://app.athenahq.ai/organization?tab=api).

````