Overview
The Profiles API manages freelancer profile information, including skills, languages, and professional descriptions. These endpoints help freelancers showcase their expertise to potential clients.Queries
getSkills
Retrieve all available skills in the system (public endpoint). Input Parameters: None Response: Array of skill objects ordered alphabetically by name. Example:getUserSkills
Get all skills associated with the authenticated user. Input Parameters: None (uses authenticated user from context) Response:Skill ID
Skill name (e.g., “React”, “Node.js”)
URL-friendly slug
Proficiency level: beginner, intermediate, advanced, or expert
getLanguages
Retrieve all available languages in the system (public endpoint). Input Parameters: None Response: Array of language objects ordered alphabetically. Example:getUserLanguages
Get all languages the authenticated user speaks. Input Parameters: None (uses authenticated user from context) Response:Language ID
Language name (e.g., “English”, “Arabic”)
Language code
Native name of the language
Proficiency level: basic, conversational, fluent, or native_or_bilingual
getUserDescription
Get the professional description for the authenticated user. Input Parameters: None (uses authenticated user from context) Response:User’s professional description/bio
Mutations
addSkill
Add a new skill to the authenticated user’s profile. Input Parameters:Skill name
Proficiency level:
beginner: Just starting outintermediate: Some experienceadvanced: Extensive experienceexpert: Mastery level
Operation success status
Created skill object
updateSkill
Update an existing skill’s name or proficiency level. Input Parameters:Skill ID to update
Updated skill name
Updated proficiency level: beginner, intermediate, advanced, or expert
Operation success status
Updated skill object
removeSkill
Remove a skill from the user’s profile. Input Parameters:Skill ID to remove
Operation success status
addLanguage
Add a language to the user’s profile. Input Parameters:Language ID from the languages table
Proficiency level:
basic: Basic understandingconversational: Can hold conversationsfluent: Fluent speakernative_or_bilingual: Native or bilingual proficiency
Operation success status
Created user-language association
updateLanguage
Update the proficiency level for a language. Input Parameters:Language ID
Updated proficiency level: basic, conversational, fluent, or native_or_bilingual
Operation success status
Updated user-language association
removeLanguage
Remove a language from the user’s profile. Input Parameters:Language ID to remove
Operation success status
updateUserDescription
Update the user’s professional description/bio. Input Parameters:Professional description (optional, can be empty to clear)
Skill Model
Skill Fields
Unique skill identifier (CUID)
Skill name
URL-friendly slug (auto-generated from name)
Skill status: active or inactiveDefault: active
Proficiency level (beginner, intermediate, advanced, expert)
ID of user who has this skill
Creation timestamp
Last update timestamp
Language Model
Language Fields
Unique language identifier (CUID)
Language name (e.g., “English”)
Native name (e.g., “العربية” for Arabic)
Language code (e.g., “en”, “ar”, “fr”)
Creation timestamp
Last update timestamp
UserLanguages Model
Junction table connecting users to languages:User ID
Language ID
Proficiency level
[userId, languageId]