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

# Create problem

> Create a new problem from a job description. The submitted role is classified for serveability on submit; roles that do not translate into a hands-on coding assessment are rejected with a 422 and code "JOB_NOT_SERVABLE". This endpoint is not enabled by default.



## OpenAPI

````yaml https://api.ropes.ai/api/docs/openapi.json post /api/public/problems/new
openapi: 3.0.0
info:
  title: Ropes Public API
  version: 1.0.0
  description: >-
    Public API for Ropes. Authenticate using your API key in the x-api-key
    header.
servers:
  - url: https://api.ropes.ai
    description: Production server
  - url: http://localhost:3001
    description: Local development server
security: []
paths:
  /api/public/problems/new:
    post:
      tags:
        - Problems
      summary: Create problem
      description: >-
        Create a new problem from a job description. The submitted role is
        classified for serveability on submit; roles that do not translate into
        a hands-on coding assessment are rejected with a 422 and code
        "JOB_NOT_SERVABLE". This endpoint is not enabled by default.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                jobDescription:
                  type: string
                  minLength: 1
                  description: Job description used to generate the problem
                desiredTime:
                  type: integer
                  minimum: 30
                  maximum: 60
                  default: 45
                  description: >-
                    Desired assessment duration in minutes. Must be between 30
                    and 60.
                problemTitle:
                  type: string
                  minLength: 1
                  description: Optional problem title
                additionalNotes:
                  type: string
                  description: Optional notes to guide problem creation
                seniorityLevel:
                  type: string
                  enum:
                    - junior
                    - mid-level
                    - senior
                    - staff
                  description: >-
                    Optional experience level for the generated assessment.
                    Valid values match the Ropes UI: junior, mid-level, senior,
                    staff. When omitted, Ropes infers seniority from the job
                    description.
                integrationSource:
                  type: string
                  description: Integration source. Must be provided with externalId.
                externalId:
                  type: string
                  minLength: 1
                  description: >-
                    External ID from the integration source. Must be provided
                    with integrationSource.
                testMode:
                  type: boolean
                  description: >-
                    Creates a non-production test problem and sends lifecycle
                    webhooks without generating a real assessment. Available
                    only for approved API integrations.
              required:
                - jobDescription
              additionalProperties: false
      responses:
        '200':
          description: Successfully queued problem creation
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  problemId:
                    type: string
                  error:
                    type: string
                required:
                  - success
        '400':
          description: Bad request - Invalid input or integrationSource/externalId mismatch
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemErrorResponse'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemErrorResponse'
        '403':
          description: >-
            Forbidden - Problem creation or problem creation test mode is not
            enabled for this organization. Email support@ropes.ai to request
            access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemErrorResponse'
        '422':
          description: >-
            Unprocessable Entity - Ropes cannot serve this role. The response
            body includes code "JOB_NOT_SERVABLE" and a human-readable
            explanation of why the role was rejected.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for this error.
                  error:
                    type: string
                    description: Human-readable error message.
                  code:
                    type: string
                    enum:
                      - JOB_NOT_SERVABLE
                    description: Stable machine-readable error code for unservable roles.
                  explanation:
                    type: string
                    description: >-
                      Explanation of why the role cannot be served, derived from
                      the job description.
                required:
                  - success
                  - error
                  - code
                  - explanation
        '429':
          description: >-
            Rate limit exceeded - Maximum 3 problem creation requests per 15
            minutes and maximum 7 problem creation requests per hour.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ProblemErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````