Ir al contenido
Documentación de Endless

Set role permissions

PATCH
/organizations/{organization_id}/roles

Set role permissions. Scoped to the organization named by organization_id. Send a sparse body — only the fields that changed. Each field is authorized on its own, so resending an unchanged one also demands its permission.

Authorization

bearerAuth
AuthorizationBearer <token>

JWT token from authentication

In: header

Path Parameters

organization_id*string
Match^org_

Header Parameters

Endless-Api-Version?string

Pin the caller to an API major (1). Omit to accept the current version. A major this deployment cannot serve is refused with 400 unsupported_api_version.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/organizations/org_abc123/roles" \  -H "Content-Type: application/json" \  -d '{    "role": "org:admin",    "permissions": [      "billing:manage"    ]  }'
{  "role": "org:admin",  "permissions": [    "billing:manage"  ]}