> ## 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 All Config Fields

> Get all configurable fields and workflows for an app's config.

Return the configured fields and workflows for an app's config on a linked account. This is a `POST` because field datasources may accept a payload when resolving options. Use it to render a configuration UI for the connected app.

## Authentication

This endpoint is scoped to a linked account, so it accepts **either** authentication method.

**Option 1 — API key**

<ParamField header="x-api-key" type="string">Your Refold API key.</ParamField>
<ParamField header="linked_account_id" type="string">The linked account whose config to read.</ParamField>

**Option 2 — Session token**

<ParamField header="Authorization" type="string">Session token. **Format:** `Bearer YOUR_SESSION_TOKEN`</ParamField>

## Headers

<ParamField header="slug" type="string" required>
  The app slug whose config to read.

  **Example:** `hubspot`
</ParamField>

## Response

<Tabs>
  <Tab title="200 OK">
    <ResponseField name="slug" type="string">The app slug.</ResponseField>

    <ResponseField name="fields" type="array">
      Configurable fields.

      <Expandable title="properties">
        <ResponseField name="id" type="string">Field ID.</ResponseField>
        <ResponseField name="name" type="string">Field label.</ResponseField>
        <ResponseField name="field_type" type="string">Type: `text`, `number`, `select`, `date`, `email`, `json`, `map`, `map_v2`, …</ResponseField>
        <ResponseField name="required" type="boolean">Whether the field is required.</ResponseField>
        <ResponseField name="multiple" type="boolean">Whether multiple values are allowed.</ResponseField>
        <ResponseField name="options" type="array">Available options for `select` fields.</ResponseField>
        <ResponseField name="defaultValue" type="any">Default value.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="workflows" type="array">Workflows available in this config.</ResponseField>
    <ResponseField name="field_errors" type="array">Any errors resolving field datasources.</ResponseField>
  </Tab>

  <Tab title="401 Unauthorized">
    <ResponseField name="status_code" type="integer">HTTP status code.</ResponseField>
    <ResponseField name="http_error_type" type="string">Error category.</ResponseField>
    <ResponseField name="error" type="string">Internal error code.</ResponseField>
    <ResponseField name="message" type="string">Human-readable error description.</ResponseField>
  </Tab>
</Tabs>

<ResponseExample>
  ```json 200 theme={null}
  {
    "slug": "hubspot",
    "field_errors": [],
    "fields": [
      {
        "id": "699fec7a5bd27ed2af7243ad",
        "name": "Select",
        "field_type": "select",
        "required": false,
        "multiple": true,
        "hidden": false,
        "options": [
          { "name": "A", "value": "A" },
          { "name": "B", "value": "B" },
          { "name": "C", "value": "C" }
        ],
        "defaultValue": ""
      }
    ],
    "workflows": []
  }
  ```

  ```json 401 theme={null}
  {
    "status_code": 401,
    "http_error_type": "UNAUTHORIZED",
    "error": "SERVER_ERROR",
    "message": "Invalid Credentials"
  }
  ```
</ResponseExample>

<RequestExample>
  ```bash cURL (API key) theme={null}
  curl -X POST "https://app.refold.ai/api/v2/public/config/field" \
    -H "x-api-key: YOUR_API_KEY" \
    -H "linked_account_id: YOUR_LINKED_ACCOUNT_ID" \
    -H "slug: {slug}" \
    -H "Content-Type: application/json" \
    -d '{}'
  ```

  ```bash cURL (session token) theme={null}
  curl -X POST "https://app.refold.ai/api/v2/public/config/field" \
    -H "Authorization: Bearer YOUR_SESSION_TOKEN" \
    -H "slug: {slug}" \
    -H "Content-Type: application/json" \
    -d '{}'
  ```
</RequestExample>
