Skip to main content
GET
/
leads
/
{id}
JavaScript
import Whop from '@whop/sdk';

const client = new Whop({
  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});

const lead = await client.leads.retrieve('lead_xxxxxxxxxxxxx');

console.log(lead.id);
{
  "id": "lead_xxxxxxxxxxxxx",
  "created_at": "2023-12-01T05:00:00.401Z",
  "updated_at": "2023-12-01T05:00:00.401Z",
  "referrer": "<string>",
  "metadata": {},
  "user": {
    "id": "user_xxxxxxxxxxxxx",
    "email": "[email protected]",
    "name": "John Doe",
    "username": "johndoe42"
  },
  "product": {
    "id": "prod_xxxxxxxxxxxxx",
    "title": "<string>"
  },
  "member": {
    "id": "<string>"
  }
}

Authorizations

Authorization
string
header
required

The app API key from an app from the /dashboard/developer page

Path Parameters

id
string
required

The ID of the lead

Example:

"lead_xxxxxxxxxxxxx"

Response

A successful response

An object representing a lead (someone who is interested in a whop).

id
string
required

The ID of the lead.

Example:

"lead_xxxxxxxxxxxxx"

created_at
string<date-time>
required

The timestamp of when the lead was created.

Example:

"2023-12-01T05:00:00.401Z"

updated_at
string<date-time>
required

The timestamp of when the lead was last updated.

Example:

"2023-12-01T05:00:00.401Z"

referrer
string | null
required

The referrer URL that brought this lead.

metadata
object
required

Custom metadata for the lead.

user
object
required

The user who is the lead.

product
object
required

The access pass the lead is interested in, if available.

member
object
required

The converted member, if any.