# Roles

A Role represents the main position or title assigned to members on an account. Roles may be associated
with account memberships, account invitations, participation, project template assignments, rate card roles,
rate card versions, resources, or time adjustments.

## Fetching a list of Roles

 - [GET /roles](https://developer.kantata.com/kantata/specification/roles/get-roles.md): The Roles endpoint provides a list of all active roles that belong to the account of the user making the request.

The response will contain an array of role objects, sorted alphabetically by the name attribute
available under the key named roles.


This endpoint returns structured Role objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the roles top-level JSON key.
Please see our Response Format section for more information.

## Creating a new Role

 - [POST /roles](https://developer.kantata.com/kantata/specification/roles/create-role.md): This endpoint returns structured Role objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the roles top-level JSON key.
Please see our Response Format section for more information.

## Fetching a single Role

 - [GET /roles/{id}](https://developer.kantata.com/kantata/specification/roles/get-role.md): This endpoint returns structured Role objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the roles top-level JSON key.
Please see our Response Format section for more information.

## Updating an existing Role

 - [PUT /roles/{id}](https://developer.kantata.com/kantata/specification/roles/update-role.md): This endpoint returns structured Role objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the roles top-level JSON key.
Please see our Response Format section for more information.

## Deleting an existing Role

 - [DELETE /roles/{id}](https://developer.kantata.com/kantata/specification/roles/delete-role.md): The Role will be soft-deleted if it is currently in use. If not, it will be removed.


The response will contain no content and an HTTP 204 status code if the request was
successful, or a standard Kantata OX error message explaining why the object could not be deleted.

