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

> Creates a location for a website. `country` is case-insensitive and stored as its canonical label. Any attached `prompt_ids` must allow the location's country.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/locations
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/locations:
    post:
      tags:
        - Basics
      summary: Create Location
      description: >-
        Creates a location for a website. `country` is case-insensitive and
        stored as its canonical label. Any attached `prompt_ids` must allow the
        location's country.
      operationId: createLocation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - website_id
                - location
                - country
              properties:
                website_id:
                  type: string
                  format: uuid
                location:
                  type: string
                  description: Location name. Trimmed; blank rejected.
                  example: New York
                country:
                  type: string
                  description: Supported country (case-insensitive).
                  example: United States
                prompt_ids:
                  type: array
                  maxItems: 1000
                  items:
                    type: string
                    format: uuid
                  description: Active prompt ids to attach.
      responses:
        '201':
          description: Location created
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - location
                  - country
                properties:
                  id:
                    type: string
                    format: uuid
                  location:
                    type: string
                  country:
                    type: string
        '400':
          description: Bad request - Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                unsupported_country:
                  value:
                    error: Unsupported country
                blank_name:
                  value:
                    error: Location name is required
        '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).

````