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

# Create Connect URL

> Create a hosted Connect URL for a linked account.

Create a hosted Connect URL. The request body is stashed (keyed by the session token, with a 3-day TTL) and a URL of the form `{app_url}/connect/{token}` is returned. Redirect your user there to launch the hosted Connect experience; the hosted page reads your stashed properties back via [Get Hosted Properties](/v3/api-reference/hosted-properties/get-hosted-properties).

Any JSON you put in the body is preserved verbatim — use it to pass context (company name, plan, theming, etc.) to the hosted page.

## Authentication

<ParamField header="Authorization" type="string" required>
  Session token for the linked account. This endpoint accepts **session-token auth only** — an API key is rejected.

  **Format:** `Bearer YOUR_SESSION_TOKEN`
</ParamField>

Issue a token with [Generate Session Token](/v3/api-reference/session-tokens/generate-session-token).

## Query Parameters

<ParamField query="linked_account_id" type="string">
  The linked account the hosted page should act on.
</ParamField>

<ParamField query="config_id" type="string">
  Optional config to scope the hosted page to. When set, it is appended to the returned URL as `?config_id=...`.
</ParamField>

## Body Parameters

<ParamField body="body" type="object">
  Arbitrary JSON properties to stash for the hosted page. Returned verbatim by [Get Hosted Properties](/v3/api-reference/hosted-properties/get-hosted-properties).
</ParamField>

## Response

<Tabs>
  <Tab title="200 OK">
    <ResponseField name="hosted_url" type="string">
      The hosted Connect URL to redirect the user to.
    </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, e.g. `INVALID_TOKEN`.</ResponseField>
    <ResponseField name="message" type="string">Human-readable error description.</ResponseField>
  </Tab>
</Tabs>

<ResponseExample>
  ```json 200 theme={null}
  {
    "hosted_url": "https://app.refold.ai/connect/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.REDACTED_TOKEN.SIGNATURE"
  }
  ```

  ```json 401 theme={null}
  {
    "status_code": 401,
    "http_error_type": "UNAUTHORIZED",
    "error": "INVALID_TOKEN",
    "message": "Authorization Token Missing"
  }
  ```
</ResponseExample>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://app.refold.ai/api/v2/public/connect-url" \
    -H "Authorization: Bearer YOUR_SESSION_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "company": "Acme Inc.",
      "plan": "enterprise"
    }'
  ```
</RequestExample>
