> ## 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.

# Create Prompts

> Creates one or more prompts on a website. Returns the created prompt ids. Each prompt's geography (`countries` / `primary_country`) and any attached `location_ids` are validated for compatibility before insert.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/prompts
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/prompts:
    post:
      tags:
        - Basics
      summary: Create Prompts
      description: >-
        Creates one or more prompts on a website. Returns the created prompt
        ids. Each prompt's geography (`countries` / `primary_country`) and any
        attached `location_ids` are validated for compatibility before insert.
      operationId: createPrompts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - website_id
                - prompts
              properties:
                website_id:
                  type: string
                  format: uuid
                  description: Website to create the prompts on.
                prompts:
                  type: array
                  minItems: 1
                  maxItems: 1000
                  items:
                    type: object
                    required:
                      - prompt
                    properties:
                      prompt:
                        type: string
                        description: >-
                          Prompt text. Trimmed; empty / whitespace-only is
                          rejected.
                        example: best project management software
                      type:
                        type: string
                        enum:
                          - discovery
                          - high_intent
                        nullable: true
                        description: Prompt type. Omitted/null is inferred from the text.
                        example: discovery
                      volume:
                        type: string
                        nullable: true
                        description: Free-text volume label.
                        example: '1000'
                      current_monthly_searches:
                        type: integer
                        nullable: true
                        minimum: 0
                        maximum: 2147483647
                        description: >-
                          Estimated monthly searches. Fractional input is
                          rounded to an integer; out-of-range returns 400.
                        example: 5400
                      current_total_value:
                        type: integer
                        nullable: true
                        minimum: 0
                        description: >-
                          Estimated total monthly value. Fractional input is
                          rounded to an integer.
                        example: 1250
                      topic_id:
                        type: string
                        format: uuid
                        nullable: true
                        description: Topic to assign the prompt to.
                      countries:
                        type: array
                        maxItems: 1000
                        nullable: true
                        items:
                          type: string
                        description: >-
                          Supported country names (case-insensitive; stored as
                          canonical labels).
                        example:
                          - United States
                          - France
                      primary_country:
                        type: string
                        nullable: true
                        description: >-
                          Primary country. When `countries` is non-empty it must
                          be one of them.
                        example: United States
                      persona_ids:
                        type: array
                        maxItems: 1000
                        nullable: true
                        items:
                          type: string
                          format: uuid
                        description: Persona ids to associate.
                      location_ids:
                        type: array
                        maxItems: 1000
                        nullable: true
                        items:
                          type: string
                          format: uuid
                        description: >-
                          Location ids to associate. A location's country must
                          be compatible with the prompt's countries.
                      tag_ids:
                        type: array
                        maxItems: 1000
                        nullable: true
                        items:
                          type: string
                          format: uuid
                        description: Tag ids to assign.
                      is_paused:
                        type: boolean
                        description: >-
                          Create the prompt paused (preserves paused state on
                          import). Defaults to active.
                        default: false
                source:
                  type: string
                  enum:
                    - manual
                    - ai_generated
                    - bulk_upload
                  description: >-
                    Attribution source (UI server action only; ignored for
                    API-key callers).
      responses:
        '201':
          description: Prompts created
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - count
                  - prompt_ids
                properties:
                  success:
                    type: boolean
                    example: true
                  count:
                    type: integer
                    example: 1
                  prompt_ids:
                    type: array
                    items:
                      type: string
                      format: uuid
        '400':
          description: Bad request - Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                blank_text:
                  value:
                    error: Prompt text is required
                unsupported_country:
                  value:
                    error: 'Unsupported country: Atlantis'
                primary_not_in_countries:
                  value:
                    error: Primary country must be one of the prompt's countries
                location_country_mismatch:
                  value:
                    error: >-
                      A prompt's countries must include each attached location's
                      country
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden - You don't have access to this website
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                no_access:
                  value:
                    error: Unauthorized access to this website
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - apiKey: []
components:
  schemas:
    Error:
      type: object
      description: Error response object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message describing what went wrong
          example: Unauthorized
  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).

````