Skip to content
VeilVeil
Esc
↑↓navigate↵open⌘Jpreview

Grant an agent or a Kratos human Use on an item. Same grant object. Not MCP. Not a family vault.

POST/v1/grants
Authorization
AuthorizationBearer token (JWT) · headerrequired
Hydra JWT. Identity is the bound agent or a Keto member human. The host is not identity.
Request body
requiredapplication/json
agentstring
Agent id. XOR human/group.
humanstring
Kratos identity id. Same Grant.agent_id. Not email. XOR agent/group.
itemstringrequired
levelstringrequired
Allowed:level1level2
expiresstring
Go duration. Empty is forever.
groupstring
Org group name — the shared vault. XOR agent/human.
Responses
200Grant
idstringrequired
org_idstringrequired
agent_idstringrequired
item_idstringrequired
levelstringrequired
expires_atstring<date-time>
subject_kindstringrequired
Subject kind. agent_id holds the subject id — the group id when subject_kind is group.
Allowed:agenthumangroup
400bad request
401missing or invalid Bearer
403not owner
Request
curl -X POST "https://veil.nyc/v1/grants" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "agent": "string",
  "human": "string",
  "item": "string",
  "level": "level1",
  "expires": "string",
  "group": "string"
}'
Response
{
  "id": "string",
  "org_id": "string",
  "agent_id": "string",
  "item_id": "string",
  "level": "string",
  "expires_at": "2024-01-01T00:00:00Z",
  "subject_kind": "agent"
}