Skip to main content
PATCH
/
api
/
v1
/
workspace
/
{projectSlug}
/
roles
/
{roleId}
cURL
curl --request PATCH \
  --url https://us.infisical.com/api/v1/workspace/{projectSlug}/roles/{roleId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "slug": "<string>",
  "name": "<string>",
  "description": "<string>",
  "permissions": [
    {
      "subject": "secrets",
      "inverted": true,
      "action": "read",
      "conditions": {
        "environment": "<string>",
        "secretPath": "<string>"
      }
    }
  ]
}'
{
  "role": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "description": "<string>",
    "slug": "<string>",
    "permissions": [
      {
        "subject": "<string>",
        "action": "<string>",
        "conditions": "<any>",
        "inverted": true
      }
    ],
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "projectId": "<string>",
    "version": 1
  }
}

Authorizations

Authorization
string
header
required

An access token in Infisical

Path Parameters

projectSlug
string
required

The slug of the project to update the role for.

roleId
string
required

The ID of the role to update

Body

application/json
slug
string

The slug of the role.

Required string length: 1 - 64
name
string

The name of the role.

description
string | null

The description for the role.

permissions
object[]

The permissions assigned to the role.

  • Option 1
  • Option 2
  • Option 3
  • Option 4
  • Option 5
  • Option 6
  • Option 7
  • Option 8
  • Option 9
  • Option 10
  • Option 11
  • Option 12
  • Option 13
  • Option 14
  • Option 15
  • Option 16
  • Option 17
  • Option 18
  • Option 19
  • Option 20
  • Option 21
  • Option 22
  • Option 23
  • Option 24
  • Option 25
  • Option 26
  • Option 27
  • Option 28
  • Option 29
  • Option 30

Response

Default Response

role
object
required