v1

latestOpenAPI 3.0.22026-07-24800528.1 KB
Leads

Update a lead

Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

patch/v2/leads/{lead_key}

Path parameters

lead_keystring required

A unique key that identifies this lead. Can be either the lead's external_key or key value.

Request body

amountinteger nullable

Lead amount in cents

approvedboolean nullable

Used to indicate whether this lead has been approved to move past the closed stage

customer_keystring nullable

Unique identifier to be used for Customer after a lead has been converted

external_keystring

A unique key that identifies this lead in an external system. This key must be unique across all leads in your account. This key is used to identify leads when they are updated or deleted. Often provided as an email, but can be any unique string.

field_dataobject nullable
group_keystring nullable
mold_keystring nullable
partner_keystring

The unique key of the partner who submitted this lead

status'open' | 'closed' | 'dead' | 'closed won' | 'closed lost'

Current status of this lead. Must be one of either 'open', 'closed', 'dead', 'closed won', or 'closed lost. Note that open = New, closed = Qualified and dead = Unqualified default stages in the PartnerStack dashboard.'

Example request

{
  "amount": 25000,
  "customer_key": "cus_1234",
  "external_key": "361ba21c-ca87-46b0-baa4-97ca16e55059",
  "fields": [
    {
      "field_key": "field_fjkdlrh9i32nfew",
      "name": "Company Address"
    }
  ],
  "meta": {
    "company": "Lockman Olson",
    "email": "River96@example.com",
    "first_name": "River",
    "last_name": "Tremblay"
  },
  "partner_key": "bertramgilfoyle",
  "stage_data": {
    "api_name": "closed won",
    "name": "Closed Won"
  },
  "status": "open"
}

Response

Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

messagestring required
statusinteger required

Example response

{
  "data": {
    "created_at": 1574181282399,
    "key": "co_a80cb515fe",
    "updated_at": 1574181282399,
    "amount": 25000,
    "customer_key": "cus_1234",
    "external_key": "361ba21c-ca87-46b0-baa4-97ca16e55059",
    "fields": [
      {
        "field_key": "field_fjkdlrh9i32nfew",
        "name": "Company Address"
      }
    ],
    "meta": {
      "company": "Lockman Olson",
      "email": "River96@example.com",
      "first_name": "River",
      "last_name": "Tremblay"
    },
    "partner_key": "bertramgilfoyle",
    "stage_data": {
      "api_name": "closed won",
      "name": "Closed Won"
    },
    "status": "open"
  }
}