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

# Get Lead Portal URL

> Fetch a lead's portal URL

This endpoint fetches a lead's portal URL by its `leadId`.

## Path Parameters

<ParamField path="leadId" type="string" required>
  The unique identifier of the lead
</ParamField>

## Response

<ResponseField name="portalUrl" type="string">
  Lead's portal URL
</ResponseField>

<ResponseField name="expiresAt" type="string" nullable>
  ISO 8601 timestamp when the link expires, or `null` when the link does not
  expire (custom external link or portal URL template)
</ResponseField>

<RequestExample>
  ```javascript Node.js theme={null}
  const options = {
    method: "GET",
    headers: {
      "x-api-key": "<your-api-key>",
    },
  };

  fetch(
    "https://api-v2.getomni.ai/api/v1/leads/b3f1c2d4-5e6a-7b8c-9d0e-1f2a3b4c5d6e/portal-url",
    options,
  )
    .then((response) => response.json())
    .then((response) => console.log(response))
    .catch((err) => console.error(err));
  ```

  ```python Python theme={null}
  import requests

  lead_id = "b3f1c2d4-5e6a-7b8c-9d0e-1f2a3b4c5d6e"
  url = f"https://api-v2.getomni.ai/api/v1/leads/{lead_id}/portal-url"
  headers = {
      "x-api-key": "<your-api-key>",
  }

  response = requests.get(url, headers=headers)
  print(response.json())
  ```

  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api-v2.getomni.ai/api/v1/leads/b3f1c2d4-5e6a-7b8c-9d0e-1f2a3b4c5d6e/portal-url' \
    --header 'x-api-key: <your-api-key>'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "expiresAt": "2026-07-02T02:00:00.000Z",
    "portalUrl": "https://portal.acme.com/?token=eyJhbGciOi...",
    "success": true
  }
  ```
</ResponseExample>
