Skip to content
On this page

REST API authentication

An API key starts with vmx_ and opens the same workspaces its holder opens in the app: all of an account owner's, or every workspace a team member was given. Send it with every request in one of two ways.

X-API-Key header

http
X-API-Key: vmx_...

This is the primary and most explicit option.

Bearer token

http
Authorization: Bearer vmx_...

Both headers are accepted equally. Do not send them together.

Request workspace

Without extra headers, a request works in the key's own workspace. Settings show it next to the key; switch_workspace over MCP moves the key to another. If the key's workspace was closed to you, the request works where you land in the app.

To work in another workspace, send its id:

http
X-Workspace-Id: 184

list_workspaces over the same key returns the ids of the workspaces open to you:

bash
curl https://api.viralmaxing.com/api/mcp \
  -H "X-API-Key: $VIRALMAXING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_workspaces","arguments":{}}}'

A named workspace that is not open to you, is archived, or has an invalid id is refused with 403 and the code workspace_access_denied. The request never falls back to another workspace.

Storage and rotation

  • keep the key in a secret manager or environment variable;
  • create a separate key for each integration;
  • review its last-used date in settings;
  • delete it after a leak, ownership change, or integration shutdown.

Deletion revokes access immediately. A lost key cannot be recovered. Create a replacement and delete the old key.

Access errors

401 means that the key is missing, invalid, expired, or revoked.

403 means the key is valid, but the request cannot be served. The code or type field says why:

  • workspace_access_denied: the workspace in X-Workspace-Id is not open to you;
  • subscription_required: the account has no active plan; for a team member, that is the owner's plan;
  • team_access_required: the owner's plan has no team, so a team member may only read;
  • a code such as team_read_only_forbidden: your team role does not allow the operation.

Read next