Gupy Role API
The Role API from Gupy, for role.
The Role API from Gupy, for role.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/gupy:gupy-role-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Gupy Admin Global Role API
description: Public API for Estrutura Organizacional - Only requires Bearer token authentication. The central-company-id is automatically extracted from the token.
version: '1.0'
contact: {}
servers:
- url: https://api.gupy.io
tags:
- name: Role
paths:
/os/v1/roles:
get:
description: Returns a paginated list of roles for the company. Use `expand=company,positions` to load relations. When `externalCode` is set, the list is filtered to matching roles (case-insensitive). If none match, `data` is empty and `total` is 0.
operationId: RolePublicController_listRoles_v1
parameters:
- name: externalCode
required: false
in: query
description: Optional. Filter by role external code (case-insensitive exact match).
schema:
example: RL-F98
type: string
- name: page
required: false
in: query
description: Page number for pagination
schema:
minimum: 1
default: 1
example: 1
type: number
- name: maxPageSize
required: false
in: query
description: Maximum page size for pagination
schema:
minimum: 1
maximum: 100
default: 10
example: 20
type: number
- name: expand
required: false
in: query
description: 'Optional relations, comma-separated: company, positions'
schema:
example: company,positions
type: string
responses:
'200':
description: Roles retrieved successfully
content:
application/json:
example:
result:
data:
- uuid: d20dc017-80c6-4706-bbfe-549c1cc4d2c1
name: Analista de Negócios
description: Software Architect
externalCode: RL-F98
similarity: CONSULTANT
jobLevel: ASSISTANT
company:
uuid: d20dc017-80c6-4706-bbfe-549c1cc4d2c1
name: Gupy
positions:
- 1
page: 1
maxPageSize: 10
total: 1
totalPages: 1
'400':
description: Bad Request - Invalid query parameters
content:
application/json:
examples:
invalidPage:
summary: Invalid page parameter
value:
statusCode: 400
timestamp: '2025-05-29T21:00:00.000Z'
path: /os/v1/roles
method: GET
title: BadRequestException
message: Validation failed
errors:
- code: BadRequestException
target: ValidationPipe
message: externalCode should not be empty
invalidMaxPageSize:
summary: Invalid maxPageSize parameter
value:
statusCode: 400
timestamp: '2025-05-29T21:00:00.000Z'
path: /os/v1/roles
method: GET
title: BadRequestException
message: Validation failed
errors:
- code: BadRequestException
target: ValidationPipe
message: maxPageSize must not be greater than 100
'401':
description: Unauthorized - Invalid or missing token
content:
application/json:
example:
statusCode: 401
timestamp: '2026-05-25T17:24:50.546Z'
path: /v1/resource
method: GET
title: UnauthorizedException
message: Unauthorized
errors:
- code: UnauthorizedException
target: UnauthorizedException
message: Unauthorized
'500':
description: Internal Server Error - Unexpected failure
content:
application/json:
example:
statusCode: 500
timestamp: '2026-05-25T17:24:50.546Z'
path: /v1/resource
method: GET
title: InternalServerErrorException
message: Unexpected error occurred
errors:
- code: UnprocessableEntityException
target: Server
message: An unexpected error occurred. Please try again later.
security:
- bearer: []
- central-company-id: []
- company-uuid: []
summary: List roles with pagination
tags:
- Role
post:
description: '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.'
operationId: RolePublicController_create_v1
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateRolePublicRequestDto'
examples:
minimal:
summary: Required fields only
value:
name: Analista de Negócios
externalCode: RL-F98
similarity: CONSULTANT
full:
summary: With optional fields
value:
name: Analista de Negócios
externalCode: RL-F98
similarity: CONSULTANT
jobLevel: MID_LEVEL
description: Software Architect
optionalJobLevelCleared:
summary: Optional jobLevel omitted via empty string (normalized to null)
value:
name: Analista de Negócios
externalCode: RL-F99
similarity: CONSULTANT
jobLevel: ''
responses:
'201':
description: The role has been successfully created.
content:
application/json:
schema:
$ref: '#/components/schemas/RoleResponseDto'
'400':
description: Bad Request - Validation errors
content:
application/json:
example:
statusCode: 400
path: /v1/roles
method: POST
title: BadRequestException
message: Validation failed
'401':
description: Unauthorized - Invalid or missing token
content:
application/json:
example:
statusCode: 401
timestamp: '2026-05-25T17:24:50.545Z'
path: /v1/roles
method: POST
title: UnauthorizedException
message: Unauthorized
errors:
- code: UnauthorizedException
target: UnauthorizedException
message: Unauthorized
'409':
description: Conflict - A role with the same external code already exists for the company
content:
application/json:
example:
statusCode: 409
path: /v1/roles
method: POST
title: ConflictException
message: A role with this external code already exists for your company.
errors:
- code: ConflictException
message: A role with this external code already exists for your company.
'500':
description: Internal Server Error - Unexpected failure
content:
application/json:
example:
statusCode: 500
timestamp: '2026-05-25T17:24:50.545Z'
path: /v1/roles
method: POST
title: InternalServerErrorException
message: Unexpected error occurred
errors:
- code: UnprocessableEntityException
target: Server
message: An unexpected error occurred. Please try again later.
security:
- bearer: []
- central-company-id: []
- company-uuid: []
summary: Create a new role
tags:
- Role
/os/v1/roles/external/{externalCode}:
put:
description: 'Updates a role identified by `externalCode` in the URL.
**Business rules:**
- `name`, `similarity`, and `externalCode` are required and must not be empty.
- `jobLevel` and `description` must be sent on every request; use `null` or `""` to clear optional values in EO.
- `externalCode` in the body must be unique within the company (cannot match another role''s code).
**Errors (HTTP):**
- `404` when no role matches the URL `externalCode` for the company.
- `409` when the new `externalCode` is already used by another role.
- `400` for validation failures (invalid enums, missing keys, empty required strings).'
operationId: RolePublicController_update_v1
parameters:
- name: externalCode
required: true
in: path
description: External code of the role to update
schema:
example: ROLE-PUB-UPD-001
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateRolePublicRequestDto'
examples:
full:
summary: All fields filled
value:
name: Analista de Negócios
externalCode: ROLE-PUB-UPD-001
similarity: CONSULTANT
jobLevel: SENIOR
description: Senior business analyst
clearOptionals:
summary: Clear job level and description
value:
name: Analista de Negócios
externalCode: ROLE-PUB-UPD-001
similarity: CONSULTANT
jobLevel: null
description: ''
responses:
'200':
description: The role has been successfully updated.
'400':
description: Bad Request - Validation errors
content:
application/json:
example:
statusCode: 400
timestamp: '2026-02-10T12:00:00.000Z'
path: /v1/roles/external/ROLE-PUB-UPD-001
method: PUT
title: BadRequestException
message: Validation failed
errors:
- code: ValidationError
target: name
message: name should not be empty
'401':
description: Unauthorized - Invalid or missing token
content:
application/json:
example:
statusCode: 401
timestamp: '2026-05-25T17:24:50.546Z'
path: /v1/roles/external/ROLE-PUB-UPD-001
method: PUT
title: UnauthorizedException
message: Unauthorized
errors:
- code: UnauthorizedException
target: UnauthorizedException
message: Unauthorized
'404':
description: Not Found - role does not exist for the company
content:
application/json:
example:
statusCode: 404
timestamp: '2026-02-10T12:00:00.000Z'
path: /v1/roles/external/ROLE-PUB-UPD-001
method: PUT
title: NotFoundException
message: The role you are looking for does not exist
errors:
- code: NotFoundException
message: The role you are looking for does not exist
'409':
description: Conflict - external code already used by another role
content:
application/json:
example:
statusCode: 409
timestamp: '2026-02-10T12:00:00.000Z'
path: /v1/roles/external/ROLE-PUB-UPD-001
method: PUT
title: ConflictException
message: Another role in this company already uses this external code
errors:
- code: ConflictException
message: Another role in this company already uses this external code
'500':
description: Internal Server Error - Unexpected failure
content:
application/json:
example:
statusCode: 500
timestamp: '2026-05-25T17:24:50.546Z'
path: /v1/roles/external/ROLE-PUB-UPD-001
method: PUT
title: InternalServerErrorException
message: Unexpected error occurred
errors:
- code: UnprocessableEntityException
target: Server
message: An unexpected error occurred. Please try again later.
security:
- bearer: []
- central-company-id: []
- company-uuid: []
summary: Update an existing role
tags:
- Role
delete:
description: 'Soft-deletes a role identified by its external code for the company in the token.
**Business rules:**
• The role must exist for the company.
• The role cannot be deleted while it is linked to positions.'
operationId: RolePublicController_delete_v1
parameters:
- name: externalCode
required: true
in: path
description: External code of the role to delete
schema:
type: string
maxLength: 50
responses:
'200':
description: Role successfully deleted
content:
application/json:
example:
result: null
path: /v1/roles/external/ROLE-001
duration: 12ms
method: DELETE
'401':
description: Unauthorized - Invalid or missing token
content:
application/json:
example:
statusCode: 401
timestamp: '2026-05-25T17:24:50.546Z'
path: /v1/roles/external/{externalCode}
method: DELETE
title: UnauthorizedException
message: Unauthorized
errors:
- code: UnauthorizedException
target: UnauthorizedException
message: Unauthorized
'409':
description: Conflict - Role not found for the company
content:
application/json:
example:
statusCode: 409
timestamp: '2025-05-29T21:00:00.000Z'
path: /v1/roles/external/{externalCode}
method: DELETE
title: ConflictException
message: The role you are looking for does not exist
errors:
- code: ConflictException
message: The role you are looking for does not exist
'422':
description: Unprocessable Entity - Role still has active relationships (e.g. positions)
content:
application/json:
example:
statusCode: 422
timestamp: '2025-05-29T21:00:00.000Z'
path: /v1/roles/external/{externalCode}
method: DELETE
title: UnprocessableEntityException
message: The given role has active relationships
errors:
- code: UnprocessableEntityException
message: The given role has active relationships
'500':
description: Internal Server Error - Unexpected failure
content:
application/json:
example:
statusCode: 500
timestamp: '2026-05-25T17:24:50.546Z'
path: /v1/roles/external/{externalCode}
method: DELETE
title: InternalServerErrorException
message: Unexpected error occurred
errors:
- code: UnprocessableEntityException
target: Server
message: An unexpected error occurred. Please try again later.
security:
- bearer: []
- central-company-id: []
- company-uuid: []
summary: Delete role by external code
tags:
- Role
components:
schemas:
UpdateRolePublicRequestDto:
type: object
properties:
name:
type: string
maxLength: 300
description: role name
example: Analista de Negócios
similarity:
enum:
- AUXILIARY
- CONSULTANT
- SUPERVISOR
- DEVELOPER
- DIRECTOR
- INTERNSHIP
- SPECIALIST
- MANAGER
- OPERATOR
- TECHNICAL
- TRAINEE
- COORDINATOR
- ANALYST
- APPRENTICE
- COORDINATOR_OR_SUPERVISOR
- ANALYST_OR_AUXILIARY
- EXECUTIVE
type: string
description: role similarity
example: CONSULTANT
jobLevel:
enum:
- INTERN
- ASSISTANT
- JUNIOR
- MID_LEVEL
- SENIOR
- SPECIALIST
- EXECUTIVE
- null
type:
- string
- 'null'
description: role job level; send null or empty string to clear the value in EO
example: ASSISTANT
externalCode:
type: string
maxLength: 50
description: role external code
example: RL-F98
description:
type:
- string
- 'null'
maxLength: 900
description: role description; send null or empty string to clear the value in EO
example: Software Architect
required:
- name
- similarity
- jobLevel
- externalCode
- description
RoleResponseDto:
type: object
properties:
uuid:
type: string
description: role UUID
format: uuid
name:
type: string
description: role name
example: Analista de Negócios
similarity:
type: string
description: role similarity
enum:
- AUXILIARY
- CONSULTANT
- SUPERVISOR
- DEVELOPER
- DIRECTOR
- INTERNSHIP
- SPECIALIST
- MANAGER
- OPERATOR
- TECHNICAL
- TRAINEE
- COORDINATOR
- ANALYST
- APPRENTICE
- COORDINATOR_OR_SUPERVISOR
- ANALYST_OR_AUXILIARY
- EXECUTIVE
example: CONSULTANT
jobLevel:
enum:
- INTERN
- ASSISTANT
- JUNIOR
- MID_LEVEL
- SENIOR
- SPECIALIST
- EXECUTIVE
- null
type:
- string
- 'null'
description: role job level
example: ASSISTANT
externalCode:
type: string
description: role external code
example: RL-F98
description:
type:
- string
- 'null'
description: role description
example: Software Architect
company:
description: company (when expand=company)
allOf:
- $ref: '#/components/schemas/CompanyDto'
positions:
description: internal position IDs linked to the role (when expand=positions)
example:
- 1
- 2
type: array
items:
type: number
required:
- uuid
- name
- similarity
- jobLevel
- externalCode
- description
CompanyDto:
type: object
properties:
id:
type: string
description: Internal company ID
example: '1'
uuid:
type: string
description: company UUID
format: uuid
centralCompanyId:
type: string
description: central company UUID
format: uuid
name:
type: string
description: company name
example: Gupy
CreateRolePublicRequestDto:
type: object
properties:
name:
type: string
maxLength: 300
description: role name
example: Analista de Negócios
similarity:
enum:
- AUXILIARY
- CONSULTANT
- SUPERVISOR
- DEVELOPER
- DIRECTOR
- INTERNSHIP
- SPECIALIST
- MANAGER
- OPERATOR
- TECHNICAL
- TRAINEE
- COORDINATOR
- ANALYST
- APPRENTICE
- COORDINATOR_OR_SUPERVISOR
- ANALYST_OR_AUXILIARY
- EXECUTIVE
type: string
description: role similarity
example: CONSULTANT
jobLevel:
enum:
- INTERN
- ASSISTANT
- JUNIOR
- MID_LEVEL
- SENIOR
- SPECIALIST
- EXECUTIVE
- null
type:
- string
- 'null'
description: role job level; empty string is accepted and normalized to null
example: ASSISTANT
externalCode:
type: string
maxLength: 50
description: role external code
example: RL-F98
description:
type: string
maxLength: 900
description: role description
example: Software Architect
required:
- name
- similarity
- externalCode
securitySchemes:
bearer:
scheme: bearer
bearerFormat: JWT
type: http
x-provenance:
method: searched
source: https://developers.gupy.io/reference
harvested: '2026-12-03'
tool: harvest-readme-openapi.py
note: Assembled verbatim from the OpenAPI definition ReadMe embeds in each operation page of the provider's developer portal; paths and components merged by API title, nothing authored.
assembled_from:
- https://developers.gupy.io/reference/areapubliccontroller_create_v1.md
- https://developers.gupy.io/reference/areapubliccontroller_deletebyexternalcode_v1.md
- https://developers.gupy.io/reference/areapubliccontroller_listallareas_v1.md
- https://developers.gupy.io/reference/areapubliccontroller_update_v1.md
- https://developers.gupy.io/reference/costcenterpubliccontroller_create_v1.md
- https://developers.gupy.io/reference/costcenterpubliccontroller_deletecostcenter_v1.md
- https://developers.gupy.io/reference/costcenterpubliccontroller_findcostcenterbyuuid_v1.md
- https://developers.gupy.io/reference/costcenterpubliccontroller_findcostcenters_v1.md
- https://developers.gupy.io/reference/costcenterpubliccontroller_update_v1.md
- https://developers.gupy.io/reference/operationunitpubliccontroller_create_v1.md
- https://developers.gupy.io/reference/operationunitpubliccontroller_deletebyexternalcode_v1.md
- https://developers.gupy.io/reference/operationunitpubliccontroller_listalloperationunits_v1.md
- https://developers.gupy.io/reference/operationunitpubliccontroller_updatebyexternalcode_v1.md
- https://developers.gupy.io/reference/organizationunitpubliccontroller_create_v1.md
- https://developers.gupy.io/reference/organizationunitpubliccontroller_deletedepartment_v1.md
- https://developers.gupy.io/reference/organizationunitpubliccontroller_findorganizationunitbyuuid_v1.md
- https://developers.gupy.io/reference/organizationunitpubliccontroller_findorganizationunits_v1.md
- https://developers.gupy.io/reference/organizationunitpubliccontroller_update_v1.md
- https://developers.gupy.io/reference/positionpubliccontroller_create_v1.md
- https://developers.gupy.io/reference/positionpubliccontroller_createbatch_v1.md
- https://developers.gupy.io/reference/positionpubliccontroller_createpositionreplication_v1.md
- https://developers.gupy.io/reference/positionpubliccontroller_deleteposition_v1.md
- https://developers.gupy.io/reference/positionpubliccontroller_deletepositionbyemployee_v1.md
- https://developers.gupy.io/reference/positionpubliccontroller_findpositions_v1.md
- https://developers.gupy.io/reference/positionpubliccontroller_updateposition_v1.md
- https://developers.gupy.io/reference/positionpubliccontroller_updatepositionbyemployee_v1.md
- https://developers.gupy.io/reference/rolepubliccontroller_create_v1.md
- https://developers.gupy.io/reference/rolepubliccontroller_delete_v1.md
- https://developers.gupy.io/reference/rolepubliccontroller_listroles_v1.md
- https://developers.gupy.io/reference/rolepubliccontroller_update_v1.md
merge:
pages: 30
deduped: 67
conflicts_kept_first: 0