Skip to content
Endless Documentation

Create access grant

POST
/access/{resource_type}/{resource_id}/grants

Create access grant. Scoped to the resource named by resource_id.

Authorization

bearerAuth
AuthorizationBearer <token>

JWT token from authentication

In: header

Path Parameters

resource_type*string

Value in

  • "asset"
  • "chat_conversation"
  • "canvas"
  • "project"
  • "scheduled_task"
  • "skill"
resource_id*string
Formatuuid

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 POST "https://example.com/access/asset/497f6eca-6276-4993-bfeb-53cbbbba6f08/grants" \  -H "Content-Type: application/json" \  -d '{    "user_id": "string",    "role": "viewer"  }'
{  "resource_type": "asset",  "resource_id": "string",  "owner_id": "string",  "role": "viewer",  "shared": true,  "capabilities": {    "can_edit": true,    "can_manage_people": true,    "can_change_general_access": true,    "can_delete": true  },  "can_leave": true,  "general_access": {    "visibility": "private",    "workspace_role": "viewer"  },  "general_access_editable": true,  "grants": [    {      "id": "string",      "user_id": "string",      "role": "viewer",      "granted_by_id": "string",      "created_at": "2019-08-24T14:15:22Z"    }  ],  "inherited": [    {      "kind": "chat",      "id": "string",      "title": "string",      "emoji": "string",      "via": "origin",      "role": "viewer",      "through": "chat",      "audience": true    }  ]}