v1
latestOpenAPI 3.0.02026-07-24161168406.5 KBRole
Role
Create a new role
Creates a new role (cargo) for the company resolved from the API token.
Business rules:
- name, externalCode, and similarity are required.
- externalCode must be unique among active roles for the same company.
- jobLevel is optional: omit the field, send null, or send an empty string ("")—empty string is normalized to null before persistence.
- description is optional: omit the field, send null, or send an empty string.
Validation:
- Invalid enum values for similarity or jobLevel, or other constraint violations return 400 with validation details.
post/os/v1/roles
Request body
Example request
{
"name": "Analista de Negócios",
"similarity": "CONSULTANT",
"jobLevel": "ASSISTANT",
"externalCode": "RL-F98",
"description": "Software Architect"
}Response
The role has been successfully created.
Example response
{
"name": "Analista de Negócios",
"similarity": "CONSULTANT",
"jobLevel": "ASSISTANT",
"externalCode": "RL-F98",
"description": "Software Architect",
"company": {
"id": "1",
"name": "Gupy"
},
"positions": [
1,
2
]
}