Skip to main content
POST
/
api
/
public
/
problems
/
new
Create problem
curl --request POST \
  --url https://api.ropes.ai/api/public/problems/new \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "jobDescription": "<string>",
  "desiredTime": 45,
  "problemTitle": "<string>",
  "additionalNotes": "<string>",
  "integrationSource": "<string>",
  "externalId": "<string>",
  "testMode": true
}
'
import requests

url = "https://api.ropes.ai/api/public/problems/new"

payload = {
"jobDescription": "<string>",
"desiredTime": 45,
"problemTitle": "<string>",
"additionalNotes": "<string>",
"integrationSource": "<string>",
"externalId": "<string>",
"testMode": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
jobDescription: '<string>',
desiredTime: 45,
problemTitle: '<string>',
additionalNotes: '<string>',
integrationSource: '<string>',
externalId: '<string>',
testMode: true
})
};

fetch('https://api.ropes.ai/api/public/problems/new', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ropes.ai/api/public/problems/new",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jobDescription' => '<string>',
'desiredTime' => 45,
'problemTitle' => '<string>',
'additionalNotes' => '<string>',
'integrationSource' => '<string>',
'externalId' => '<string>',
'testMode' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.ropes.ai/api/public/problems/new"

payload := strings.NewReader("{\n \"jobDescription\": \"<string>\",\n \"desiredTime\": 45,\n \"problemTitle\": \"<string>\",\n \"additionalNotes\": \"<string>\",\n \"integrationSource\": \"<string>\",\n \"externalId\": \"<string>\",\n \"testMode\": true\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.ropes.ai/api/public/problems/new")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"jobDescription\": \"<string>\",\n \"desiredTime\": 45,\n \"problemTitle\": \"<string>\",\n \"additionalNotes\": \"<string>\",\n \"integrationSource\": \"<string>\",\n \"externalId\": \"<string>\",\n \"testMode\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.ropes.ai/api/public/problems/new")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"jobDescription\": \"<string>\",\n \"desiredTime\": 45,\n \"problemTitle\": \"<string>\",\n \"additionalNotes\": \"<string>\",\n \"integrationSource\": \"<string>\",\n \"externalId\": \"<string>\",\n \"testMode\": true\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "problemId": "<string>",
  "error": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}
{
"success": false,
"error": "<string>",
"code": "JOB_NOT_SERVABLE",
"explanation": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}

Authorizations

x-api-key
string
header
required

Body

application/json
jobDescription
string
required

Job description used to generate the problem

Minimum string length: 1
desiredTime
integer
default:45

Desired assessment duration in minutes. Must be between 30 and 60.

Required range: 30 <= x <= 60
problemTitle
string

Optional problem title

Minimum string length: 1
additionalNotes
string

Optional notes to guide problem creation

seniorityLevel
enum<string>

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.

Available options:
junior,
mid-level,
senior,
staff
integrationSource
string

Integration source. Must be provided with externalId.

externalId
string

External ID from the integration source. Must be provided with integrationSource.

Minimum string length: 1
testMode
boolean

Creates a non-production test problem and sends lifecycle webhooks without generating a real assessment. Available only for approved API integrations.

Response

Successfully queued problem creation

success
boolean
required
problemId
string
error
string