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

# Get Config by ID

This API retrieves the config for an application using its unique identifier.

## Request description

#### Headers

<ParamField header="linked_account_id" type="string" required>
  Unique customer identification id. For Eg: [markwood@some\_email.com](mailto:markwood@some_email.com)
</ParamField>

#### Path Parameters

<ParamField path="slug" type="string" required>
  Application Slug. Eg: `docusign`
</ParamField>

<ParamField path="config_id" type="string">
  Id of the config to be fetched. If not provided, `linked_account_id` is considered by default.
</ParamField>

## Response description

<Tabs>
  <Tab title="200">
    <ResponseField name="slug" type="string">
      Application slug
    </ResponseField>

    <ResponseField name="config_id" type="string">
      Unique ID of the created config
    </ResponseField>

    <ResponseField name="fields" type="array">
      Global input fields of an application

      <Expandable title="properties">
        <ResponseField name="id" type="string">
          Unique field id
        </ResponseField>

        <ResponseField name="name" type="string">
          Field display name
        </ResponseField>

        <ResponseField name="field_type" type="string">
          Field input type. Expected values: `text`, `number`, `select`, `map`
        </ResponseField>

        <ResponseField name="options" type="array">
          Options array for the `select` field, or `map` field.

          <Expandable title="properties">
            <ResponseField name="name" type="string">
              Display name
            </ResponseField>

            <ResponseField name="value" type="string">
              Value
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="required" type="boolean">
          If the field is a required field.
        </ResponseField>

        <ResponseField name="labels" type="array">
          Dynamic fields for user to map data to the map options.

          <Expandable title="properties">
            <ResponseField name="name" type="string">
              Display name
            </ResponseField>

            <ResponseField name="value" type="string">
              Value
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="workflows" type="array">
      Published workflows of the application

      <Expandable title="properties">
        <ResponseField name="id" type="string">
          Workflow ID
        </ResponseField>

        <ResponseField name="name" type="string">
          Workflow name
        </ResponseField>

        <ResponseField name="description" type="string">
          Workflow description
        </ResponseField>

        <ResponseField name="enabled" type="boolean">
          If the workflow is enabled for the linked account
        </ResponseField>

        <ResponseField name="fields" type="array">
          Workflow specific input fields

          <Expandable title="properties">
            <ResponseField name="id" type="string">
              Unique field id
            </ResponseField>

            <ResponseField name="name" type="string">
              Field display name
            </ResponseField>

            <ResponseField name="field_type" type="string">
              Field input type. Expected values: `text`, `number`, `select`, `map`
            </ResponseField>

            <ResponseField name="options" type="array">
              Options array for the `select` field, or `map` field.

              <Expandable title="properties">
                <ResponseField name="name" type="string">
                  Display name
                </ResponseField>

                <ResponseField name="value" type="string">
                  Value
                </ResponseField>
              </Expandable>
            </ResponseField>

            <ResponseField name="required" type="boolean">
              If the field is a required field.
            </ResponseField>

            <ResponseField name="labels" type="array">
              Dynamic fields for user to map data to the map options.

              <Expandable title="properties">
                <ResponseField name="name" type="string">
                  Display name
                </ResponseField>

                <ResponseField name="value" type="string">
                  Value
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Tab>

  <Tab title="Error response">
    <ResponseField name="status_code" type="integer">
      System generated status Code
    </ResponseField>

    <ResponseField name="http_error_type" type="string">
      System generated error type
    </ResponseField>

    <ResponseField name="error_code" type="string">
      Specific error code to identify the error
    </ResponseField>

    <ResponseField name="message" type="string">
      Error message
    </ResponseField>

    <ResponseField name="request_id" type="string">
      System generated request id
    </ResponseField>
  </Tab>
</Tabs>

<ResponseExample>
  ```JSON 200 theme={null}
  {
      "slug": "mailerlite",
      "config_id": "config_4",
      "fields": [
          {
              "required": false,
              "id": "646473c7e7b74deee820458f",
              "name": "MailerLite Field Mapping",
              "field_type": "map",
              "options": [
                  {
                      "name": "City",
                      "value": "city"
                  },
                  {
                      "name": "Company",
                      "value": "company"
                  },
                  {
                      "name": "Country",
                      "value": "country"
                  },
                  {
                      "name": "Last name",
                      "value": "last_name"
                  },
                  {
                      "name": "Name",
                      "value": "name"
                  },
                  {
                      "name": "Phone",
                      "value": "phone"
                  }
              ],
              "labels": [
                  {
                      "name": "Customer Name",
                      "value": "name"
                  },
                  {
                      "name": "Customer Last Name",
                      "value": "last_name"
                  },
                  {
                      "name": "Customer's Company",
                      "value": "company"
                  }
              ]
          }
      ],
      "workflows": [
          {
              "id": "649d230c2ce6b9b07b163e61",
              "name": "Add a Subscriber to Mailerlite",
              "description": "",
              "enabled": false,
              "fields": []
          }
      ]
  }
  ```

  ```JSON 400 theme={null}
  {
      "status_code": 400,
      "http_error_type": "BAD_REQUEST",
      "error_code": "INVALID_LINKED_ACCOUNT_ID",
      "message": "linked_account_id is required",
      "request_id": "fd718913-bc5a-40ec-9a90-0cebe0b26371"
  }
  ```

  ```JSON 401 theme={null}
  {
      "status_code": 401,
      "http_error_type": "UNAUTHORIZED",
      "error_code": "SERVER_ERROR",
      "message": "Invalid Credentials"
      "request_id": "89bd1675-a826-46cb-9210-6cb2ae169f67"
  }
  ```

  ```JSON 500 theme={null}
  {
      "status_code": 500,
      "http_error_type": "INTERNAL_SERVER_ERROR",
      "error_code": "SERVER_ERROR",
      "message": "Application with id 3asdasdasd768768asd does not exist for org Cobalt or is not enabled",
      "request_id": "fd718913-bc5a-40ec-9a90-0cebe0b26371"
  }
  ```
</ResponseExample>
