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

# Connect CapitalAI to your Smart Link (/introduction/guides/capitalai-smart-links)

import { Step, Steps } from "fumadocs-ui/components/steps";

[CapitalAI](https://capitalbot.ai/) can send a fan from a Web conversation through an OnlyFansAPI Smart Link. After OnlyFansAPI confirms that the fan subscribed through the link, it can retrieve the CapitalAI conversation summary and append it to the fan's existing OnlyFans notes.

<Callout>
  **What you'll need**

  * A CapitalAI Web flow
  * A Smart Link for the OnlyFans account receiving the subscriber
  * Permission to edit the Smart Link's **Auto-Fill Fan Notes** template
</Callout>

## How the connection works

CapitalAI adds these parameters when it sends a fan to your Smart Link:

* `ecid`: the numeric CapitalAI conversation ID
* `ca=capital`: the exact marker that selects the CapitalAI summary flow

CapitalAI also forwards the original advertising parameters, including `fbclid`, `ttclid`, and UTM fields. Keep those values unchanged. For example, Instagram traffic should keep its original `utm_source`; do not replace it with a CapitalAI value.

<Callout type="warn" title="The CapitalAI marker is not authentication">
  `ca=capital` is a routing marker. It does not prove that a visitor came from CapitalAI. OnlyFansAPI authenticates its server-to-server summary request with a partner credential that customers do not configure or receive.
</Callout>

## Configure the integration

<Steps>
  <Step>
    ### Create or open a Smart Link

    Log into the [OnlyFans API Dashboard](https://app.onlyfansapi.com), open **Smart Links → Links**, and create a Smart Link for the OnlyFans account receiving the subscriber. You can also edit an existing link.

    Copy the generated URL:

    ```text
    https://trk.of-traffic.com/go/YOUR_SMART_LINK_ID
    ```
  </Step>

  <Step>
    ### Add the CapitalAI summary to fan notes

    In the Smart Link editor, find **Auto-Fill Fan Notes** and insert `{capital_ai_summary}` where the summary should appear. You can use it alone or combine it with other variables:

    ```text
    Country: {country} | {capital_ai_summary}
    ```

    The completed variable has this shape:

    ```text
    Capital (Snap): Asked about custom content and prefers evening chats.
    ```

    Save the Smart Link. The template can contain at most 200 characters. The generated note and any existing OnlyFans note share the same 200-character limit.
  </Step>

  <Step>
    ### Use the Smart Link in CapitalAI

    Open the CapitalAI Web flow that sends the fan to OnlyFans. Select the OnlyFansAPI Smart Link if CapitalAI offers it as a destination, or paste the URL copied in Step 1 instead of the direct `onlyfans.com` profile URL.

    CapitalAI adds the conversation-specific `ecid`, the exact `ca=capital` marker, and the original advertising parameters when it sends the visitor. Do not enter a fixed `ecid`, change `utm_source`, or place a credential in the URL.
  </Step>

  <Step>
    ### Verify the final URL

    The request that reaches the Smart Link should have this shape:

    ```text
    https://trk.of-traffic.com/go/YOUR_SMART_LINK_ID?utm_source=ig&utm_campaign=CAMPAIGN_ID&fbclid=FB_CLICK_ID&ttclid=TT_CLICK_ID&ecid=123456&ca=capital
    ```

    The values above are examples. The required CapitalAI values are a positive numeric `ecid` and exact lowercase `ca=capital`. Original values such as `utm_source=ig` should remain present.
  </Step>

  <Step>
    ### Wait for a confirmed subscriber

    A click alone does not create a fan note. Once OnlyFansAPI confirms the subscriber, it requests the CapitalAI summary and conversation metadata asynchronously.

    CapitalAI may need more conversation history before it can return a useful summary. OnlyFansAPI retries temporary insufficient-history responses, rate limits, connection failures, and server errors with backoff for up to two hours. A conversation with no history or only the opener is a terminal no-note result.

    When a summary is available, OnlyFansAPI appends the completed template without replacing existing notes. Duplicate completed notes are not appended again. If fewer than 20 useful characters remain in OnlyFans' 200-character notes field, the append is skipped.
  </Step>
</Steps>

## Troubleshooting

| Problem                                              | What to check                                                                                                                         |
| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| The CapitalAI summary flow does not start            | Confirm the final URL contains exact lowercase `ca=capital`. Any other value is ignored.                                              |
| `ca=capital` is present, but no summary is requested | Confirm `ecid` is a positive whole number. Missing, zero, negative, decimal, or non-numeric values are invalid.                       |
| The fan subscribed, but no note appears              | Confirm **Auto-Fill Fan Notes** contains exact `{capital_ai_summary}` and that the subscription was attributed to this Smart Link.    |
| CapitalAI reports insufficient conversation history  | Wait for more replies. OnlyFansAPI retries the temporary response within the two-hour window.                                         |
| The conversation has no history or only the opener   | CapitalAI returns no usable summary, so OnlyFansAPI leaves the note unchanged.                                                        |
| The note is delayed                                  | CapitalAI may be unavailable or rate-limited. OnlyFansAPI retries temporary failures with backoff for up to two hours.                |
| The fan already has a long note                      | Existing text is not overwritten. The append is shortened to the remaining space or skipped when fewer than 20 useful characters fit. |
| The same conversion was delivered again              | Retrieval work and completed note content are deduplicated, so the same note should not be appended twice.                            |

`{capital_ai_summary}` is a reserved variable. A visitor cannot spoof it by adding a query parameter with the same name.