v1

latestOpenAPI 3.1.02026-07-24170121.2 MB

Create Role

post/v1/roles

Headers

Acceptstring required

Indicates which content types, expressed as MIME types, the client is able to understand.

Content-Typestring required

Indicates the media type of the resource sent in the HTTP message body. <br /><br /><b>Possible Values:</b><br /> application/json<br />application/x-www-form-urlencoded

Request body

namestring required

Name of the created role. Spaces not allowed. Max 20 characters.

permissions_idsstring[] required

IDs of the permissions for the new role. To obtain available IDs, execute a GET request at the /v1/permissions endpoint.

descriptionstring

Description of the created role. Max 255 characters.

display_namestring

Display name of the created role. Max 100 characters.

Response

200

Example response

{
  "data": {
    "object": "Role",
    "id": "MRLmEaRMzRMajzQb",
    "name": "Test",
    "created_at": 1728593373,
    "permissions": {
      "data": [
        {
          "object": "Permission",
          "id": "NoozEMxzoYxdYeNM",
          "name": "create-lead",
          "display_name": "Create New Lead",
          "permission_type": "Lead"
        }
      ]
    }
  }
}