Skip to content
Skip to Content
Coder Docs

Update a custom organization role

PUT
/api/v2/organizations/{organization}/members/roles

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Path Parameters

organization*string

Organization ID

Formatuuid

Request Body

Update role request

application/json
  1. body
display_name?string
name?string
organization_member_permissions?array<>

OrganizationMemberPermissions are specific to the organization the role belongs to.

organization_permissions?array<>

OrganizationPermissions are specific to the organization the role belongs to.

site_permissions?array<>
user_permissions?array<>

Response Body

OK

application/json
  1. response
[index: integer]?

The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.

curl -X PUT \	"$CODER_URL/api/v2/organizations/{organization}/members/roles" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN" \	-H "Content-Type: application/json" \	-d '{  "display_name": "string",  "name": "string",  "organization_member_permissions": [    {      "action": "application_connect",      "negate": true,      "resource_type": "*"    }  ]}'
Example Response200
[  {    "display_name": "string",    "name": "string",    "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",    "organization_member_permissions": [      {        "action": "application_connect",        "negate": true,        "resource_type": "*"      }    ],    "organization_permissions": [      {        "action": "application_connect",        "negate": true,        "resource_type": "*"      }    ],    "site_permissions": [      {        "action": "application_connect",        "negate": true,        "resource_type": "*"      }    ],    "user_permissions": [      {        "action": "application_connect",        "negate": true,        "resource_type": "*"      }    ]  }]