> ## Documentation Index
> Fetch the complete documentation index at: https://cobalt-55-abhishek.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Variable Definition

> Get an environment-variable definition by ID.

Get a single environment-variable definition by its ID. The definition is returned wrapped in a `definition` object.

## Authentication

Definitions are org-level, so this endpoint uses API-key auth.

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

## Path Parameters

<ParamField path="id" type="string" required>The definition ID.</ParamField>

## Response

<Tabs>
  <Tab title="200 OK">
    <ResponseField name="definition" type="object">
      The variable definition.

      <Expandable title="properties">
        <ResponseField name="_id" type="string">Definition ID.</ResponseField>
        <ResponseField name="name" type="string">Variable name.</ResponseField>
        <ResponseField name="scope" type="string">`org`, `linked_account`, or `workflow`.</ResponseField>
        <ResponseField name="var_format" type="string">Value format.</ResponseField>
        <ResponseField name="encrypted" type="boolean">Whether values are stored encrypted.</ResponseField>
      </Expandable>
    </ResponseField>
  </Tab>

  <Tab title="404 Not Found">
    <ResponseField name="status_code" type="integer">HTTP status code.</ResponseField>
    <ResponseField name="http_error_type" type="string">Error category.</ResponseField>
    <ResponseField name="error_code" type="string">Internal error code, e.g. `RESOURCE_NOT_FOUND`.</ResponseField>
    <ResponseField name="message" type="string">Human-readable error description.</ResponseField>
  </Tab>
</Tabs>

<ResponseExample>
  ```json 200 theme={null}
  {
    "definition": {
      "_id": "6a159a9741e63efd0833773f",
      "org_id": "6500a1b2c3d4e5f6a7b8c9d0",
      "name": "API_BASE_URL",
      "description": "Base URL for callbacks",
      "scope": "org",
      "var_format": "string",
      "encrypted": false,
      "created_at": "2026-05-26T13:05:27.782Z",
      "updated_at": "2026-05-26T13:05:27.782Z"
    }
  }
  ```

  ```json 404 theme={null}
  {
    "status_code": 404,
    "http_error_type": "NOT_FOUND",
    "error_code": "RESOURCE_NOT_FOUND",
    "message": "Variable definition not found"
  }
  ```
</ResponseExample>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://app.refold.ai/api/v2/public/env/definitions/{id}" \
    -H "x-api-key: YOUR_API_KEY"
  ```
</RequestExample>
