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

# Add a user-authored workspace prompt



## OpenAPI

````yaml /openapi.json post /api/v1/workspaces/{workspace}/prompts
openapi: 3.0.3
info:
  title: ai-cmo.dev Services API
  version: 1.0.0
servers: []
security: []
paths:
  /api/v1/workspaces/{workspace}/prompts:
    post:
      summary: Add a user-authored workspace prompt
      operationId: addPrompt
      parameters:
        - name: workspace
          in: path
          required: true
          schema:
            type: string
            pattern: ^[a-z0-9-]+$
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddPrompt'
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddPromptOutput'
      security:
        - cookieAuth: []
        - bearerAuth:
            - prompts:write
components:
  schemas:
    AddPrompt:
      type: object
      properties:
        text:
          type: string
          minLength: 3
          maxLength: 2000
        intent:
          type: string
          enum:
            - discovery
            - problem_solution
            - use_case
            - comparison
            - expert
            - brand_research
        topic:
          type: string
          minLength: 1
          maxLength: 120
        lang:
          type: string
          pattern: ^[a-z]{2}(?:-[A-Z]{2})?$
        importance:
          type: number
          minimum: 0
          maximum: 1
      required:
        - text
        - intent
        - topic
        - lang
      additionalProperties: false
    AddPromptOutput:
      type: object
      properties:
        id:
          type: string
          minLength: 1
      required:
        - id
      additionalProperties: false
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: cookie
      name: geo.session
      description: Signed HttpOnly browser session cookie
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: gp_live_<43 base64url characters>
      description: Workspace-bound machine API key

````