Create a lead or deal
Creates a lead, or a deal when `phase` is `DEAL`, at the top of its stage. Without `pipelineId` it goes to your default pipeline, and without `stageId` to the pipeline's first stage. A stage from another pipeline or an owner who is not a member of your company returns 400; a pipeline, contact or company you cannot see returns 404.
Creates a lead, or a deal when phase is DEAL, at the top of its stage. Without pipelineId it goes to your default pipeline, and without stageId to the pipeline's first stage. A stage from another pipeline or an owner who is not a member of your company returns 400; a pipeline, contact or company you cannot see returns 404.
Authorization
x-api-key Company API key, created under Settings > API Keys.
In: header
Header Parameters
Optional with an API key or OAuth token: leave it out and the company the key or token belongs to is used. If sent, it must be that same company, otherwise the request is refused with 403 API_KEY_WRONG_COMPANY or OAUTH_WRONG_COMPANY.
^[0-9a-fA-F]{24}$Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/crm/lead-deals" \ -H "Content-Type: application/json" \ -d '{ "title": "string" }'{ "address": "string", "archiveBatchId": "string", "archivedAt": "2019-08-24T14:15:22Z", "assignedCompanyAt": "2019-08-24T14:15:22Z", "assignedCompanyId": "string", "assignedMembershipId": "string", "attribution": { "firstTouch": { "capturedAt": "string", "fbclid": "string", "gclid": "string", "landingPage": "string", "msclkid": "string", "referrer": "string", "ttclid": "string", "utmCampaign": "string", "utmContent": "string", "utmMedium": "string", "utmSource": "string", "utmTerm": "string" }, "lastTouch": { "capturedAt": "string", "fbclid": "string", "gclid": "string", "landingPage": "string", "msclkid": "string", "referrer": "string", "ttclid": "string", "utmCampaign": "string", "utmContent": "string", "utmMedium": "string", "utmSource": "string", "utmTerm": "string" } }, "closedAt": "2019-08-24T14:15:22Z", "companyEntityId": "string", "companyId": "string", "contactId": "string", "createdAt": "2019-08-24T14:15:22Z", "firstResponseAt": "2019-08-24T14:15:22Z", "formIntakeNonce": "string", "id": "string", "isChainIntake": true, "isExample": true, "lastActivityActorId": "string", "lastActivityAt": "2019-08-24T14:15:22Z", "lastWorkActivityAt": "2019-08-24T14:15:22Z", "location": { "coordinates": [ 0, 0 ], "type": "Point" }, "lostReason": "string", "nextActivityAt": "2019-08-24T14:15:22Z", "nextActivityKind": "string", "nextActivityLabel": "string", "notes": "string", "number": 0, "outcome": "Lost", "ownerId": "string", "phase": "DEAL", "pipelineId": "string", "rank": "string", "rejectedAt": "2019-08-24T14:15:22Z", "rejectedReason": "string", "responseDeadlineAt": "2019-08-24T14:15:22Z", "source": "Booking", "sourceFormId": "string", "stageId": "string", "title": "string", "updatedAt": "2019-08-24T14:15:22Z", "value": 0}Archive a lead or deal POST
Archives the record, which hides it from the default list. Archiving an archived record changes nothing. A record owned by another company in your chain returns 404.
Get a lead or deal GET
Returns the record with its tags, custom field values, owner, next step and linked order, plus the tag options and lost reasons you can pick from. Archived records are returned too. An id from another company returns 404.