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

> ## Agent Instructions
> For API and SDK launches, integration testing, and ongoing coding-agent checks, start with Gauge Agents:
> - [Gauge Agents overview](https://docs.withgauge.com/agents/index.md)
> - [Gauge Agents quickstart](https://docs.withgauge.com/agents/quickstart.md)
> - [Create and inspect an eval](https://docs.withgauge.com/agents/guides/create-an-eval-and-run-an-experiment.md)
> - [Agent Experience: diagnose integration failures](https://docs.withgauge.com/agents/concepts/agent-experience.md)
> - [Agent Preference: measure product selection](https://docs.withgauge.com/agents/concepts/agent-preference.md)
> - [GitHub PR checks](https://docs.withgauge.com/agents/guides/github-pr-checks.md)
> For AI search visibility and AEO, start with [Gauge Chat](https://docs.withgauge.com/introduction/welcome.md).

# Create prompts

> Create prompts in bulk and queue them for sampling.

A prompt whose text matches an existing prompt in the category (ignoring
case and whitespace) is returned as `already_exists`, so retries are safe.
If the new prompts exceed the plan's prompt limit, nothing is created and
the response is 403 `limit_exceeded`.



## OpenAPI

````yaml chat/openapi.json POST /orgs/{org}/categories/{category}/prompts
openapi: 3.1.0
info:
  title: Gauge Chat API
  version: '1.0'
  description: >
    The Gauge Chat API: manage tracked prompts and query AI visibility data.


    **Authentication:** `Authorization: Bearer <token>` using either a Gauge CLI

    login token (`gauge auth login`) or an organization API key. Login tokens
    are

    user-bound; every request is checked against your current organization

    memberships. API keys act as their organization (and, for an agency, its

    clients), and are scoped to read or read+write. `GET /me` describes the

    token in use.


    **Conventions:** camelCase JSON; typed opaque string IDs (`prm_…`, `top_…`);

    errors as `{"error": {"code", "message", "field"?}}`; list endpoints page
    with

    an opaque `cursor` and return `nextCursor`.
  contact:
    name: Gauge support
    email: support@withgauge.com
servers:
  - url: https://app.withgauge.com/api/v1
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Organizations
    description: The current credential, and the organizations and categories it reaches.
  - name: Topics
    description: Topics group tracked prompts within a category.
  - name: Prompts
    description: Tracked prompts, their topics, tracking type, and tags.
  - name: Tags
    description: Organization-wide labels for prompts.
  - name: Brands
    description: Brands Gauge tracks in a category, including competitors.
  - name: Query
    description: Aggregate AI visibility reports.
  - name: Answers
    description: Individual AI answers and the citations in them.
paths:
  /orgs/{org}/categories/{category}/prompts:
    post:
      tags:
        - Prompts
      summary: Create prompts
      description: >-
        Create prompts in bulk and queue them for sampling.


        A prompt whose text matches an existing prompt in the category (ignoring

        case and whitespace) is returned as `already_exists`, so retries are
        safe.

        If the new prompts exceed the plan's prompt limit, nothing is created
        and

        the response is 403 `limit_exceeded`.
      operationId: createPrompts
      parameters:
        - in: path
          name: org
          schema:
            title: Org
            type: string
          required: true
        - in: path
          name: category
          schema:
            title: Category
            type: string
          required: true
        - in: query
          name: dryRun
          schema:
            default: false
            title: Dryrun
            type: boolean
          required: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePromptsIn'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePromptsOut'
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePromptsOut'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CreatePromptsIn:
      properties:
        prompts:
          items:
            $ref: '#/components/schemas/PromptIn'
          maxItems: 500
          minItems: 1
          title: Prompts
          type: array
      required:
        - prompts
      title: CreatePromptsIn
      type: object
    CreatePromptsOut:
      properties:
        results:
          items:
            $ref: '#/components/schemas/CreateResult'
          title: Results
          type: array
        dryRun:
          title: Dryrun
          type: boolean
        remaining:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            Prompts still allowed by the plan after this request; null if
            unlimited.
          title: Remaining
      required:
        - results
        - dryRun
        - remaining
      title: CreatePromptsOut
      type: object
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      required:
        - error
      title: ErrorResponse
      type: object
    PromptIn:
      properties:
        text:
          maxLength: 500
          minLength: 1
          title: Text
          type: string
        topicId:
          title: Topicid
          type: string
        trackingType:
          default: visibility
          enum:
            - visibility
            - branded_own
          title: Trackingtype
          type: string
        tagIds:
          items:
            type: string
          title: Tagids
          type: array
      required:
        - text
        - topicId
      title: PromptIn
      type: object
    CreateResult:
      properties:
        index:
          title: Index
          type: integer
        status:
          enum:
            - created
            - already_exists
            - would_create
          title: Status
          type: string
        prompt:
          anyOf:
            - $ref: '#/components/schemas/PromptOut'
            - type: 'null'
      required:
        - index
        - status
      title: CreateResult
      type: object
    ErrorDetail:
      properties:
        code:
          title: Code
          type: string
        message:
          title: Message
          type: string
        field:
          anyOf:
            - type: string
            - type: 'null'
          title: Field
      required:
        - code
        - message
      title: ErrorDetail
      type: object
    PromptOut:
      properties:
        id:
          title: Id
          type: string
        text:
          title: Text
          type: string
        topicId:
          anyOf:
            - type: string
            - type: 'null'
          title: Topicid
        trackingType:
          title: Trackingtype
          type: string
        tagIds:
          items:
            type: string
          title: Tagids
          type: array
        createdAt:
          format: date-time
          title: Createdat
          type: string
        firstAnswerDay:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          description: Pacific date of the prompt's first answer; null until sampled.
          title: Firstanswerday
      required:
        - id
        - text
        - topicId
        - trackingType
        - tagIds
        - createdAt
        - firstAnswerDay
      title: PromptOut
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: gauge_sk_<key>
      description: >-
        An organization API key from **Settings → Integrations → API Keys**, or
        a Gauge CLI login token from `gauge auth login`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.