v1

latestOpenAPI 3.0.32026-08-0615026.5 KB
Leads

Upsert (update or create) a single lead.

This endpoint is used to upsert a single lead.

The "values" object requires at least one of the following fields, otherwise it will throw an error:

  • first_name
  • email
  • company_name
  • company_domain
  • linkedin_profile_url
post/api/external/v1/leads/upsert-lead

Request body

fromstring nullable required

The service that is sending the lead, use your own company/service name please.

campaign_idinteger required

The campaign ID to add the lead to.

callback_urlstring nullable

Must be a valid URL.

is_generate_ai_analysisboolean nullable
lead_idinteger nullable

The GenPage Lead ID for updating existing leads.

genpage_urlstring nullable

The GenPage URL for updating existing leads.

valuesobject nullable required

Object containing key/value pairs with the lead data. You can send any key/value (value can be a string or a number) pairs that you want to add to the lead.

Example request

{
  "from": "MyCompanyName",
  "campaign_id": 1,
  "callback_url": "http://bailey.com/",
  "is_generate_ai_analysis": true,
  "lead_id": 16,
  "genpage_url": "https://myworkspace.genpa.ge/aws-john",
  "values": {
    "first_name": "John",
    "email": "john@aws.com",
    "company_name": "Amazon Web Services",
    "linkedin_profile_url": "https://www.linkedin.com/in/john-doe-1234567890"
  }
}

Response

genpage_urlstring

Example response

{
  "genpage_url": "https://myworkspace.genpa.ge/microsoft-john"
}