Move a lead or deal to a stage
Moves the record to another stage in its pipeline, or to a new position in its stage. Pass the record's `updatedAt` as `lastSeenUpdatedAt` to get 409 instead of overwriting a change someone else made since you read it. A stage from another pipeline returns 400.
Moves the record to another stage in its pipeline, or to a new position in its stage. Pass the record's updatedAt as lastSeenUpdatedAt to get 409 instead of overwriting a change someone else made since you read it. A stage from another pipeline returns 400.
Authorization
x-api-key Company API key, created under Settings > API Keys.
In: header
Path Parameters
The lead or deal id.
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 PATCH "https://example.com/crm/lead-deals/string/stage" \ -H "Content-Type: application/json" \ -d '{ "stageId": "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}List leads and deals GET
Returns one page of leads and deals, in board order unless `sort` says otherwise. By default the list holds the active deals only; use `recordSet` to see leads or archived records. Query parameters: - `recordSet`: `active` (default) for deals that are not archived, `unclaimed` for unassigned leads, `archived` for archived records, or `all` for everything. - `pipelineId`, `stageId`, `contactId`, `ownerId`: only records in that pipeline or stage, for that contact, or owned by that member. - `phase`: `LEAD` or `DEAL`. - `outcome`: `Open`, `Won` or `Lost`. - `tag`: a tag option id. Only records carrying that tag. - `search`: matches the title ignoring case, or the record number when the term is a whole number. - `page`: page number, starting at 1. Defaults to 1. - `pageSize`: records per page, 1 to 200. Defaults to 25. - `sort`: `rank` (default, board order), `createdAt`, `updatedAt`, `value` or `lastActivityAt`. - `order`: `asc` or `desc`. Defaults to `asc`, and to `desc` when sorting by `lastActivityAt`. - `chain`: `all` (default) for every record you can see, `own` to leave out records shared through your chain, or `chain` for only those. - `createdFrom`, `createdTo`: ISO 8601 date-times. Only records created within the range, both ends included. Leads and deals need the CRM add-on; without it every call returns 403.
Restore a lead or deal POST
Brings back an archived record. Restoring a record that is not archived changes nothing.