Skip to main content
POST
/
roles
/
create
Create role
curl --request POST \
  --url https://api.obselite.com/v0/roles/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "isEnabled": true,
  "lockedAt": "<string>",
  "permissions": [
    "DELETE_MEMBER"
  ],
  "teamsOnResources": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "usersOnOrganizations": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "usersOnResources": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "usersOnTeams": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ]
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "description": "<string>",
  "organization": {},
  "organizationDefault": {},
  "teamsOnResources": [
    {}
  ],
  "usersOnOrganizations": [
    {}
  ],
  "usersOnResources": [
    {}
  ],
  "usersOnTeams": [
    {}
  ],
  "activities": [
    {}
  ]
}

Authorizations

Authorization
string
header
required

The API token generated from the Obselite dashboard

Body

application/json
name
string
description
string | null
isEnabled
boolean
lockedAt
string | null
permissions
enum<string>[]
teamsOnResources
string<uuid>[]
usersOnOrganizations
string<uuid>[]
usersOnResources
string<uuid>[]
usersOnTeams
string<uuid>[]

Response

Successful response

id
string<uuid>
required

Role UUID

name
string
required
description
string | null
organization
object | null

The organization that owns this role, following the organization schema

organizationDefault
object | null

The default role for the organization, following the role schema

teamsOnResources
array
usersOnOrganizations
array
usersOnResources
array
usersOnTeams
array
activities
array