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

# Create prompts prompts

> Requires scopes: eval:write



## OpenAPI

````yaml /api-reference/openapi.json post /api/prompts
openapi: 3.1.0
info:
  title: EvalGate API
  version: 3.7.6
  description: EvalGate API. See docs/api-contract.md for stability commitments.
servers:
  - url: https://evalgate.com
    description: Production
  - url: http://localhost:3000
    description: Local
security: []
paths:
  /api/prompts:
    post:
      tags:
        - prompts
      summary: Create prompts prompts
      description: 'Requires scopes: eval:write'
      operationId: post_prompts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostApiPromptsRequest'
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostApiPromptsResponse201ApplicationJson'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - bearerAuth:
            - eval:write
components:
  schemas:
    PostApiPromptsRequest:
      type: object
      properties:
        name:
          type: string
        definition:
          type: object
          properties:
            model:
              type: object
              properties:
                provider:
                  type: string
                model:
                  type: string
                routingKey:
                  type: string
              additionalProperties: false
            messages:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  role:
                    oneOf:
                      - type: string
                        enum:
                          - user
                      - type: string
                        enum:
                          - system
                      - type: string
                        enum:
                          - developer
                      - type: string
                        enum:
                          - tool
                      - type: string
                        enum:
                          - assistant
                      - type: string
                        enum:
                          - example
                  content:
                    type: string
                  name:
                    type: string
                  toolCallId:
                    type: string
                additionalProperties: false
                required:
                  - id
                  - role
                  - content
            inputSchema:
              type: object
              additionalProperties:
                oneOf:
                  - type: 'null'
                  - type: string
                  - type: number
                  - type: boolean
                    enum:
                      - false
                  - type: boolean
                    enum:
                      - true
                  - type: array
                    items:
                      $ref: '#/components/schemas/JsonValue'
                  - type: object
                    additionalProperties:
                      $ref: '#/components/schemas/JsonValue'
            tags:
              type: array
              items:
                type: string
            parameters:
              type: object
              additionalProperties:
                oneOf:
                  - type: 'null'
                  - type: string
                  - type: number
                  - type: boolean
                    enum:
                      - false
                  - type: boolean
                    enum:
                      - true
                  - type: array
                    items:
                      $ref: '#/components/schemas/JsonValue'
                  - type: object
                    additionalProperties:
                      $ref: '#/components/schemas/JsonValue'
            tools:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                  inputSchema:
                    type: object
                    additionalProperties:
                      oneOf:
                        - type: 'null'
                        - type: string
                        - type: number
                        - type: boolean
                          enum:
                            - false
                        - type: boolean
                          enum:
                            - true
                        - type: array
                          items:
                            $ref: '#/components/schemas/JsonValue'
                        - type: object
                          additionalProperties:
                            $ref: '#/components/schemas/JsonValue'
                  strict:
                    oneOf:
                      - type: boolean
                        enum:
                          - false
                      - type: boolean
                        enum:
                          - true
                  description:
                    type: string
                additionalProperties: false
                required:
                  - name
                  - inputSchema
            dataPolicy:
              type: string
            outputSchema:
              type: object
              additionalProperties:
                oneOf:
                  - type: 'null'
                  - type: string
                  - type: number
                  - type: boolean
                    enum:
                      - false
                  - type: boolean
                    enum:
                      - true
                  - type: array
                    items:
                      $ref: '#/components/schemas/JsonValue'
                  - type: object
                    additionalProperties:
                      $ref: '#/components/schemas/JsonValue'
            variables:
              type: array
              items:
                type: object
                properties:
                  type:
                    oneOf:
                      - type: string
                        enum:
                          - string
                      - type: string
                        enum:
                          - number
                      - type: string
                        enum:
                          - boolean
                      - type: string
                        enum:
                          - object
                      - type: string
                        enum:
                          - array
                      - type: string
                        enum:
                          - integer
                  name:
                    type: string
                  required:
                    type: boolean
                  default:
                    oneOf:
                      - type: 'null'
                      - type: string
                      - type: number
                      - type: boolean
                        enum:
                          - false
                      - type: boolean
                        enum:
                          - true
                      - type: array
                        items:
                          oneOf:
                            - type: 'null'
                            - type: string
                            - type: number
                            - type: boolean
                              enum:
                                - false
                            - type: boolean
                              enum:
                                - true
                            - type: array
                              items:
                                $ref: '#/components/schemas/JsonValue'
                            - type: object
                              additionalProperties:
                                $ref: '#/components/schemas/JsonValue'
                      - type: object
                        additionalProperties:
                          oneOf:
                            - type: 'null'
                            - type: string
                            - type: number
                            - type: boolean
                              enum:
                                - false
                            - type: boolean
                              enum:
                                - true
                            - type: array
                              items:
                                $ref: '#/components/schemas/JsonValue'
                            - $ref: '#/components/schemas/JsonValue'
                  description:
                    type: string
                additionalProperties: false
                required:
                  - type
                  - name
                  - required
            responseFormat:
              oneOf:
                - type: string
                  enum:
                    - json
                - type: string
                  enum:
                    - json_schema
                - type: string
                  enum:
                    - text
            fallbackPolicy:
              type: string
          additionalProperties: false
          required:
            - model
            - messages
            - inputSchema
        key:
          type: string
        description:
          type: string
        idempotencyKey:
          type: string
      additionalProperties: false
      required:
        - name
        - definition
        - key
    PostApiPromptsResponse201ApplicationJson:
      type: object
      properties:
        artifactId:
          type: number
        key:
          type: string
        name:
          type: string
        version:
          type: object
          properties:
            createdAt:
              type: string
            submittedAt:
              oneOf:
                - type: 'null'
                - type: string
            approvedAt:
              oneOf:
                - type: 'null'
                - type: string
            definition:
              type: object
              properties:
                messages:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      role:
                        oneOf:
                          - type: string
                            enum:
                              - user
                          - type: string
                            enum:
                              - system
                          - type: string
                            enum:
                              - developer
                          - type: string
                            enum:
                              - tool
                          - type: string
                            enum:
                              - assistant
                          - type: string
                            enum:
                              - example
                      content:
                        type: string
                      name:
                        type: string
                      toolCallId:
                        type: string
                    additionalProperties: false
                    required:
                      - id
                      - role
                      - content
                variables:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      type:
                        oneOf:
                          - type: string
                            enum:
                              - string
                          - type: string
                            enum:
                              - number
                          - type: string
                            enum:
                              - boolean
                          - type: string
                            enum:
                              - object
                          - type: string
                            enum:
                              - array
                          - type: string
                            enum:
                              - integer
                      required:
                        type: boolean
                      description:
                        type: string
                      default:
                        oneOf:
                          - type: 'null'
                          - type: string
                          - type: number
                          - type: boolean
                            enum:
                              - false
                          - type: boolean
                            enum:
                              - true
                          - type: array
                            items:
                              oneOf:
                                - type: 'null'
                                - type: string
                                - type: number
                                - type: boolean
                                  enum:
                                    - false
                                - type: boolean
                                  enum:
                                    - true
                                - type: array
                                  items:
                                    $ref: '#/components/schemas/JsonValue'
                                - type: object
                                  additionalProperties:
                                    $ref: '#/components/schemas/JsonValue'
                          - type: object
                            additionalProperties:
                              oneOf:
                                - type: 'null'
                                - type: string
                                - type: number
                                - type: boolean
                                  enum:
                                    - false
                                - type: boolean
                                  enum:
                                    - true
                                - type: array
                                  items:
                                    $ref: '#/components/schemas/JsonValue'
                                - $ref: '#/components/schemas/JsonValue'
                    additionalProperties: false
                    required:
                      - name
                      - type
                      - required
                inputSchema:
                  type: object
                  properties:
                    type:
                      oneOf:
                        - type: string
                        - type: array
                          items:
                            type: string
                    properties:
                      type: object
                      additionalProperties:
                        $ref: '#/components/schemas/JsonValue'
                    required:
                      type: array
                      items:
                        type: string
                    additionalProperties:
                      oneOf:
                        - type: boolean
                          enum:
                            - false
                        - type: boolean
                          enum:
                            - true
                        - $ref: '#/components/schemas/JsonValue'
                    items:
                      $ref: '#/components/schemas/JsonValue'
                    enum:
                      type: array
                      items:
                        oneOf:
                          - type: 'null'
                          - type: string
                          - type: number
                          - type: boolean
                            enum:
                              - false
                          - type: boolean
                            enum:
                              - true
                          - type: array
                            items:
                              $ref: '#/components/schemas/JsonValue'
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                outputSchema:
                  type: object
                  properties:
                    type:
                      oneOf:
                        - type: string
                        - type: array
                          items:
                            type: string
                    properties:
                      type: object
                      additionalProperties:
                        $ref: '#/components/schemas/JsonValue'
                    required:
                      type: array
                      items:
                        type: string
                    additionalProperties:
                      oneOf:
                        - type: boolean
                          enum:
                            - false
                        - type: boolean
                          enum:
                            - true
                        - $ref: '#/components/schemas/JsonValue'
                    items:
                      $ref: '#/components/schemas/JsonValue'
                    enum:
                      type: array
                      items:
                        oneOf:
                          - type: 'null'
                          - type: string
                          - type: number
                          - type: boolean
                            enum:
                              - false
                          - type: boolean
                            enum:
                              - true
                          - type: array
                            items:
                              $ref: '#/components/schemas/JsonValue'
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                model:
                  type: object
                  properties:
                    provider:
                      type: string
                    model:
                      type: string
                    routingKey:
                      type: string
                  additionalProperties: false
                parameters:
                  type: object
                  additionalProperties:
                    oneOf:
                      - type: 'null'
                      - type: string
                      - type: number
                      - type: boolean
                        enum:
                          - false
                      - type: boolean
                        enum:
                          - true
                      - type: array
                        items:
                          $ref: '#/components/schemas/JsonValue'
                      - type: object
                        additionalProperties:
                          $ref: '#/components/schemas/JsonValue'
                tools:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      description:
                        type: string
                      inputSchema:
                        type: object
                        properties:
                          type:
                            oneOf:
                              - type: string
                              - type: array
                                items:
                                  type: string
                          properties:
                            type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                          required:
                            type: array
                            items:
                              type: string
                          additionalProperties:
                            oneOf:
                              - type: boolean
                                enum:
                                  - false
                              - type: boolean
                                enum:
                                  - true
                              - $ref: '#/components/schemas/JsonValue'
                          items:
                            $ref: '#/components/schemas/JsonValue'
                          enum:
                            type: array
                            items:
                              oneOf:
                                - type: 'null'
                                - type: string
                                - type: number
                                - type: boolean
                                  enum:
                                    - false
                                - type: boolean
                                  enum:
                                    - true
                                - type: array
                                  items:
                                    $ref: '#/components/schemas/JsonValue'
                                - type: object
                                  additionalProperties:
                                    $ref: '#/components/schemas/JsonValue'
                        additionalProperties: false
                      strict:
                        oneOf:
                          - type: boolean
                            enum:
                              - false
                          - type: boolean
                            enum:
                              - true
                    additionalProperties: false
                    required:
                      - name
                      - inputSchema
                responseFormat:
                  oneOf:
                    - type: string
                      enum:
                        - json
                    - type: string
                      enum:
                        - json_schema
                    - type: string
                      enum:
                        - text
                dataPolicy:
                  type: string
                fallbackPolicy:
                  type: string
                tags:
                  type: array
                  items:
                    type: string
              additionalProperties: false
              required:
                - messages
                - variables
                - inputSchema
                - model
                - parameters
                - tools
                - tags
            versionId:
              type: number
            artifactId:
              type: number
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            versionNumber:
              type: number
            payload:
              type: object
              additionalProperties:
                $ref: '#/components/schemas/JsonValue'
            summary:
              type: object
              additionalProperties:
                $ref: '#/components/schemas/JsonValue'
            metadata:
              oneOf:
                - type: 'null'
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            createdBy:
              type: string
            parentVersionId:
              oneOf:
                - type: 'null'
                - type: number
            contentHash:
              type: string
            reviewStatus:
              type: string
            reviewRevision:
              type: number
            submittedBy:
              oneOf:
                - type: 'null'
                - type: string
            approvedBy:
              oneOf:
                - type: 'null'
                - type: string
          additionalProperties: false
          required:
            - createdAt
            - submittedAt
            - approvedAt
            - definition
            - versionId
            - artifactId
            - organizationId
            - versionNumber
            - payload
            - summary
            - metadata
            - createdBy
            - parentVersionId
            - contentHash
            - reviewStatus
            - reviewRevision
            - submittedBy
            - approvedBy
      additionalProperties: false
      required:
        - artifactId
        - key
        - name
        - version
    JsonValue:
      oneOf:
        - type: 'null'
        - type: boolean
        - type: number
        - type: string
        - type: array
          items:
            $ref: '#/components/schemas/JsonValue'
        - type: object
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
    OrganizationId:
      type: string
      format: uuid
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - UNAUTHORIZED
                - FORBIDDEN
                - NOT_FOUND
                - VALIDATION_ERROR
                - RATE_LIMITED
                - CONFLICT
                - INTERNAL_ERROR
                - SERVICE_UNAVAILABLE
                - QUOTA_EXCEEDED
                - NO_ORG_MEMBERSHIP
                - CROSS_ORG_REFERENCE
                - INCOMPLETE
                - MALFORMED
            message:
              type: string
            details: {}
            requestId:
              type: string
              format: uuid
          required:
            - code
            - message
      required:
        - error
  responses:
    ValidationError:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    RateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key or Session Token

````