Token Canopy · Schema
GrantCreateIn
POST /v0/drives/{id}/grants body.
Artificial IntelligenceCollaborationWorkspacePrivacyEmail
Properties
| Name | Type | Description |
|---|---|---|
| principal_type | string | |
| principal_id | object | Required for `agent`, `user`, `service`, and `workspace`; omitted only for `public`. For `agent`, `user`, and `service` it is checked against that type's id prefix (`tcagt_` / `tcusr_` / `tcsvc_`) and |
| resource_type | string | |
| resource_id | string | |
| role | string | |
| expires_at | object |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/tokencanopy-com/json-schema/tokencanopy-com-grant-create-in-schema.json",
"title": "GrantCreateIn",
"description": "POST /v0/drives/{id}/grants body.",
"x-generated": "2026-11-27",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/tokencanopy-com-openapi.json#/components/schemas/GrantCreateIn",
"properties": {
"principal_type": {
"type": "string",
"enum": [
"agent",
"user",
"service",
"workspace",
"public"
],
"title": "Principal Type"
},
"principal_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Principal Id",
"description": "Required for `agent`, `user`, `service`, and `workspace`; omitted only for `public`. For `agent`, `user`, and `service` it is checked against that type's id prefix (`tcagt_` / `tcusr_` / `tcsvc_`) and a mismatch is `422 VALIDATION_ERROR`. The prefix is all AgentDrive asserts: these ids are minted by Hub, so their full shape is not AgentDrive's to enforce, and a well-formed id naming a principal that does not exist — or belongs to another workspace — is accepted here and simply never matches a token. The rule is conditional on `principal_type`, so it is enforced at the boundary rather than expressible as one JSON Schema `pattern`."
},
"resource_type": {
"type": "string",
"enum": [
"drive",
"folder",
"artifact"
],
"title": "Resource Type"
},
"resource_id": {
"type": "string",
"minLength": 1,
"title": "Resource Id"
},
"role": {
"type": "string",
"enum": [
"viewer",
"editor",
"manager"
],
"title": "Role"
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Expires At"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"principal_type",
"resource_type",
"resource_id",
"role"
]
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/tokencanopy-com-grant-create-in"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.