Skip to main content
POST
Go (SDK)

Authorizations

Authorization
string
header
required

Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.

Headers

X-On-Behalf-Of
string

Optional external end-user identifier forwarded by the API gateway.

Path Parameters

vector_store_id
string
required

The ID of the vector store.

Body

application/json

Grants a role on the store, replacing any role the principal already holds. grantee_type defaults to user.

grantee_type
any
required

Grants to one principal.

user_id
string
required

A member's user id, or the end-user id a request is delegated to with X-On-Behalf-Of. May not contain / or whitespace, and may not be ., .., * or team.

Minimum string length: 1
role
enum<string>
required

The role to grant. writer includes reader.

Available options:
writer,
reader

Response

200 - application/json

OK

A role held on a vector store by a principal, or by every member of the store's team.

object
any
required

The object type, which is always 'vector_store.permission'.

vector_store_id
string
required

The ID of the vector store the permission applies to.

grantee_type
enum<string>
required

Who the permission applies to: one principal (user), or every member of the store's team (team).

Available options:
user,
team
user_id
string | null
required

The principal the permission applies to: a member's user id, or the end-user id a request is delegated to with X-On-Behalf-Of. null when the permission applies to the store's team.

role
enum<string>
required

The role held on the store. owner is the store's creator and cannot be granted; writer includes reader.

Available options:
owner,
writer,
reader