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

# Add a prompt

> Add an active prompt to the brand. Counts against your account-wide prompt limit (across all brands); exceeding it returns 409.



## OpenAPI

````yaml https://agentled.co/api/v1/openapi.json post /brands/{id}/prompts
openapi: 3.1.0
info:
  title: agentled API
  version: 1.0.0
  description: >-
    Programmatic access to the agentled AI Search monitor: manage brands and
    prompts, set a brand's measurement location, and read scan results — the
    same data behind the dashboard.


    All requests are authenticated with an API key you mint in the Account tab,
    sent as `Authorization: Bearer agl_live_...`. Every key is scoped to your
    account: you only ever see brands your account belongs to.


    **Base URL:** `https://agentled.co/api/v1`
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  contact:
    name: agentled
    url: https://agentled.co
servers:
  - url: https://agentled.co/api/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Plan
    description: The account's plan and its limits.
  - name: Brands
    description: Brands the account monitors.
  - name: Prompts
    description: The questions asked about a brand each scan.
  - name: Answers
    description: Per-scan answer history for a prompt.
  - name: Metrics
    description: A brand's AI-visibility metrics.
  - name: Scans
    description: Scan runs.
  - name: Geo
    description: Valid country/city values for a brand's location.
paths:
  /brands/{id}/prompts:
    post:
      tags:
        - Prompts
      summary: Add a prompt
      description: >-
        Add an active prompt to the brand. Counts against your account-wide
        prompt limit (across all brands); exceeding it returns 409.
      operationId: createPrompt
      parameters:
        - name: id
          in: path
          required: true
          description: Brand id (UUID). A value that is not a UUID returns 404.
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePromptInput'
      responses:
        '201':
          description: The created prompt, plus current prompt usage.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptCreated'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/LimitReached'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    CreatePromptInput:
      type: object
      required:
        - text
      properties:
        text:
          type: string
          maxLength: 300
          description: The question to ask about the brand.
          example: What are the best project management tools?
    PromptCreated:
      type: object
      required:
        - prompt
        - usage
      properties:
        prompt:
          $ref: '#/components/schemas/Prompt'
        usage:
          type: object
          required:
            - used
            - limit
          properties:
            used:
              type: integer
              description: Active prompts across all your brands after this add.
            limit:
              type: integer
              description: Your plan's prompt limit.
    Prompt:
      type: object
      properties:
        id:
          type: string
          format: uuid
        brandId:
          type: string
          format: uuid
        text:
          type: string
        active:
          type: boolean
          description: False = disabled (soft-deleted, kept for history).
        sortOrder:
          type:
            - integer
            - 'null'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Error:
      type: object
      description: Every error has this shape. Branch on the stable `error.code`.
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Stable machine-readable code.
              enum:
                - unauthorized
                - not_found
                - bad_request
                - limit_reached
                - server_error
            message:
              type: string
              description: Human-readable explanation.
            upgradeUrl:
              type: string
              description: >-
                Present only when `code` is `limit_reached`: where to upgrade
                the plan.
  responses:
    BadRequest:
      description: The request body or a parameter was invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The resource does not exist, or your account cannot see it.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    LimitReached:
      description: A plan limit was reached. The error carries `upgradeUrl`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: Something went wrong. Retry.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API key from the Account tab, sent as `Authorization: Bearer
        agl_live_...`. Keys are secret; store them server-side.

````