Skip to content

Replace a custom role

Request

OAuth 2.0 scope:
  • okta.roles.manage

Replaces the label and description for a custom role by roleIdOrLabel

Path
roleIdOrLabelstringrequired

id or label of the role

Example:cr0Yq6IJxGIr0ouum0g3
Bodyapplication/jsonrequired
descriptionstringrequired

Description of the role

labelstringrequired

Unique label for the role

curl -i -X PUT \
  https://subdomain.okta.com/api/v1/iam/roles/cr0Yq6IJxGIr0ouum0g3 \
  -H 'Content-Type: application/json' \
  -d '{
    "label": "UserCreator",
    "description": "Create users"
  }'

Responses

OK

Bodyapplication/json
createdstring, (date-time)read-only

Timestamp when the role was created

descriptionstringrequired

Description of the role

idstringread-only

Unique key for the role

labelstringrequired

Unique label for the role

lastUpdatedstring, (date-time)read-only

Timestamp when the role was last updated

Response
{ "id": "cr0Yq6IJxGIr0ouum0g3", "label": "UserCreator", "description": "Create users", "created": "2021-02-06T16:20:57.000Z", "lastUpdated": "2021-02-06T16:20:57.000Z", "_links": { "permissions": { … }, "self": { … } } }