# Management API

Manage projects, member access, invitations and API/RPC keys within a workspace. A workspace-scoped management key authorizes only the operations allowed by its permissions; management-key administration requires a user session in the Dashboard.
See the [Management overview](https://docs.vilna.io/apis/mgmt) for access boundaries, [permissions](https://docs.vilna.io/apis/permissions) for grants, and [idempotency](https://docs.vilna.io/apis/idempotency) for mutation retries.

Version: 1.3.0
License: Apache 2.0

## Servers

Vilna Management API.
```
https://mgmt.vilna.io/v1
```

## Security

### Auth

Management key (`vilna_mgt_...`). Send it in the `X-Api-Key` header on every request. The key must hold all scopes listed on the operation; a missing scope yields `403 Forbidden`. API keys (`vilna_api_...`) and RPC keys (`vilna_rpc_...`) are not accepted here; they authenticate the public API and RPC gateways respectively.

Type: apiKey
In: header
Name: X-Api-Key

## Download OpenAPI description

 - [Management API](https://docs.vilna.io/_bundle/@l10n/ru/apis/mgmt/api.yaml)

## workspace

 - [GET /workspaces/{workspace_id}/limits](https://docs.vilna.io/ru/apis/mgmt/api/workspace/get-workspace-limits.md): Get resource usage and effective limits. Fields are omitted when access is not permitted.
## Members

 - [GET /workspaces/{workspace_id}/members](https://docs.vilna.io/ru/apis/mgmt/api/member/list-workspace-members.md): Return workspace members with their roles.
 - [PATCH /workspaces/{workspace_id}/members/{user_id}](https://docs.vilna.io/ru/apis/mgmt/api/member/patch-workspace-member.md): Update a member's workspace role.
 - [DELETE /workspaces/{workspace_id}/members/{user_id}](https://docs.vilna.io/ru/apis/mgmt/api/member/remove-workspace-member.md): Remove a member from the workspace and revoke all of their project grants.
## Invitations

 - [GET /workspaces/{workspace_id}/invitations](https://docs.vilna.io/ru/apis/mgmt/api/invitation/list-workspace-invitations.md): Return workspace invitations in any lifecycle status.
 - [POST /workspaces/{workspace_id}/invitations](https://docs.vilna.io/ru/apis/mgmt/api/invitation/create-workspace-invitation.md): Create an invitation by email with an optional bundle of project grants. Idempotent: returns `200 OK` if a pending invitation for the same recipient already exists.
 - [POST /workspaces/{workspace_id}/invitations/{invitation_id}/actions/revoke](https://docs.vilna.io/ru/apis/mgmt/api/invitation/revoke-workspace-invitation.md): Revoke a pending invitation. Invitations in terminal status cannot be revoked.
## Activity Log

 - [GET /workspaces/{workspace_id}/logs](https://docs.vilna.io/ru/apis/mgmt/api/log/list-workspace-logs.md): Return workspace activity events in reverse-chronological order.
## Projects

 - [GET /workspaces/{workspace_id}/projects/{project_id}/limits](https://docs.vilna.io/ru/apis/mgmt/api/project/get-workspace-project-limits.md): Get API key usage and the effective limit for this project.
 - [GET /workspaces/{workspace_id}/projects](https://docs.vilna.io/ru/apis/mgmt/api/project/list-workspace-projects.md): Return projects within a workspace. Workspace admins receive all projects; members receive only projects where they hold an explicit grant.
 - [POST /workspaces/{workspace_id}/projects](https://docs.vilna.io/ru/apis/mgmt/api/project/create-workspace-project.md): Create a new project in the workspace.
 - [GET /workspaces/{workspace_id}/projects/{project_id}](https://docs.vilna.io/ru/apis/mgmt/api/project/get-workspace-project.md): Return a project by ID.
 - [PATCH /workspaces/{workspace_id}/projects/{project_id}](https://docs.vilna.io/ru/apis/mgmt/api/project/patch-workspace-project.md): Update a project's name.
 - [DELETE /workspaces/{workspace_id}/projects/{project_id}](https://docs.vilna.io/ru/apis/mgmt/api/project/delete-workspace-project.md): Delete the project and its dependent grants, releasing its quota before returning 204. Cleanup in external services continues asynchronously; 204 does not mean all cleanup has completed.
## Project Members

 - [GET /workspaces/{workspace_id}/projects/{project_id}/members](https://docs.vilna.io/ru/apis/mgmt/api/project_member/list-workspace-project-members.md): Return explicit project grants (editors and viewers). Workspace admins have implicit access and are not listed.
 - [POST /workspaces/{workspace_id}/projects/{project_id}/members](https://docs.vilna.io/ru/apis/mgmt/api/project_member/assign-workspace-project-member.md): Grant a workspace member project-level access (`editor` or `viewer`). Idempotent: returns `200 OK` if the grant already exists with the same role, `409 Conflict` if it exists with a different role.
 - [PATCH /workspaces/{workspace_id}/projects/{project_id}/members/{user_id}](https://docs.vilna.io/ru/apis/mgmt/api/project_member/patch-workspace-project-member.md): Update a member's project role.
 - [DELETE /workspaces/{workspace_id}/projects/{project_id}/members/{user_id}](https://docs.vilna.io/ru/apis/mgmt/api/project_member/remove-workspace-project-member.md): Remove a project grant. The member remains in the workspace.
## RPC

 - [GET /workspaces/{workspace_id}/rpc](https://docs.vilna.io/ru/apis/mgmt/api/rpc/get-workspace-rpc.md): Return the workspace RPC singleton configuration. Provisioned automatically with every workspace and always available to its members.
## API Keys

 - [GET /workspaces/{workspace_id}/projects/{project_id}/keys](https://docs.vilna.io/ru/apis/mgmt/api/api_key/list-workspace-project-keys.md): Return project API keys.
 - [POST /workspaces/{workspace_id}/projects/{project_id}/keys](https://docs.vilna.io/ru/apis/mgmt/api/api_key/create-workspace-project-key.md): Create a new project API key. The raw secret can be replayed with the same intent for 60 seconds from successful creation, subject to current access and key state. Retries do not extend this window.
 - [GET /workspaces/{workspace_id}/projects/{project_id}/keys/{key_id}](https://docs.vilna.io/ru/apis/mgmt/api/api_key/get-workspace-project-key.md): Return a project API key by ID.
 - [POST /workspaces/{workspace_id}/projects/{project_id}/keys/{key_id}/actions/revoke](https://docs.vilna.io/ru/apis/mgmt/api/api_key/revoke-workspace-project-key.md): Revoke a project API key. Once revoked, the key can no longer be used for authentication.
## RPC Keys

 - [GET /workspaces/{workspace_id}/rpc/keys](https://docs.vilna.io/ru/apis/mgmt/api/rpc_key/list-workspace-rpc-keys.md): Return workspace RPC keys.
 - [POST /workspaces/{workspace_id}/rpc/keys](https://docs.vilna.io/ru/apis/mgmt/api/rpc_key/create-workspace-rpc-key.md): Create a new workspace RPC key. The raw secret can be replayed with the same intent for 60 seconds from successful creation, subject to current access and key state. Retries do not extend this window.
 - [GET /workspaces/{workspace_id}/rpc/keys/{key_id}](https://docs.vilna.io/ru/apis/mgmt/api/rpc_key/get-workspace-rpc-key.md): Return a workspace RPC key by ID.
 - [POST /workspaces/{workspace_id}/rpc/keys/{key_id}/actions/revoke](https://docs.vilna.io/ru/apis/mgmt/api/rpc_key/revoke-workspace-rpc-key.md): Revoke a workspace RPC key. Once revoked, the key can no longer be used for authentication.
## Version

 - [GET /version](https://docs.vilna.io/ru/apis/mgmt/api/version/get-version.md): Return the current API version.
