Add Selected Skill
Selected Skills
Add Selected Skill
Record that a user has selected a skill.
POST
Add Selected Skill
Send a user ID and a skill ID, and this creates a record tying them together. That’s it.
One rule: a user can’t select the same skill twice. Try it and you’ll get a
409. This is enforced at both the application level and in the database with a compound unique index, so even concurrent requests won’t create duplicates.
No authentication needed.
Request Body
The user who’s selecting the skill.
The skill being selected.
The sub-skill category this skill belongs to. You can get this from the search endpoint.
The master skill category. Also available from search results.
Response
true when the record is createdA short confirmation message
The newly created record. Hold onto the
selected_skill_id — you’ll need it if you want to delete this later.Examples
Why does the 409 check happen twice?The route checks for an existing
{ user_id, skill_id } record before trying to insert. But just in case two requests land at exactly the same time, the database also has a compound unique index on those fields. The app-level check gives you the nicer error message. The DB-level index is the safety net.
