Skip to content
Endless Documentation
Access

Create access grant

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

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

Authorization

headerAuthorizationBearer <esk_live_…>

A workspace API key created in workspace settings. It acts as the member who created it, narrowed to its abilities, projects and credit limit. Each operation names the ability it needs.

Scope: sharing:write

Path Parameters

resource_type*string
Value in"asset""chat_conversation""canvas""project""scheduled_task""skill""element""connector_credential"
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
  1. body
user_id*string
Match^user_
role?string
Value in"viewer""editor""manager"

Response Body

OK

application/json
  1. response
resource_type*string
Value in"asset""chat_conversation""canvas""project""scheduled_task""skill""element""connector_credential"
resource_id*string
owner_id*string|null
title*string|null
role*string
Value in"viewer""editor""manager""owner"
shared*boolean
capabilities*
can_leave*boolean
general_access*
general_access_editable*boolean
workspace_roles?array<>
editable_by_others*boolean|null
grants*array<>
inherited*array<>
can_publish*boolean
can_file?boolean
public_link*|null
Example Request
curl -X POST 'https://api.endless.app/access/asset/497f6eca-6276-4993-bfeb-53cbbbba6f08/grants' \  -H 'Content-Type: application/json' \  -d '{  "user_id": "string"}'
Example Response
{  "resource_type": "asset",  "resource_id": "string",  "owner_id": "string",  "title": "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,  "workspace_roles": [    "viewer"  ],  "editable_by_others": true,  "grants": [    {      "id": "string",      "user_id": "string",      "role": "viewer",      "granted_by_id": "string",      "created_at": "2019-08-24T14:15:22Z",      "role_without_grant": "viewer"    }  ],  "inherited": [    {      "kind": "chat",      "id": "string",      "title": "string",      "emoji": "string",      "via": "origin",      "role": "viewer",      "through": "chat",      "audience": true    }  ],  "can_publish": true,  "can_file": true,  "public_link": {    "show_prompts": true,    "show_owner": true,    "token": "string",    "snapshot_at": "2019-08-24T14:15:22Z",    "snapshot_behind": true,    "created_at": "2019-08-24T14:15:22Z"  }}