# Lead Gen & CRM (SharpSpring)

> Work with Lead Gen & CRM (formerly SharpSpring): find, create, update and delete leads, manage list members, opportunities and accounts, and start workflows when leads, opportunities, accounts or list members are added or change.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/sharpspring

## Actions

### Add lead to list

Add a lead to a list, by its ID or email address. A lead already on the list is left as it is.

**Inputs**

- List (`list_id`, text, required): The list. Pick one, or give its ID.
- Lead ID (`lead_id`, text): The lead's ID. Give this or the email address.
- Email (`email_address`, text): The lead's email address, instead of its ID.

**Outputs**

- `added` (true/false): True if the lead was added
- `already_member` (true/false): True if the lead was on the list already
- `email_address` (text): The lead's email, if it was given by email
- `lead_id` (text): The lead's ID, if it was given by ID
- `list_id` (text): The list's ID

**Example output**

```json
{
  "added": true,
  "already_member": false,
  "email_address": "",
  "lead_id": "548102737922",
  "list_id": "48273"
}
```

### Create account

Create an account: a company or organization your leads and opportunities belong to.

**Inputs**

- Name (`account_name`, text, required): The company or organization's name.
- Owner (`owner_id`, text): The user who owns the account.
- Industry (`industry`, text): The account's industry.
- Phone (`phone`, text): The account's phone.
- Website (`website`, text): The account's website.
- Billing street (`billing_street_address`, text): The account's billing street.
- Billing city (`billing_city`, text): The account's billing city.
- Billing state (`billing_state`, text): The account's billing state.
- Billing postal code (`billing_postal_code`, text): The account's billing postal code.
- Billing country (`billing_country`, text): The account's billing country.
- Shipping street (`shipping_street_address`, text): The account's shipping street.
- Shipping city (`shipping_city`, text): The account's shipping city.
- Shipping state (`shipping_state`, text): The account's shipping state.
- Shipping postal code (`shipping_postal_code`, text): The account's shipping postal code.
- Shipping country (`shipping_country`, text): The account's shipping country.
- Annual revenue (`annual_revenue`, number): The account's annual revenue. At least 0.
- Employees (`number_of_employees`, number): The account's employees. At least 0.
- Year started (`year_started`, number): The account's year started. At least 0.
- Custom fields (`custom_fields`, object): Values for custom fields, each under the field's system name as 'List fields' shows it, such as {"favorite_color_5a0dd86e6e290": "Blue"}.

**Outputs**

- `account_id` (text): The new account's ID
- `created` (true/false): Always true once created

**Example output**

```json
{
  "account_id": "60419",
  "created": true
}
```

### Create lead

Create a lead (a contact) with an email address and any other details, including custom fields.

**Inputs**

- Email (`email_address`, text, required): The lead's email address. A lead with this email must not exist yet.
- First name (`first_name`, text): The lead's first name.
- Last name (`last_name`, text): The lead's last name.
- Company (`company_name`, text): The lead's company.
- Job title (`title`, text): The lead's job title.
- Phone (`phone_number`, text): The lead's phone.
- Mobile phone (`mobile_phone_number`, text): The lead's mobile phone.
- Office phone (`office_phone_number`, text): The lead's office phone.
- Phone extension (`phone_number_extension`, text): The lead's phone extension.
- Fax (`fax_number`, text): The lead's fax.
- Website (`website`, text): The lead's website.
- Industry (`industry`, text): The lead's industry.
- Street (`street`, text): The lead's street.
- City (`city`, text): The lead's city.
- State (`state`, text): The lead's state.
- Postal code (`zipcode`, text): The lead's postal code.
- Country (`country`, text): The lead's country.
- Description (`description`, text): The lead's description.
- Status (`lead_status`, text): Where the lead is in your pipeline. Defaults to unqualified. One of: `unqualified`, `open`, `qualified`, `contact`.
- Email subscription (`subscription`, text): Whether the lead gets your marketing emails. One of: `subscribed`, `unsubscribed`.
- Owner (`owner_id`, text): The user who owns the lead.
- Account (`account_id`, text): The account (company) the lead belongs to.
- Campaign (`campaign_id`, text): The campaign the lead came from.
- Custom fields (`custom_fields`, object): Values for custom fields, each under the field's system name as 'List fields' shows it, such as {"favorite_color_5a0dd86e6e290": "Blue"}.

**Outputs**

- `created` (true/false): Always true once created
- `email_address` (text): The lead's email address
- `lead_id` (text): The lead's ID

**Example output**

```json
{
  "created": true,
  "email_address": "jo@example.com",
  "lead_id": "548102737922"
}
```

### Create opportunity

Create an opportunity (a deal) with its owner, deal stage and close date, and optionally its amount, contact and account.

**Inputs**

- Name (`opportunity_name`, text, required): The opportunity's name.
- Owner (`owner_id`, text, required): The user who owns the opportunity.
- Deal stage (`deal_stage_id`, text, required): Where it is in your pipeline.
- Close date (`close_date`, date, required): When it is expected to close.
- Amount (`amount`, number): What the deal is worth. At least 0.
- Probability (`probability`, number): How likely it is to close, in percent (0 to 100). From 0 to 100.
- Status (`status`, text): Open, closed won or closed lost. Defaults to open. One of: `open`, `won` (Closed won), `lost` (Closed lost).
- Primary contact (`primary_lead_id`, text): The lead ID of the opportunity's main contact.
- Account (`account_id`, text): The account (company) the deal is with.
- Campaign (`campaign_id`, text): The campaign it came from.
- Custom fields (`custom_fields`, object): Values for custom fields, each under the field's system name as 'List fields' shows it, such as {"favorite_color_5a0dd86e6e290": "Blue"}.

**Outputs**

- `created` (true/false): Always true once created
- `opportunity_id` (text): The new opportunity's ID

**Example output**

```json
{
  "created": true,
  "opportunity_id": "8231174"
}
```

### Delete account

Delete an account for good.

**Inputs**

- Account (`account_id`, text, required): The account. Pick one, or give its ID.

**Outputs**

- `account_id` (text): The account deleted
- `deleted` (true/false): Always true once deleted

**Example output**

```json
{
  "account_id": "60419",
  "deleted": true
}
```

### Delete lead

Delete a lead for good.

**Inputs**

- Lead ID (`lead_id`, text, required): The lead's ID, from 'Find leads', a trigger or an earlier step.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `lead_id` (text): The lead deleted

**Example output**

```json
{
  "deleted": true,
  "lead_id": "548102737922"
}
```

### Delete opportunity

Delete an opportunity for good.

**Inputs**

- Opportunity ID (`opportunity_id`, text, required): The opportunity's ID, from 'List opportunities', a trigger or an earlier step.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `opportunity_id` (text): The opportunity deleted

**Example output**

```json
{
  "deleted": true,
  "opportunity_id": "8231174"
}
```

### Find leads

Find the lead with an email address, or list active leads. Lead Gen & CRM caps a page at 500; use Skip for more.

**Inputs**

- Email (`email_address`, text): Only the lead with this email address, active or not. Leave empty for every active lead.
- Fields to return (`fields`, list): Only these fields of each lead. Leave empty for all of them.
- How many (`limit`, number): How many to return, 1 to 500. Lead Gen & CRM returns up to 500. From 1 to 500.
- Skip (`offset`, number): How many to skip first, to get the next page: 500 for the second. At least 0.

**Outputs**

- `count` (number): How many were returned
- `leads` (list): The leads found

**Example output**

```json
{
  "count": 1,
  "leads": [
    {
      "accountID": "",
      "active": "1",
      "campaignID": "",
      "city": "Gainesville",
      "companyName": "Acme Inc.",
      "country": "US",
      "description": "Met at the spring expo.",
      "emailAddress": "jo@example.com",
      "faxNumber": "",
      "firstName": "Jo",
      "id": "548102737922",
      "industry": "Software",
      "isUnsubscribed": "0",
      "lastName": "Bloggs",
      "leadScore": "25",
      "leadStatus": "open",
      "mobilePhoneNumber": "",
      "officePhoneNumber": "",
      "ownerID": "312019481",
      "phoneNumber": "+1 352 555 0100",
      "phoneNumberExtension": "",
      "state": "FL",
      "street": "1 Main Street",
      "title": "Marketing Manager",
      "updateTimestamp": "2026-11-16 14:05:12",
      "website": "https://example.com",
      "zipcode": "32601"
    }
  ]
}
```

### Get account

Get one account with its contact details and addresses.

**Inputs**

- Account (`account_id`, text, required): The account. Pick one, or give its ID.

**Outputs**

- `account` (object): The account

**Example output**

```json
{
  "account": {
    "accountName": "Acme Inc.",
    "annualRevenue": "2500000",
    "billingCity": "Gainesville",
    "billingCountry": "US",
    "billingPostalCode": "32601",
    "billingState": "FL",
    "billingStreetAddress": "1 Main Street",
    "id": "60419",
    "industry": "Software",
    "numberOfEmployees": "40",
    "ownerID": "312019481",
    "phone": "+1 352 555 0100",
    "shippingCity": "Gainesville",
    "shippingCountry": "US",
    "shippingPostalCode": "32601",
    "shippingState": "FL",
    "shippingStreetAddress": "1 Main Street",
    "website": "https://example.com",
    "yearStarted": "2011"
  }
}
```

### Get lead

Get one lead with its contact details, status, score and owner.

**Inputs**

- Lead ID (`lead_id`, text, required): The lead's ID, from 'Find leads', a trigger or an earlier step.

**Outputs**

- `lead` (object): The lead

**Example output**

```json
{
  "lead": {
    "accountID": "",
    "active": "1",
    "campaignID": "",
    "city": "Gainesville",
    "companyName": "Acme Inc.",
    "country": "US",
    "description": "Met at the spring expo.",
    "emailAddress": "jo@example.com",
    "faxNumber": "",
    "firstName": "Jo",
    "id": "548102737922",
    "industry": "Software",
    "isUnsubscribed": "0",
    "lastName": "Bloggs",
    "leadScore": "25",
    "leadStatus": "open",
    "mobilePhoneNumber": "",
    "officePhoneNumber": "",
    "ownerID": "312019481",
    "phoneNumber": "+1 352 555 0100",
    "phoneNumberExtension": "",
    "state": "FL",
    "street": "1 Main Street",
    "title": "Marketing Manager",
    "updateTimestamp": "2026-11-16 14:05:12",
    "website": "https://example.com",
    "zipcode": "32601"
  }
}
```

### Get opportunity

Get one opportunity with its amount, stage, owner and close date.

**Inputs**

- Opportunity ID (`opportunity_id`, text, required): The opportunity's ID, from 'List opportunities', a trigger or an earlier step.

**Outputs**

- `opportunity` (object): The opportunity

**Example output**

```json
{
  "opportunity": {
    "accountID": "60419",
    "amount": "12000",
    "campaignID": "",
    "closeDate": "2026-12-31",
    "dealStageID": "1022",
    "id": "8231174",
    "isActive": "1",
    "isClosed": "0",
    "isWon": "0",
    "opportunityName": "Acme website redesign",
    "originatingLeadID": "548102737922",
    "ownerID": "312019481",
    "primaryLeadID": "548102737922",
    "probability": "40"
  }
}
```

### List accounts

List accounts (companies), optionally only one owner's. Lead Gen & CRM caps a page at 500; use Skip for more.

**Inputs**

- Owner (`owner_id`, text): Only records this user owns.
- How many (`limit`, number): How many to return, 1 to 500. Lead Gen & CRM returns up to 500. From 1 to 500.
- Skip (`offset`, number): How many to skip first, to get the next page: 500 for the second. At least 0.

**Outputs**

- `accounts` (list): The accounts found
- `count` (number): How many were returned

**Example output**

```json
{
  "accounts": [
    {
      "accountName": "Acme Inc.",
      "annualRevenue": "2500000",
      "billingCity": "Gainesville",
      "billingCountry": "US",
      "billingPostalCode": "32601",
      "billingState": "FL",
      "billingStreetAddress": "1 Main Street",
      "id": "60419",
      "industry": "Software",
      "numberOfEmployees": "40",
      "ownerID": "312019481",
      "phone": "+1 352 555 0100",
      "shippingCity": "Gainesville",
      "shippingCountry": "US",
      "shippingPostalCode": "32601",
      "shippingState": "FL",
      "shippingStreetAddress": "1 Main Street",
      "website": "https://example.com",
      "yearStarted": "2011"
    }
  ],
  "count": 1
}
```

### List campaigns

List the account's campaigns with their type, dates and costs.

**Inputs**

- How many (`limit`, number): How many to return, 1 to 500. Lead Gen & CRM returns up to 500. From 1 to 500.
- Skip (`offset`, number): How many to skip first, to get the next page: 500 for the second. At least 0.

**Outputs**

- `campaigns` (list): The campaigns
- `count` (number): How many were returned

**Example output**

```json
{
  "campaigns": [
    {
      "campaignAlias": "spring-expo",
      "campaignName": "Spring expo 2026",
      "campaignOrigin": "Event",
      "campaignType": "Trade Show",
      "endDate": "2026-04-03",
      "goal": "200",
      "id": "7311",
      "isActive": "1",
      "otherCosts": "1500",
      "price": "0",
      "qty": "0",
      "startDate": "2026-04-01"
    }
  ],
  "count": 1
}
```

### List deal stages

List your pipeline's deal stages, in pipeline order.

**Inputs**

- How many (`limit`, number): How many to return, 1 to 500. Lead Gen & CRM returns up to 500. From 1 to 500.
- Skip (`offset`, number): How many to skip first, to get the next page: 500 for the second. At least 0.

**Outputs**

- `count` (number): How many were returned
- `deal_stages` (list): The deal stages

**Example output**

```json
{
  "count": 1,
  "deal_stages": [
    {
      "dealStageName": "Proposal",
      "defaultProbability": "40",
      "description": "Proposal sent",
      "id": "1022",
      "isEditable": "1",
      "weight": "3"
    }
  ]
}
```

### List emails

List the account's marketing emails with their subjects.

**Inputs**

- How many (`limit`, number): How many to return, 1 to 500. Lead Gen & CRM returns up to 500. From 1 to 500.
- Skip (`offset`, number): How many to skip first, to get the next page: 500 for the second. At least 0.

**Outputs**

- `count` (number): How many were returned
- `emails` (list): The emails

**Example output**

```json
{
  "count": 1,
  "emails": [
    {
      "createTimestamp": "2026-10-01 09:30:00",
      "id": "52113",
      "subject": "What's new this month",
      "thumbnail": "https://example.com/thumbnails/52113.png",
      "title": "November newsletter"
    }
  ]
}
```

### List fields

List every standard and custom field, with the system name that Custom fields take.

**Inputs**

- How many (`limit`, number): How many to return, 1 to 500. Lead Gen & CRM returns up to 500. From 1 to 500.
- Skip (`offset`, number): How many to skip first, to get the next page: 500 for the second. At least 0.

**Outputs**

- `count` (number): How many were returned
- `fields` (list): The fields

**Example output**

```json
{
  "count": 1,
  "fields": [
    {
      "dataLength": "255",
      "dataType": "text",
      "id": "1736",
      "isActive": "1",
      "isAvailableInContactManager": "1",
      "isAvailableInForms": "1",
      "isCustom": "1",
      "isEditableInContactManager": "1",
      "isRequired": "0",
      "label": "Favorite Color",
      "relationship": "lead",
      "source": "custom",
      "systemName": "favorite_color_5a0dd86e6e290"
    }
  ]
}
```

### List leads by date

List the leads created, or created or changed, in a time range. Returns up to 500.

**Inputs**

- From (`start`, date and time, required): The start of the time range.
- Until (`end`, date and time): The end of the time range. Defaults to now.
- Leads (`change`, text): Only leads created in that time, or those created or changed. Defaults to created or changed. One of: `create` (Created in that time), `update` (Created or changed in that time).
- Fields to return (`fields`, list): Only these fields of each lead. Leave empty for all of them.

**Outputs**

- `count` (number): How many were returned
- `leads` (list): The leads in the range

**Example output**

```json
{
  "count": 1,
  "leads": [
    {
      "accountID": "",
      "active": "1",
      "campaignID": "",
      "city": "Gainesville",
      "companyName": "Acme Inc.",
      "country": "US",
      "description": "Met at the spring expo.",
      "emailAddress": "jo@example.com",
      "faxNumber": "",
      "firstName": "Jo",
      "id": "548102737922",
      "industry": "Software",
      "isUnsubscribed": "0",
      "lastName": "Bloggs",
      "leadScore": "25",
      "leadStatus": "open",
      "mobilePhoneNumber": "",
      "officePhoneNumber": "",
      "ownerID": "312019481",
      "phoneNumber": "+1 352 555 0100",
      "phoneNumberExtension": "",
      "state": "FL",
      "street": "1 Main Street",
      "title": "Marketing Manager",
      "updateTimestamp": "2026-11-16 14:05:12",
      "website": "https://example.com",
      "zipcode": "32601"
    }
  ]
}
```

### List list members

List the active members of a list. Lead Gen & CRM caps a page at 500; use Skip for more.

**Inputs**

- List (`list_id`, text, required): The list. Pick one, or give its ID.
- How many (`limit`, number): How many to return, 1 to 500. Lead Gen & CRM returns up to 500. From 1 to 500.
- Skip (`offset`, number): How many to skip first, to get the next page: 500 for the second. At least 0.

**Outputs**

- `count` (number): How many were returned
- `list_id` (text): The list's ID
- `members` (list): The list's members

**Example output**

```json
{
  "count": 1,
  "list_id": "48273",
  "members": [
    {
      "companyName": "Acme Inc.",
      "emailAddress": "jo@example.com",
      "firstName": "Jo",
      "id": "991827",
      "lastName": "Bloggs",
      "leadID": "548102737922",
      "listID": "48273"
    }
  ]
}
```

### List lists

List the account's active lists with how many members each has.

**Inputs**

- How many (`limit`, number): How many to return, 1 to 500. Lead Gen & CRM returns up to 500. From 1 to 500.
- Skip (`offset`, number): How many to skip first, to get the next page: 500 for the second. At least 0.

**Outputs**

- `count` (number): How many were returned
- `lists` (list): The active lists

**Example output**

```json
{
  "count": 1,
  "lists": [
    {
      "createTimestamp": "2025-03-02 10:00:00",
      "description": "Monthly newsletter subscribers",
      "id": "48273",
      "memberCount": "1250",
      "name": "Newsletter",
      "removedCount": "14"
    }
  ]
}
```

### List opportunities

List opportunities (deals), optionally only one owner's, deal stage's, account's or campaign's. Lead Gen & CRM caps a page at 500; use Skip for more.

**Inputs**

- Owner (`owner_id`, text): Only records this user owns.
- Deal stage (`deal_stage_id`, text): Only opportunities in this stage.
- Account (`account_id`, text): Only opportunities with this account.
- Campaign (`campaign_id`, text): Only opportunities from this campaign.
- How many (`limit`, number): How many to return, 1 to 500. Lead Gen & CRM returns up to 500. From 1 to 500.
- Skip (`offset`, number): How many to skip first, to get the next page: 500 for the second. At least 0.

**Outputs**

- `count` (number): How many were returned
- `opportunities` (list): The opportunities found

**Example output**

```json
{
  "count": 1,
  "opportunities": [
    {
      "accountID": "60419",
      "amount": "12000",
      "campaignID": "",
      "closeDate": "2026-12-31",
      "dealStageID": "1022",
      "id": "8231174",
      "isActive": "1",
      "isClosed": "0",
      "isWon": "0",
      "opportunityName": "Acme website redesign",
      "originatingLeadID": "548102737922",
      "ownerID": "312019481",
      "primaryLeadID": "548102737922",
      "probability": "40"
    }
  ]
}
```

### List users

List the account's users, whose IDs own leads, opportunities and accounts.

**Inputs**

- How many (`limit`, number): How many to return, 1 to 500. Lead Gen & CRM returns up to 500. From 1 to 500.
- Skip (`offset`, number): How many to skip first, to get the next page: 500 for the second. At least 0.

**Outputs**

- `count` (number): How many were returned
- `users` (list): The users

**Example output**

```json
{
  "count": 1,
  "users": [
    {
      "displayName": "Sam Rivera",
      "emailAddress": "sam@example.com",
      "firstName": "Sam",
      "id": "312019481",
      "isActive": "1",
      "isReseller": "0",
      "lastName": "Rivera",
      "phone": "+1 352 555 0101",
      "userTimezone": "America/New_York"
    }
  ]
}
```

### Remove lead from list

Remove a lead from a list, by its ID or email address.

**Inputs**

- List (`list_id`, text, required): The list. Pick one, or give its ID.
- Lead ID (`lead_id`, text): The lead's ID. Give this or the email address.
- Email (`email_address`, text): The lead's email address, instead of its ID.

**Outputs**

- `email_address` (text): The lead's email, if it was given by email
- `lead_id` (text): The lead's ID, if it was given by ID
- `list_id` (text): The list's ID
- `removed` (true/false): Always true once removed

**Example output**

```json
{
  "email_address": "",
  "lead_id": "548102737922",
  "list_id": "48273",
  "removed": true
}
```

### Update account

Change an account's details. Only the fields given change.

**Inputs**

- Account (`account_id`, text, required): The account. Pick one, or give its ID.
- Name (`account_name`, text): The company or organization's name. Leave empty to keep it.
- Owner (`owner_id`, text): The user who owns the account. Leave empty to keep it.
- Industry (`industry`, text): The account's industry. Leave empty to keep it.
- Phone (`phone`, text): The account's phone. Leave empty to keep it.
- Website (`website`, text): The account's website. Leave empty to keep it.
- Billing street (`billing_street_address`, text): The account's billing street. Leave empty to keep it.
- Billing city (`billing_city`, text): The account's billing city. Leave empty to keep it.
- Billing state (`billing_state`, text): The account's billing state. Leave empty to keep it.
- Billing postal code (`billing_postal_code`, text): The account's billing postal code. Leave empty to keep it.
- Billing country (`billing_country`, text): The account's billing country. Leave empty to keep it.
- Shipping street (`shipping_street_address`, text): The account's shipping street. Leave empty to keep it.
- Shipping city (`shipping_city`, text): The account's shipping city. Leave empty to keep it.
- Shipping state (`shipping_state`, text): The account's shipping state. Leave empty to keep it.
- Shipping postal code (`shipping_postal_code`, text): The account's shipping postal code. Leave empty to keep it.
- Shipping country (`shipping_country`, text): The account's shipping country. Leave empty to keep it.
- Annual revenue (`annual_revenue`, number): The account's annual revenue. Leave empty to keep it. At least 0.
- Employees (`number_of_employees`, number): The account's employees. Leave empty to keep it. At least 0.
- Year started (`year_started`, number): The account's year started. Leave empty to keep it. At least 0.
- Custom fields (`custom_fields`, object): Values for custom fields, each under the field's system name as 'List fields' shows it, such as {"favorite_color_5a0dd86e6e290": "Blue"}.

**Outputs**

- `account_id` (text): The account's ID
- `updated` (true/false): False when every value given was already set

**Example output**

```json
{
  "account_id": "60419",
  "updated": true
}
```

### Update lead

Change a lead's details. Only the fields given change; a lead that doesn't exist is an error.

**Inputs**

- Lead ID (`lead_id`, text, required): The lead's ID, from 'Find leads', a trigger or an earlier step.
- Email (`email_address`, text): A new email address. It must not belong to another lead. Leave empty to keep it.
- First name (`first_name`, text): The lead's first name. Leave empty to keep it.
- Last name (`last_name`, text): The lead's last name. Leave empty to keep it.
- Company (`company_name`, text): The lead's company. Leave empty to keep it.
- Job title (`title`, text): The lead's job title. Leave empty to keep it.
- Phone (`phone_number`, text): The lead's phone. Leave empty to keep it.
- Mobile phone (`mobile_phone_number`, text): The lead's mobile phone. Leave empty to keep it.
- Office phone (`office_phone_number`, text): The lead's office phone. Leave empty to keep it.
- Phone extension (`phone_number_extension`, text): The lead's phone extension. Leave empty to keep it.
- Fax (`fax_number`, text): The lead's fax. Leave empty to keep it.
- Website (`website`, text): The lead's website. Leave empty to keep it.
- Industry (`industry`, text): The lead's industry. Leave empty to keep it.
- Street (`street`, text): The lead's street. Leave empty to keep it.
- City (`city`, text): The lead's city. Leave empty to keep it.
- State (`state`, text): The lead's state. Leave empty to keep it.
- Postal code (`zipcode`, text): The lead's postal code. Leave empty to keep it.
- Country (`country`, text): The lead's country. Leave empty to keep it.
- Description (`description`, text): The lead's description. Leave empty to keep it.
- Status (`lead_status`, text): Where the lead is in your pipeline. Leave empty to keep it. One of: `unqualified`, `open`, `qualified`, `contact`.
- Email subscription (`subscription`, text): Whether the lead gets your marketing emails. Leave empty to keep it. One of: `subscribed`, `unsubscribed`.
- Owner (`owner_id`, text): The user who owns the lead. Leave empty to keep it.
- Account (`account_id`, text): The account (company) the lead belongs to. Leave empty to keep it.
- Campaign (`campaign_id`, text): The campaign the lead came from. Leave empty to keep it.
- Custom fields (`custom_fields`, object): Values for custom fields, each under the field's system name as 'List fields' shows it, such as {"favorite_color_5a0dd86e6e290": "Blue"}.

**Outputs**

- `lead_id` (text): The lead's ID
- `updated` (true/false): False when every value given was already the lead's

**Example output**

```json
{
  "lead_id": "548102737922",
  "updated": true
}
```

### Update opportunity

Change an opportunity, such as its stage, amount or status (open, won or lost). Only the fields given change.

**Inputs**

- Opportunity ID (`opportunity_id`, text, required): The opportunity's ID, from 'List opportunities', a trigger or an earlier step.
- Name (`opportunity_name`, text): The opportunity's name. Leave empty to keep it.
- Owner (`owner_id`, text): The user who owns the opportunity. Leave empty to keep it.
- Deal stage (`deal_stage_id`, text): Where it is in your pipeline. Leave empty to keep it.
- Close date (`close_date`, date): When it is expected to close. Leave empty to keep it.
- Amount (`amount`, number): What the deal is worth. Leave empty to keep it. At least 0.
- Probability (`probability`, number): How likely it is to close, in percent (0 to 100). Leave empty to keep it. From 0 to 100.
- Status (`status`, text): Open, closed won or closed lost. Leave empty to keep it. One of: `open`, `won` (Closed won), `lost` (Closed lost).
- Primary contact (`primary_lead_id`, text): The lead ID of the opportunity's main contact. Leave empty to keep it.
- Account (`account_id`, text): The account (company) the deal is with. Leave empty to keep it.
- Campaign (`campaign_id`, text): The campaign it came from. Leave empty to keep it.
- Custom fields (`custom_fields`, object): Values for custom fields, each under the field's system name as 'List fields' shows it, such as {"favorite_color_5a0dd86e6e290": "Blue"}.

**Outputs**

- `opportunity_id` (text): The opportunity's ID
- `updated` (true/false): False when every value given was already set

**Example output**

```json
{
  "opportunity_id": "8231174",
  "updated": true
}
```
