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

# Get Prompts

> Get prompts for a workspace



## OpenAPI

````yaml /public-apis/openapi/prompts.json get /v1/prompts
openapi: 3.0.0
info:
  version: 1.0.0
  contact:
    name: Maxim Engineering
    email: eng@getmaxim.ai
  title: Maxim SDK API - prompts
  description: API documentation for Maxim SDK prompts endpoints
servers:
  - url: https://api.getmaxim.ai
security: []
paths:
  /v1/prompts:
    get:
      tags:
        - Prompt
      summary: Get Prompts
      description: Get prompts for a workspace
      parameters:
        - schema:
            type: string
            description: Unique identifier for the workspace
          required: true
          name: workspaceId
          in: query
        - schema:
            type: string
            description: Unique identifier for the prompt
          required: false
          name: id
          in: query
        - schema:
            type: string
            description: Name of the prompt
          required: false
          name: name
          in: query
        - schema:
            type: number
            nullable: true
            maximum: 100
            default: 10
            description: 'Maximum number of records to return (max: 100)'
          required: false
          name: limit
          in: query
        - schema:
            type: string
            description: Unique identifier for the folder
          required: false
          name: folderId
          in: query
        - schema:
            type: boolean
            nullable: true
            default: false
            description: Include prompt versions in the response
          required: false
          name: includeVersions
          in: query
        - schema:
            type: string
            description: Unique identifier for the cursor
          required: false
          name: cursor
          in: query
        - schema:
            type: array
            items:
              type: object
              properties:
                variable:
                  type: string
                  description: Variable name for deployment query condition
                operator:
                  type: string
                  enum:
                    - '>'
                    - <
                    - <=
                    - '>='
                    - '='
                  description: Comparison operator for the deployment query condition
                value:
                  type: string
                  description: Value to compare with
              required:
                - variable
                - operator
                - value
            description: >-
              Deployment query conditions to match against deployment strategy.
              When provided, returns the matching prompt version.
          required: false
          name: deploymentQuery
          in: query
      responses:
        '200':
          description: Prompts retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                  workspaceId:
                    type: string
                  accountId:
                    type: string
                  folderId:
                    type: string
                    nullable: true
                  meta:
                    nullable: true
                  createdById:
                    type: string
                  createdAt:
                    type: string
                  updatedAt:
                    type: string
                  deletedAt:
                    type: string
                    nullable: true
                  deploymentHistory:
                    type: object
                    properties:
                      id:
                        type: string
                      workspaceId:
                        type: string
                      accountId:
                        type: string
                      promptId:
                        type: string
                      strategy:
                        type: object
                        properties:
                          type:
                            type: string
                          config:
                            type: object
                            additionalProperties:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                  rules:
                                    type: object
                                    properties:
                                      query:
                                        type: object
                                        properties:
                                          not:
                                            type: boolean
                                          rules:
                                            type: array
                                            items:
                                              type: object
                                              properties:
                                                field:
                                                  type: string
                                                value:
                                                  type: string
                                                operator:
                                                  type: string
                                                valueSource:
                                                  type: string
                                              required:
                                                - field
                                                - value
                                                - operator
                                                - valueSource
                                          combinator:
                                            type: string
                                        required:
                                          - not
                                          - rules
                                          - combinator
                                      version:
                                        type: number
                                    required:
                                      - query
                                      - version
                                  timestamp:
                                    type: string
                                required:
                                  - id
                                  - rules
                                  - timestamp
                        required:
                          - type
                          - config
                      createdAt:
                        type: string
                      updatedAt:
                        type: string
                      deletedAt:
                        type: string
                        nullable: true
                    required:
                      - id
                      - workspaceId
                      - accountId
                      - promptId
                      - strategy
                      - createdAt
                      - updatedAt
                      - deletedAt
                required:
                  - id
                  - name
                  - description
                  - workspaceId
                  - accountId
                  - folderId
                  - createdById
                  - createdAt
                  - updatedAt
                  - deletedAt
                  - deploymentHistory
        '400':
          description: Invalid request parameters
        '401':
          description: Unauthorized
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-maxim-api-key
      description: API key for authentication

````