Skip to main content
GET
/
api
/
v1
/
leads
/
{leadId}
/
portal-url
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));
{
  "expiresAt": "2026-07-02T02:00:00.000Z",
  "portalUrl": "https://portal.acme.com/?token=eyJhbGciOi...",
  "success": true
}
This endpoint fetches a lead’s portal URL by its leadId.

Path Parameters

leadId
string
required
The unique identifier of the lead

Response

portalUrl
string
Lead’s portal URL
expiresAt
string
ISO 8601 timestamp when the link expires, or null when the link does not expire (custom external link or portal URL template)
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));
{
  "expiresAt": "2026-07-02T02:00:00.000Z",
  "portalUrl": "https://portal.acme.com/?token=eyJhbGciOi...",
  "success": true
}