Set the keys allowed to use a context source
/v1/context-sources/{slug}/keysSet the keys allowed to use a context source.
Replaces the list. Every key must be a virtual key of the source's workspace; an empty list removes every grant. mcp_keys, when present, replaces the MCP keys that may read the source through the MCP Gateway's own server (/s/vectoraxis), each an active MCP key of the source's workspace; absent leaves them unchanged. Recorded in the audit log.
Requires an organization admin key, or a workspace admin key for the source's workspace, and a plan that includes context sources (402 otherwise). Returns 400 for a key of another workspace or an unknown key.
Authorization
AuthorizationBearer va_A platform API key (
va_...), created under Settings > API keys. Scoped to an organization or one workspace, with an admin or member role. Used by the management API.
Path parameters
slugstringrequiredThe source's identifier (
ctx-...).
Query parameters
organizationstringrequiredThe organization's identifier (slug).
Request body application/json
the keys to allow
virtual_keysstring[]requiredVirtual key slugs (
vk-...) of the source's workspace. An empty list removes every grant. At most 200.At most 200 items
mcp_keysstring<uuid>[]MCP key ids (the
idof an MCP key of the source's workspace) allowed to read the source through the MCP Gateway's own server,/s/vectoraxis: list it, read its outline and read its sections. An empty list removes every MCP key grant; absent leaves them as they are. At most 200.At most 200 items
Responses
virtual_keysstring[]Virtual key slugs (
vk-...). Empty: no key may attach the source.mcp_keysstring<uuid>[]MCP key ids allowed to read the source through the MCP Gateway's own server (
/s/vectoraxis). Empty: none.