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

# Validate API Key

> Validate an API key and get associated project/organization details. For organization-level keys, optionally provide X-Project-Id header to validate access to a specific project.



## OpenAPI

````yaml /v2/openapi.json get /auth/validate
openapi: 3.0.0
info:
  title: Promptwatch API v2
  description: >-
    API v2 for customer integrations with Promptwatch monitoring platform. This
    version provides improved structure, additional endpoints, and enhanced
    functionality.
  version: 2.0.0
  contact:
    name: Promptwatch Support
    email: team@promptwatch.com
    url: https://promptwatch.com
  license:
    name: Commercial
    url: https://promptwatch.com/terms-and-conditions
servers:
  - url: https://server.promptwatch.com/api/v2
    description: Promptwatch API v2
security: []
tags:
  - name: Authentication
    description: API key validation and authentication
  - name: Content
    description: >-
      AI content generation and optimization. Create content asynchronously and
      poll for results.
  - name: Content Gap
    description: Content gap analysis and recommendations
  - name: Models
    description: Available LLM models
  - name: Monitors
    description: Monitor management and CRUD operations
  - name: Page Tracker
    description: Track URLs and inspect citation stats, responses, and prompts
  - name: Prompts
    description: Prompt management and operations
  - name: Query Fanouts
    description: ChatGPT query fanout keywords
  - name: Responses
    description: LLM response data and analytics
  - name: Tags
    description: Tag management for prompts
  - name: Topics
    description: Topic management for prompts
  - name: Actions
    description: Action items (GEO suggestions and tasks)
  - name: Personas
    description: Persona configuration for monitors
  - name: Brands
    description: Brand management for competitive analysis
  - name: Visibility
    description: Brand visibility time series and competitor heatmaps
  - name: Citations
    description: Citation analytics from AI responses
  - name: Analytics
    description: Visitor analytics, AI crawler logs, sentiment, and brand visibility trends
  - name: Projects
    description: Project management (organization-level keys only)
  - name: Sitemap
    description: Sitemap crawl progress and discovered URLs
  - name: Site Health
    description: >-
      Crawled pages with SEO issues (titles, meta descriptions, H1, thin
      content)
  - name: Socials
    description: >-
      Social media citations (Reddit posts and YouTube videos) found in LLM
      responses
paths:
  /auth/validate:
    get:
      tags:
        - Authentication
      summary: Validate API Key
      description: >-
        Validate an API key and get associated project/organization details. For
        organization-level keys, optionally provide X-Project-Id header to
        validate access to a specific project.
      operationId: validateApiKey
      parameters:
        - schema:
            type: string
            format: uuid
          in: header
          name: x-project-id
          required: false
          description: >-
            Project ID to validate (required for organization-level keys when
            accessing project resources)
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                example:
                  valid: true
                  keyType: organization
                  project:
                    id: 6ba7b810-9dad-11d1-80b4-00c04fd430c8
                    name: Example Project
                    slug: example-project
                  organization:
                    id: 6ba7b811-9dad-11d1-80b4-00c04fd430c8
                    name: Example Org
                    slug: example-org
                  apiKey:
                    id: 550e8400-e29b-41d4-a716-446655440001
                    name: CI integration
                    permission: FULL
                    createdAt: '2026-03-01T12:00:00.000Z'
                    lastUsedAt: '2026-03-30T08:15:22.000Z'
                  availableProjects: null
                properties:
                  valid:
                    type: boolean
                    description: Whether the API key is valid
                  keyType:
                    type: string
                    enum:
                      - project
                      - organization
                    description: Type of API key - project-level or organization-level
                  project:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: string
                        description: Project ID
                      name:
                        type: string
                        description: Project name
                      slug:
                        type: string
                        description: Project slug
                    required:
                      - id
                      - name
                      - slug
                    description: >-
                      Project details. For org keys, only present when
                      X-Project-Id header is provided.
                  organization:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Organization ID
                      name:
                        type: string
                        description: Organization name
                      slug:
                        type: string
                        description: Organization slug
                    required:
                      - id
                      - name
                      - slug
                  apiKey:
                    type: object
                    properties:
                      id:
                        type: string
                        description: API key ID
                      name:
                        type: string
                        description: API key name
                      permission:
                        type: string
                        enum:
                          - FULL
                          - READ_ONLY
                        description: Permission level of the API key
                      createdAt:
                        type: string
                        format: date-time
                        description: When the API key was created
                      lastUsedAt:
                        type: string
                        format: date-time
                        nullable: true
                        description: When the API key was last used
                    required:
                      - id
                      - name
                      - permission
                      - createdAt
                  availableProjects:
                    type: array
                    nullable: true
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Project ID
                        name:
                          type: string
                          description: Project name
                        slug:
                          type: string
                          description: Project slug
                      required:
                        - id
                        - name
                        - slug
                    description: >-
                      List of available projects. Only present for
                      organization-level keys when no X-Project-Id header is
                      provided.
                required:
                  - valid
                  - keyType
                  - organization
                  - apiKey
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                example:
                  valid: false
                  message: Invalid API key.
                properties:
                  valid:
                    type: boolean
                    description: Whether the API key is valid
                    enum:
                      - false
                  message:
                    type: string
                    description: Error message
                required:
                  - valid
                  - message
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthorized
                  message: Missing or invalid X-API-Key header.
                properties:
                  error:
                    type: string
                    description: Error category (often aligned with HTTP semantics)
                  code:
                    type: string
                    description: Optional machine-readable code
                  message:
                    type: string
                    description: Human-readable explanation
                  details:
                    type: object
                    description: Optional structured detail (e.g. validation)
                    additionalProperties: true
                required:
                  - error
                  - message
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthorized
                  message: Missing or invalid X-API-Key header.
                properties:
                  error:
                    type: string
                    description: Error category (often aligned with HTTP semantics)
                  code:
                    type: string
                    description: Optional machine-readable code
                  message:
                    type: string
                    description: Human-readable explanation
                  details:
                    type: object
                    description: Optional structured detail (e.g. validation)
                    additionalProperties: true
                required:
                  - error
                  - message
                additionalProperties: false
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key for authentication. Get yours from the Promptwatch dashboard
        under Settings > API Keys.

````