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

# Shared Links

> Share setup links with end-users via loadSharedFlow().

## Sharing Link Custom Domain

<Check>**Enterprise tier only**</Check>

Enterprise customers can replace the default `app.goentri.com` base URL in sharing links with a custom, branded domain. This creates a seamless white-labeled experience for the end users receiving and completing the shared flow.

**Default sharing link:**

```
https://app.goentri.com/share/:shareId
```

**Custom domain sharing link:**

```
https://domains.yourbrand.com/share/:shareId
```

The custom domain serves the Entri sharing link experience transparently, so the path structure and behavior remain identical to the default.

### Configuration

Configure your sharing link custom domain in the Entri Dashboard:

1. Go to **Account Settings → Application Settings**
2. Locate the **Sharing link URL** field
3. Enter your desired base URL (e.g., `https://domains.yourbrand.com`)
4. Save your changes

<Note>
  Your custom domain must be set up to point to Entri. The required DNS configuration depends on whether you're using a subdomain or a root domain:

  * **Subdomain** (e.g., `domains.yourbrand.com`): add a `CNAME` record pointing to `sharing.goentri.com`.
  * **Root domain** (e.g., `yourbrand.com`): add the following `A` records (no `AAAA` records are required):
    * `15.197.212.204`
    * `3.33.229.73`

  Contact your account manager if you need assistance with the DNS configuration.
</Note>

Once configured, the `sharing_link_url` setting is automatically applied to all sharing links generated for that application — no code changes are needed on the frontend.

### Effect on the Sharing Links API

When a custom domain is set, the `link` field returned by the [Sharing Links API](#sharing-links-api) will automatically reflect your custom domain instead of `app.goentri.com`:

```json theme={null}
{
    "link": "https://domains.yourbrand.com/share/dd339cf05f2646539e79251f8e62f0c5",
    "job_id": "9c128fe4-63cd-4ec4-9ae8-8a9d06c0e6de"
}
```

### Using with `entri.loadSharedFlow()`

Pass the full custom-domain URL directly to `entri.loadSharedFlow()` — no additional configuration is needed:

```js theme={null}
entri.loadSharedFlow("https://domains.yourbrand.com/share/dd339cf05f2646539e79251f8e62f0c5");
```

## Webhook Notifications

When your users go through an Entri flow, Entri sends webhook notifications to keep your backend informed about flow progress and outcomes. To learn more about webhook configuration and delivery, visit our [webhook documentation page](/webhooks-overview).

### Correlating Shared / Derived Flows

Some platforms allow users to **share** a flow (for example, sending a link to another person). When that shared link is used, the resulting run is considered a **derived flow**.

To help you correlate the derived flow back to the original one, Entri supports propagating an `origin_flow_id` value into webhook events.

#### How it works

* If a flow is initialized with `origin_flow_id` in its configuration, Entri stores that value on the created flow.
* For **every webhook event** emitted for that flow, Entri includes the stored value as `origin_flow_id`.
* If `sharedFlowId` was **not** provided when the flow was created, webhook payloads will **not** include `origin_flow_id`.

Notes:

* `origin_flow_id` is propagated **as-is** (no lookup, validation, or mutation).
* This is a **non-breaking** change: existing webhook fields remain unchanged, and `origin_flow_id` is optional.

#### Webhook payload example

```json theme={null}
{
  "event": "domain.purchased",
  "flowId": "flow_123",
  "origin_flow_id": "flow_abc",
  "data": {
    "domain": "example.com",
    "status": "registered"
  }
}
```

### Shared flows and sharing link domains

When a user completes an Entri flow that was initiated via a [sharing link](#sharing-links-api), Entri fires webhook events just like any standard flow. A few things to keep in mind:

* The `job_id` returned when the sharing link was created is the identifier used to correlate all webhook events for that flow. It remains consistent regardless of whether a [custom sharing link domain](#sharing-link-custom-domain) is configured — the domain only affects the URL of the link itself, not the webhook payload.
* To retrieve the last webhook event for a shared flow, use the [Get last webhook by job ID](/webhooks-overview#get-last-webhook-by-job-id) endpoint with the `job_id`.
* If the flow was initiated with a `sharedFlowId`, webhook events for the derived flow will include an `origin_flow_id` field. See [Correlating Shared / Derived Flows](#correlating-shared--derived-flows) for details.

## Sharing links API

The **Sharing Links API** allows users to securely hand off an ongoing Entri flow, such as Connect or Sell, to another person for completion. This is particularly useful when the current user does not have the required DNS credentials (in Entri Connect) or payment information (in Entri Sell). By generating a sharing link, you can let a colleague, client, or administrator pick up exactly where the flow was left off and complete the process without starting over.

For Enterprise plan integrations, the sharing link URL can be white-labeled to use your own custom domain. See [Sharing Link Custom Domain](#sharing-link-custom-domain) for configuration details.

### Entri Connect

```
POST https://api.goentri.com/sharing/connect
Header "Authorization: [JWT authorization]"
Header "applicationId: [yourApplicationID]"
```

#### Request body

```JSON JSON theme={null}
{
   "applicationId":"yourApplicationID",
   "config":{
      "prefilledDomain": "mydomain.com",
      "dnsRecords":[
         {
            "type":"CNAME",
            "host":"www",
            "value":"test.com",
            "ttl":300
         }
      ]
   }
}
//All the rest of possible configuration options, see https://developers.entri.com/connect/configuration for more details.
```

#### Successful response (200 status)

```JSON JSON theme={null}
{
    // If a custom Sharing Link domain is configured (Enterprise), "link" will reflect that domain.
    // See: https://developers.entri.com/connect/shared-links#sharing-link-custom-domain
    "link": "https://app.goentri.com/share/dd339cf05f2646539e79251f8e62f0c5",
    "job_id": "9c128fe4-63cd-4ec4-9ae8-8a9d06c0e6de"
}
```
