Skip to main content
POST
/
v2
/
workspace
/
apikeyconfig
/
get
Get API Key Config
curl --request POST \
  --url https://api.velt.dev/v2/workspace/apikeyconfig/get \
  --header 'x-velt-api-key: <x-velt-api-key>' \
  --header 'x-velt-auth-token: <x-velt-auth-token>'
{
  "result": {
    "status": "success",
    "message": "API key metadata retrieved successfully.",
    "data": {
      "ownerEmail": "owner@example.com",
      "planInfo": {
        "type": "sdk test"
      },
      "defaultDocumentAccessType": "public",
      "isPrivateCommentsEnabled": false,
      "requireJwtToken": false,
      "requireAutoOrgUser": false,
      "aiModelsConfig": {
        "openai": {
          "displayText": "sk-...XyZ"
        }
      }
    }
  }
}
Use this API to retrieve the app configuration for a workspace API key: owner email, plan info, default document access type, the private-comments flag, the JWT / auto-org-user toggles, and the configured AI model keys (masked).
This endpoint uses API-key-level auth: pass x-velt-api-key and x-velt-auth-token as headers. You can obtain these from the Get Auth Tokens endpoint.

Endpoint

POST https://api.velt.dev/v2/workspace/apikeyconfig/get

Headers

x-velt-api-key
string
required
Your API key.
x-velt-auth-token
string
required

Body

This endpoint does not require a request body.

Example Request

{
  "data": {}
}

Example Response

Success Response

{
  "result": {
    "status": "success",
    "message": "API key metadata retrieved successfully.",
    "data": {
      "ownerEmail": "owner@example.com",
      "planInfo": {
        "type": "sdk test"
      },
      "defaultDocumentAccessType": "public",
      "isPrivateCommentsEnabled": false,
      "requireJwtToken": false,
      "requireAutoOrgUser": false,
      "aiModelsConfig": {
        "openai": {
          "displayText": "sk-...XyZ"
        }
      }
    }
  }
}
aiModelsConfig is a map of provider -> { displayText } and is masked — the raw or encrypted AI model key is never returned. It is absent when no AI keys are configured. defaultDocumentAccessType is one of public, restricted, or organizationPrivate (defaults to public).

Failure Response

{
  "error": {
    "status": "PERMISSION_DENIED",
    "message": "Invalid API key."
  }
}
{
  "result": {
    "status": "success",
    "message": "API key metadata retrieved successfully.",
    "data": {
      "ownerEmail": "owner@example.com",
      "planInfo": {
        "type": "sdk test"
      },
      "defaultDocumentAccessType": "public",
      "isPrivateCommentsEnabled": false,
      "requireJwtToken": false,
      "requireAutoOrgUser": false,
      "aiModelsConfig": {
        "openai": {
          "displayText": "sk-...XyZ"
        }
      }
    }
  }
}