> ## Documentation Index
> Fetch the complete documentation index at: https://velt.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get API Key Config

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).

<Info>
  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](/api-reference/rest-apis/v2/workspace/authtokens-get) endpoint.
</Info>

# Endpoint

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

# Headers

<ParamField header="x-velt-api-key" type="string" required>
  Your API key.
</ParamField>

<ParamField header="x-velt-auth-token" type="string" required>
  Your [Auth Token](/security/auth-tokens).
</ParamField>

# Body

This endpoint does not require a request body.

# Example Request

```JSON theme={null}
{
  "data": {}
}
```

# Example Response

#### Success Response

```JSON theme={null}
{
  "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"
        }
      }
    }
  }
}
```

<Note>
  `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`).
</Note>

#### Failure Response

```JSON theme={null}
{
  "error": {
    "status": "PERMISSION_DENIED",
    "message": "Invalid API key."
  }
}
```

<ResponseExample>
  ```js theme={null}
  {
    "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"
          }
        }
      }
    }
  }
  ```
</ResponseExample>
