For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
SupportDeel Home
OverviewPlatformEmployer of RecordContractorsGlobal PayrollHREmbeddedDeel ITAPI ReferenceChangelog
OverviewPlatformEmployer of RecordContractorsGlobal PayrollHREmbeddedDeel ITAPI ReferenceChangelog
  • Resources
    • Blog
    • Community
    • API spec
  • Endpoints
      • POSTCreate child organization
      • POSTCreate organization custom role.
      • GETGet Current Organization
      • GETGet Team List
      • GETGet the roles of the current organization.
      • GETRetrieve Departments
      • GETRetrieve working locations
      • PATCHUpdate organization custom role
    • PATCHProfiles
LogoLogo
SupportDeel Home
EndpointsOrganizations

Create organization custom role.

POST
/roles
POST
/rest/v2/roles
$curl -X POST https://api.letsdeel.com/rest/v2/roles \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "id": 1,
3 "name": "Admin",
4 "scope": "ORGANIZATION",
5 "description": "Admin role",
6 "permissionSets": [
7 "accounting:read"
8 ],
9 "hrisOrgStructureId": "abc123"
10}

Creates a new custom role within the current organization. Token scopes: organizations:write

Was this page helpful?
Previous

Get Current Organization

Next
Built with

Authentication

AuthorizationBearer
## Authentication The Deel API uses bearer tokens to authenticate requests. All API calls must be made over HTTPS — calls over plain HTTP or without authentication will fail. ```curl curl -X GET 'https://api.letsdeel.com/rest/v2/contracts' \ -H 'Authorization: Bearer YOUR-TOKEN-HERE' ``` [Learn more about authentication](/api/authentication)
OR
AuthorizationBearer

Standard OAuth2 security scheme based on https://swagger.io/docs/specification/authentication/

Request

This endpoint expects an object.
dataobjectOptional

Response

Successful operation
iddouble
Organization role id
namestring
Organization role name
scopestring
Organization role scope
descriptionstring
Organization role description
permissionSetslist of strings
hrisOrgStructureIdstring
HRIS organization structure id

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error

Authentication

The Deel API uses bearer tokens to authenticate requests. All API calls must be made over HTTPS — calls over plain HTTP or without authentication will fail.

1curl -X GET 'https://api.letsdeel.com/rest/v2/contracts' \
2 -H 'Authorization: Bearer YOUR-TOKEN-HERE'

Learn more about authentication