Skip to main content
POST
/
credential-builder
Start Optimization
curl --request POST \
  --url https://api.mapademics.com/v1/credential-builder \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "jobIdentifiers": [
    {
      "id": "15-1252",
      "lib": "soc"
    },
    {
      "id": "custom-job-123",
      "lib": "custom"
    }
  ],
  "allowedCourseIds": [
    "<string>"
  ],
  "minSections": 1,
  "maxSections": 20,
  "weights": {
    "overlapPenalty": 10,
    "sectionCountPenalty": 30,
    "undercoveragePenalty": 60
  }
}'
{
  "runId": "<string>"
}

Authorizations

X-API-Key
string
header
required

API key for authentication

Body

application/json
jobIdentifiers
object[]
required

Target jobs the credential should prepare students for

Minimum length: 1
Example:
[
{ "id": "15-1252", "lib": "soc" },
{ "id": "custom-job-123", "lib": "custom" }
]
allowedCourseIds
string[]

Optional filter: only use sections from these courses

minSections
integer
default:1

Minimum number of course sections in result

Required range: x >= 1
maxSections
integer
default:20

Maximum number of course sections in result

Required range: x >= 1
weights
object

Optimization weights (0-100%). Higher values penalize more strongly.

Response

Optimization job started successfully

runId
string
required

Trigger.dev run ID for tracking optimization progress