---
title: "Expand Competency"
method: POST
path: "/api/job-roles/expand-competency"
tags: ["Job Roles"]
---

# Expand Competency

`POST /api/job-roles/expand-competency`

## Request

- Base URL: `https://api.thebetterhire.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.thebetterhire.ai/api/job-roles/expand-competency`
- Auth: HTTP bearer

Validate + expand a single competency name into a description and
evaluation criteria. Thin router: validates inputs, delegates the
LLM work to `core.jd_parser.expand_single_competency`, maps the
result onto the API response. All AI logic stays in core/ so the
public API and MCP can call the same service later.

## Request body

- ExpandCompetencyRequest: AI-fill the description + evaluation criteria for a competency the recruiter typed in by hand. Validates the name first — the LLM rejects gibberish ("Potato"), profanity, and obviously off-topic names so the form never gets garbage filled in for it.
  - `name` string, required
  - `job_title` string, required
  - `jd_text` string, nullable

## Response `200`

Successful Response

- ExpandCompetencyResponse: Either a successful expansion (description + criteria) or a clear rejection so the UI can surface a specific reason instead of a generic error.
  - `success` boolean, required
  - `description` string, nullable
  - `evaluation_criteria` string, nullable
  - `message` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/thebetterhire/apis/interanalysis-b2b-api.md) · [All operations](https://skmtc.dev/thebetterhire/apis/interanalysis-b2b-api/llms.txt) · [OpenAPI document](https://skmtc.dev/thebetterhire/apis/interanalysis-b2b-api/revisions/c8ad03e900ea?raw)
