Restore a lead or deal
Brings back an archived record. Restoring a record that is not archived changes nothing.
Brings back an archived record. Restoring a record that is not archived changes nothing.
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}$Response Body
application/json
curl -X POST "https://example.com/crm/lead-deals/string/restore"{ "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}Move a lead or deal to a stage PATCH
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.
Set the outcome of a lead or deal PATCH
Marks the record `Won` or `Lost`, which stamps `closedAt`, or reopens it with `Open`. The stage does not change. A `lostReason` is kept only for `Lost`.