> ## 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 Application

> Retrieve details of a specific application by its slug.

Retrieve detailed information about a single application by its slug. Returns the same shape as [List Applications](/v3/api-reference/applications/list-applications), but as a single object — including connection status, authentication requirements, and connected-account details for the linked account.

## Authentication

<ParamField header="x-api-key" type="string" required>
  Your Refold API key. Find it in **Settings → Credentials**.
</ParamField>

<ParamField header="linked_account_id" type="string" required>
  The unique identifier for the linked account.

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

## Path Parameters

<ParamField path="slug" type="string" required>
  The application slug.

  **Example:** `hubspot`, `netsuite`, `slack`
</ParamField>

## Response

<Tabs>
  <Tab title="200 OK">
    Returns the application object. The exact fields differ by `auth_type` — see the two response examples (OAuth vs. key-based).

    <ResponseField name="name" type="string">Application display name.</ResponseField>
    <ResponseField name="icon" type="string">URL to the application's logo.</ResponseField>
    <ResponseField name="description" type="string">Application description.</ResponseField>
    <ResponseField name="auth_type" type="string">Default authentication type: `oauth2` or `keybased`.</ResponseField>
    <ResponseField name="type" type="string">Application type identifier.</ResponseField>
    <ResponseField name="app_id" type="string">Internal application record ID.</ResponseField>
    <ResponseField name="slug" type="string">Application slug.</ResponseField>
    <ResponseField name="tags" type="array">Category tags.</ResponseField>
    <ResponseField name="ecosystem" type="boolean">Whether the app is part of the ecosystem catalog.</ResponseField>

    <ResponseField name="auth_type_options" type="object">
      Supported auth types and their configuration. Each key (`oauth2`, `keybased`) maps to its credential input fields. An app can support more than one.
    </ResponseField>

    <ResponseField name="auth_input_map" type="array">
      Credential input fields for key-based authentication. Populated for apps that support `keybased` auth.

      <Expandable title="properties">
        <ResponseField name="name" type="string">Field name to submit credentials under.</ResponseField>
        <ResponseField name="label" type="string">Display label.</ResponseField>
        <ResponseField name="placeholder" type="string">Placeholder text.</ResponseField>
        <ResponseField name="required" type="boolean">Whether the field is required.</ResponseField>
        <ResponseField name="type" type="string">Input type: `text`, `password`, `number`, `boolean`, `select`.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="connected" type="boolean">
      Whether the linked account has connected this application. Only present when connected.
    </ResponseField>

    <ResponseField name="connected_accounts" type="array">
      The linked account's connections to this app. Only present when connected.

      <Expandable title="properties">
        <ResponseField name="identifier" type="string | object">
          Identifier of the connected account. A string for most apps (e.g. a workspace URL or email), or an object (e.g. for HubSpot) carrying provider-specific fields.
        </ResponseField>

        <ResponseField name="connectedAt" type="string">ISO 8601 timestamp of connection.</ResponseField>
        <ResponseField name="status" type="string">Connection status, e.g. `active`.</ResponseField>
        <ResponseField name="auth_type" type="string">Auth type used for this connection.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="reauth_required" type="boolean">Whether the connection needs re-authentication.</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, e.g. `UNAUTHORIZED`.</ResponseField>
    <ResponseField name="error" type="string">Internal error code.</ResponseField>
    <ResponseField name="message" type="string">Human-readable error description.</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, e.g. `EXTERNAL_API_ERROR`.</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 OAuth (Connected) theme={null}
  {
    "name": "Hubspot",
    "icon": "https://cobalt-app-logos.s3.ap-south-1.amazonaws.com/hubspot/logo.png",
    "description": "HubSpot is your all-in-one stop for all of your marketing software needs.",
    "auth_type": "oauth2",
    "type": "hubspot",
    "app_id": "6992cc7dc124a392c80e9e9c",
    "tags": ["CRM"],
    "ecosystem": false,
    "slug": "hubspot",
    "auth_type_options": { "oauth2": [] },
    "auth_input_map": [],
    "connected": true,
    "connected_accounts": [
      {
        "identifier": {
          "portalId": 12345678,
          "appId": 1234567,
          "userId": 87654321,
          "hub_domain": "your-domain-12345678.com"
        },
        "connectedAt": "2026-04-28T12:13:25.968Z",
        "status": "active",
        "auth_type": "oauth2"
      }
    ],
    "reauth_required": false
  }
  ```

  ```json 200 Key-Based (Available) theme={null}
  {
    "name": "Netsuite",
    "icon": "https://cobalt-app-logos.s3.ap-south-1.amazonaws.com/netsuite/logo.png",
    "description": "NetSuite is a business technology vendor whose portfolio includes applications for ERP, financial management, e-commerce, CRM and professional services automation.",
    "auth_type": "keybased",
    "type": "netsuite",
    "app_id": "6992cc7dc124a392c80e9c1c",
    "tags": ["Accounting"],
    "ecosystem": false,
    "slug": "netsuite",
    "auth_type_options": {
      "keybased": [
        { "name": "account_id", "label": "Account Id", "placeholder": "Please enter the Account Id", "required": true, "type": "text" },
        { "name": "consumer_key", "label": "Consumer Key", "placeholder": "Please enter the Consumer Key", "required": true, "type": "text" },
        { "name": "consumer_secret", "label": "Consumer Secret", "placeholder": "Please enter the Consumer Secret", "required": true, "type": "password" },
        { "name": "token_id", "label": "Token Id", "placeholder": "Please enter the Token Id", "required": true, "type": "text" },
        { "name": "token_secret", "label": "Token Secret", "placeholder": "Please enter the Token Secret", "required": true, "type": "password" }
      ],
      "oauth2": []
    },
    "auth_input_map": [
      { "name": "account_id", "label": "Account Id", "placeholder": "Please enter the Account Id", "required": true, "type": "text" },
      { "name": "consumer_key", "label": "Consumer Key", "placeholder": "Please enter the Consumer Key", "required": true, "type": "text" },
      { "name": "consumer_secret", "label": "Consumer Secret", "placeholder": "Please enter the Consumer Secret", "required": true, "type": "password" },
      { "name": "token_id", "label": "Token Id", "placeholder": "Please enter the Token Id", "required": true, "type": "text" },
      { "name": "token_secret", "label": "Token Secret", "placeholder": "Please enter the Token Secret", "required": true, "type": "password" }
    ],
    "reauth_required": false
  }
  ```

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

  ```json 404 theme={null}
  {
    "status_code": 404,
    "http_error_type": "EXTERNAL_API_ERROR",
    "error": "EXTERNAL_API_FAILURE",
    "message": "Application with app_type 'test-app' not found for org 6500a1b2c3d4e5f6a7b8c9d0"
  }
  ```
</ResponseExample>

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

## Example: Check connection status

```javascript theme={null}
async function getApplication(slug, linkedAccountId, apiKey) {
  const response = await fetch(
    `https://app.refold.ai/api/v2/public/application/${slug}`,
    {
      headers: {
        'x-api-key': apiKey,
        'linked_account_id': linkedAccountId
      }
    }
  );

  if (!response.ok) {
    const error = await response.json();
    throw new Error(error.message);
  }

  return response.json();
}

// Usage
const app = await getApplication('YOUR_APP_SLUG', 'YOUR_LINKED_ACCOUNT_ID', 'YOUR_API_KEY');

if (app.connected) {
  console.log(`Connected at: ${app.connected_accounts[0].connectedAt}`);
} else {
  console.log(`${app.name} is not connected`);
}

if (app.reauth_required) {
  console.log('Warning: re-authentication required');
}
```

## Example: Build an auth form for key-based apps

```javascript theme={null}
async function getAuthFields(slug, linkedAccountId, apiKey) {
  const app = await getApplication(slug, linkedAccountId, apiKey);

  if (app.auth_type !== 'keybased') {
    return { type: 'oauth', app };
  }

  return {
    type: 'keybased',
    app,
    fields: (app.auth_input_map || []).map(field => ({
      name: field.name,
      label: field.label,
      placeholder: field.placeholder,
      required: field.required,
      inputType: field.type
    }))
  };
}

const authInfo = await getAuthFields('YOUR_APP_SLUG', 'YOUR_LINKED_ACCOUNT_ID', 'YOUR_API_KEY');
if (authInfo.type === 'keybased') {
  authInfo.fields.forEach(f => console.log(`- ${f.label} (${f.required ? 'required' : 'optional'})`));
}
```
