# Create or update a lead

`needleUpsertLead`

Create a lead, or when a LinkedIn or Instagram identity already belongs to one, patch the fields sent onto it. Returns created or matched with the lead. Same identity formats as needleCreateLead.

**Input**

- `identities` (object, required)
  - `linkedin` (string, optional): Public identifier (john-doe), /in/ path (/in/john-doe or in/john-doe), profile URL (https://www.linkedin.com/in/john-doe), or user id (ACoAAA…). Stored as the identifier, not the URL.
  - `instagram` (string, optional): Username (john-doe), handle (@john-doe), or profile URL (https://www.instagram.com/john-doe). Stored as the username without @.
- `timezone` (string, required)
- `firstName` (string, optional)
- `lastName` (string, optional)
- `companyName` (string, optional)
- `companyDomain` (string, optional)
- `jobTitle` (string, optional)
- `email` (string, optional)
- `imageUrl` (string, optional)
- `properties` (object, optional)
