> For the complete documentation index, see [llms.txt](https://docs.shortcutco.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shortcutco.com/developers/api-reference/reference/leads.md). Agents can also search and read this documentation through its [MCP server](https://docs.shortcutco.com/~gitbook/mcp).

# Leads

Requests for service, from your website, ads, or another system.

A lead is a request for service. Creating one through the API works like your website form: staff are notified, and the lead appears in Customers with the Lead label.

Fields: [The lead object](https://docs.shortcutco.com/developers/reference/objects/lead).

## List leads

> Leads newest first, or by last change when \`updatedSince\` is set. Dismissed leads are included unless you filter by \`status\`. \`q\` searches names, company, email, address and phone; \`email\` finds a contact's leads exactly. \`externalSource\` and \`externalId\` together narrow the list to the lead with that id in your system.\
> \
> Returns a list of \[lead objects]\(<https://docs.shortcutco.com/developers/reference/objects/lead>).

```json
{"openapi":"3.1.0","info":{"title":"Shortcut API","version":"v1"},"tags":[{"name":"Leads","description":"A lead is a request for service. Creating one through the API works like your website form: staff are notified, and the lead appears in Customers with the Lead label.\n\nFields: [The lead object](https://docs.shortcutco.com/developers/reference/objects/lead)."}],"servers":[{"url":"https://api.shortcutco.com","description":"Production"}],"security":[{"bearerAuth":["leads:read"]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"scut_<env>_<id>_<secret>","description":"A workspace API token. Each operation lists the scopes it needs; `write` implies `read`, and `send`/`complete` are never implied."}},"headers":{"RateLimitLimit":{"schema":{"type":"integer"},"description":"Requests allowed in the tightest window."},"RateLimitRemaining":{"schema":{"type":"integer"},"description":"Requests left in that window."},"RateLimitReset":{"schema":{"type":"integer"},"description":"Seconds until that window resets."}},"schemas":{"Lead":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The lead's id."},"object":{"type":"string","const":"lead","description":"Always `lead`."},"firstName":{"type":"string","description":"First name."},"lastName":{"type":"string","description":"Last name."},"companyName":{"type":["string","null"],"description":"Company name, when the lead is a business."},"email":{"type":["string","null"],"description":"Email address, or null when none is on file."},"phone":{"type":["string","null"],"description":"The primary phone number (where texts go) in E.164 form, such as `+14065550142`, or null."},"phones":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The number's id. Send it back to keep the number when replacing the list."},"number":{"type":"string","description":"The number as entered, such as `(406) 555-0142`."},"e164":{"type":["string","null"],"description":"The number in E.164 (`+14065550142`), or null when it cannot be read as a phone number (it is shown, never texted)."},"label":{"anyOf":[{"type":"string","enum":["mobile","home","work","other","custom"]},{"type":"null"}],"description":"`mobile`, `home`, `work`, `other`, or `custom` (see `customLabel`). Null for an unlabeled number."},"customLabel":{"type":["string","null"],"description":"The label when `label` is `custom`, such as `Spouse` or `Property manager`."},"isPrimary":{"type":"boolean","description":"Texts go to the primary number. Exactly one number is primary when the list is not empty; `phone` is its copy."},"smsConsentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When this number agreed to texts, ISO 8601 in UTC, when recorded. It never blocks or allows a text: opting out is a STOP text."},"smsConsentSource":{"anyOf":[{"type":"string","enum":["office_recorded","web_form","import","inbound_text"]},{"type":"null"}],"description":"How the consent was recorded."}},"required":["id","number","e164","label","customLabel","isPrimary","smsConsentAt","smsConsentSource"],"additionalProperties":false,"description":"One of the record's phone numbers."},"description":"Every phone number, primary first. For a lead linked to a customer, only the customer's primary number; read the customer (customers:read) for the rest."},"address":{"type":"string","description":"The service address."},"servicesRequested":{"type":"array","items":{"type":"string"},"description":"What the lead asked for."},"specialRequests":{"type":["string","null"],"description":"Anything else the lead said, or null."},"estimatedHours":{"type":["number","null"],"description":"The office's estimate of the work in hours, or null."},"sqFootage":{"type":["number","null"],"description":"Square footage typed in by hand, or null."},"status":{"type":"string","enum":["pending","dismissed","lost"],"description":"`pending` leads are open; `dismissed` leads were set aside; `lost` leads declined an estimate and reopen when a new estimate is sent or they submit the request form again."},"lifecycleStage":{"type":"string","enum":["lead","prospect","customer"],"description":"`lead` until an estimate is sent (`prospect`) or a job is booked (`customer`)."},"source":{"type":"string","enum":["intake_form","manual","csv","api"],"description":"How the lead arrived: `intake_form` for the website form, `manual` for leads added in the app, `csv` for an import, `api` for leads created with the API (leads it created before October 2026 read `manual`), unless the create set `leadSource` to `intake_form` or `manual`. New values may be added; treat an unknown one like `manual`."},"customerId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The customer account linked to the lead's email. It appears in the customers list and find_customer once it has a job or the lead converts. Null when the lead is not linked, for example when its email belongs to a staff member."},"propertyId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The lead's property (service address), when linked."},"lostReason":{"anyOf":[{"type":"string","enum":["price","timing","competitor","other"]},{"type":"null"}],"description":"Why the lead was lost, as a person marked it (`price`, `timing`, `competitor`, `other`); null unless `status` is `lost`."},"lostAt":{"anyOf":[{"type":"string","format":"date-time","description":"When the lead was marked lost, ISO 8601 in UTC."},{"type":"null"}],"description":"When the lead was marked lost, ISO 8601 in UTC."},"customerAt":{"anyOf":[{"type":"string","format":"date-time","description":"When the lead became a customer (a job was booked), ISO 8601 in UTC."},{"type":"null"}],"description":"When the lead became a customer (a job was booked), ISO 8601 in UTC."},"importedNotes":{"type":["string","null"],"description":"Notes that came in with the lead from another system (an import), as they were written there; null when none."},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The ids of the lead's tags."},"externalReferences":{"type":"array","items":{"$ref":"#/components/schemas/ExternalReference"},"description":"Ids this lead has in your other systems, set with `externalReference`, the external upsert, or a link."},"createdAt":{"type":"string","format":"date-time","description":"When the lead was created, ISO 8601 in UTC."},"updatedAt":{"type":"string","format":"date-time","description":"When the lead last changed, ISO 8601 in UTC."}},"required":["id","object","firstName","lastName","companyName","email","phone","phones","address","servicesRequested","specialRequests","estimatedHours","sqFootage","status","lifecycleStage","source","customerId","propertyId","lostReason","lostAt","customerAt","importedNotes","tagIds","externalReferences","createdAt","updatedAt"],"additionalProperties":false,"description":"A lead: someone who asked for service."},"ExternalReference":{"type":"object","properties":{"source":{"type":"string","description":"The system the id comes from."},"externalId":{"type":"string","description":"The object's id in that system."}},"required":["source","externalId"],"additionalProperties":false,"description":"An id this object has in another system."},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","description":"Error family, such as `invalid_request` or `permission`."},"code":{"type":"string","description":"Specific error code; see the errors page."},"message":{"type":"string","description":"A human-readable explanation."},"param":{"type":"string","description":"The input the error is about, such as `query.limit`."},"requiredScope":{"type":"string","description":"The scope the token is missing."},"requestId":{"type":"string","description":"Quote this id to support."},"docs":{"type":"string","description":"Link to the error's documentation."}},"required":["type","code","message","requestId","docs"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}},"responses":{"BadRequest":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthenticated":{"description":"The token is missing, invalid, expired, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"SubscriptionRequired":{"description":"The workspace's subscription needs attention.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The token is missing a required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such object in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limited; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"Temporarily unavailable; retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/leads":{"get":{"operationId":"leads.list","tags":["Leads"],"summary":"List leads","description":"Leads newest first, or by last change when `updatedSince` is set. Dismissed leads are included unless you filter by `status`. `q` searches names, company, email, address and phone; `email` finds a contact's leads exactly. `externalSource` and `externalId` together narrow the list to the lead with that id in your system.\n\nReturns a list of [lead objects](https://docs.shortcutco.com/developers/reference/objects/lead).","parameters":[{"name":"limit","in":"query","required":false,"description":"How many items to return, 1-200. Defaults to 50.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","required":false,"description":"The `meta.nextCursor` from the previous page. Omit it for the first page.","schema":{"type":"string","minLength":1,"maxLength":4096}},{"name":"status","in":"query","required":false,"description":"Only leads with this status.","schema":{"type":"string","enum":["pending","dismissed","lost"]}},{"name":"lifecycleStage","in":"query","required":false,"description":"Only leads at this stage.","schema":{"type":"string","enum":["lead","prospect","customer"]}},{"name":"source","in":"query","required":false,"description":"Only leads that arrived this way.","schema":{"type":"string","enum":["intake_form","manual","csv","api"]}},{"name":"q","in":"query","required":false,"description":"Search name, company, email, address, or phone.","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"email","in":"query","required":false,"description":"Exact email, any case.","schema":{"type":"string","minLength":1,"maxLength":254}},{"name":"externalSource","in":"query","required":false,"description":"With `externalId`: only the lead with this id in your system.","schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,63}$"}},{"name":"externalId","in":"query","required":false,"description":"With `externalSource`: only the lead with this id in your system.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^\\p{Cc}\\s/\\\\]+$"}},{"name":"updatedSince","in":"query","required":false,"description":"ISO 8601 timestamp. Returns objects changed at or after it, oldest change first. Keep the largest `updatedAt` you have seen, subtract five minutes, and pass it on the next sync; deduplicate by `id`.","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Success.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Lead"}},"meta":{"type":"object","properties":{"nextCursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page; null on the last page."},"hasMore":{"type":"boolean","description":"Whether another page exists."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"$ref":"#/components/responses/SubscriptionRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}}}}
```

## Create a lead

> Creates a lead that behaves like one from the website form: staff are notified, and your new-lead automations run only if the token has \`automations:trigger\`. A new email gets a customer account and the address becomes its property; if the email belongs to an existing customer, the token also needs \`customers:write\`. Its \`source\` is \`api\`, which the app shows as API, unless you send \`leadSource\`: \`intake\_form\` for a request made on your website (it reads as a website form lead, and automations set to start on a website form submission run for it) or \`manual\` for one a person took down, such as a phone call. For finer detail (a referral, a campaign), attach a tag (\`POST /v1/leads/{id}/tags/{tagId}\`). \`addressLat\` and \`addressLng\` pin the address where you already placed it on a map. With \`externalReference\`, your id is saved in the same request, and a duplicate fails the request with 409. At most 20 leads a minute per workspace. Send an \`Idempotency-Key\` to retry safely.\
> \
> Returns \[the lead object]\(<https://docs.shortcutco.com/developers/reference/objects/lead).\\>
> \
> \*\*Errors specific to this endpoint:\*\* \[\`already\_exists\`]\(<https://docs.shortcutco.com/developers/concepts/errors#already\\_exists>). Every endpoint can also return the \[common errors]\(<https://docs.shortcutco.com/developers/concepts/errors>).

```json
{"openapi":"3.1.0","info":{"title":"Shortcut API","version":"v1"},"tags":[{"name":"Leads","description":"A lead is a request for service. Creating one through the API works like your website form: staff are notified, and the lead appears in Customers with the Lead label.\n\nFields: [The lead object](https://docs.shortcutco.com/developers/reference/objects/lead)."}],"servers":[{"url":"https://api.shortcutco.com","description":"Production"}],"security":[{"bearerAuth":["leads:write"]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"scut_<env>_<id>_<secret>","description":"A workspace API token. Each operation lists the scopes it needs; `write` implies `read`, and `send`/`complete` are never implied."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Any string up to 255 characters. Retrying with the same key returns the first response instead of repeating the write, for 24 hours.","schema":{"type":"string","maxLength":255}}},"headers":{"RateLimitLimit":{"schema":{"type":"integer"},"description":"Requests allowed in the tightest window."},"RateLimitRemaining":{"schema":{"type":"integer"},"description":"Requests left in that window."},"RateLimitReset":{"schema":{"type":"integer"},"description":"Seconds until that window resets."}},"schemas":{"Lead":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The lead's id."},"object":{"type":"string","const":"lead","description":"Always `lead`."},"firstName":{"type":"string","description":"First name."},"lastName":{"type":"string","description":"Last name."},"companyName":{"type":["string","null"],"description":"Company name, when the lead is a business."},"email":{"type":["string","null"],"description":"Email address, or null when none is on file."},"phone":{"type":["string","null"],"description":"The primary phone number (where texts go) in E.164 form, such as `+14065550142`, or null."},"phones":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The number's id. Send it back to keep the number when replacing the list."},"number":{"type":"string","description":"The number as entered, such as `(406) 555-0142`."},"e164":{"type":["string","null"],"description":"The number in E.164 (`+14065550142`), or null when it cannot be read as a phone number (it is shown, never texted)."},"label":{"anyOf":[{"type":"string","enum":["mobile","home","work","other","custom"]},{"type":"null"}],"description":"`mobile`, `home`, `work`, `other`, or `custom` (see `customLabel`). Null for an unlabeled number."},"customLabel":{"type":["string","null"],"description":"The label when `label` is `custom`, such as `Spouse` or `Property manager`."},"isPrimary":{"type":"boolean","description":"Texts go to the primary number. Exactly one number is primary when the list is not empty; `phone` is its copy."},"smsConsentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When this number agreed to texts, ISO 8601 in UTC, when recorded. It never blocks or allows a text: opting out is a STOP text."},"smsConsentSource":{"anyOf":[{"type":"string","enum":["office_recorded","web_form","import","inbound_text"]},{"type":"null"}],"description":"How the consent was recorded."}},"required":["id","number","e164","label","customLabel","isPrimary","smsConsentAt","smsConsentSource"],"additionalProperties":false,"description":"One of the record's phone numbers."},"description":"Every phone number, primary first. For a lead linked to a customer, only the customer's primary number; read the customer (customers:read) for the rest."},"address":{"type":"string","description":"The service address."},"servicesRequested":{"type":"array","items":{"type":"string"},"description":"What the lead asked for."},"specialRequests":{"type":["string","null"],"description":"Anything else the lead said, or null."},"estimatedHours":{"type":["number","null"],"description":"The office's estimate of the work in hours, or null."},"sqFootage":{"type":["number","null"],"description":"Square footage typed in by hand, or null."},"status":{"type":"string","enum":["pending","dismissed","lost"],"description":"`pending` leads are open; `dismissed` leads were set aside; `lost` leads declined an estimate and reopen when a new estimate is sent or they submit the request form again."},"lifecycleStage":{"type":"string","enum":["lead","prospect","customer"],"description":"`lead` until an estimate is sent (`prospect`) or a job is booked (`customer`)."},"source":{"type":"string","enum":["intake_form","manual","csv","api"],"description":"How the lead arrived: `intake_form` for the website form, `manual` for leads added in the app, `csv` for an import, `api` for leads created with the API (leads it created before October 2026 read `manual`), unless the create set `leadSource` to `intake_form` or `manual`. New values may be added; treat an unknown one like `manual`."},"customerId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The customer account linked to the lead's email. It appears in the customers list and find_customer once it has a job or the lead converts. Null when the lead is not linked, for example when its email belongs to a staff member."},"propertyId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The lead's property (service address), when linked."},"lostReason":{"anyOf":[{"type":"string","enum":["price","timing","competitor","other"]},{"type":"null"}],"description":"Why the lead was lost, as a person marked it (`price`, `timing`, `competitor`, `other`); null unless `status` is `lost`."},"lostAt":{"anyOf":[{"type":"string","format":"date-time","description":"When the lead was marked lost, ISO 8601 in UTC."},{"type":"null"}],"description":"When the lead was marked lost, ISO 8601 in UTC."},"customerAt":{"anyOf":[{"type":"string","format":"date-time","description":"When the lead became a customer (a job was booked), ISO 8601 in UTC."},{"type":"null"}],"description":"When the lead became a customer (a job was booked), ISO 8601 in UTC."},"importedNotes":{"type":["string","null"],"description":"Notes that came in with the lead from another system (an import), as they were written there; null when none."},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The ids of the lead's tags."},"externalReferences":{"type":"array","items":{"$ref":"#/components/schemas/ExternalReference"},"description":"Ids this lead has in your other systems, set with `externalReference`, the external upsert, or a link."},"createdAt":{"type":"string","format":"date-time","description":"When the lead was created, ISO 8601 in UTC."},"updatedAt":{"type":"string","format":"date-time","description":"When the lead last changed, ISO 8601 in UTC."}},"required":["id","object","firstName","lastName","companyName","email","phone","phones","address","servicesRequested","specialRequests","estimatedHours","sqFootage","status","lifecycleStage","source","customerId","propertyId","lostReason","lostAt","customerAt","importedNotes","tagIds","externalReferences","createdAt","updatedAt"],"additionalProperties":false,"description":"A lead: someone who asked for service."},"ExternalReference":{"type":"object","properties":{"source":{"type":"string","description":"The system the id comes from."},"externalId":{"type":"string","description":"The object's id in that system."}},"required":["source","externalId"],"additionalProperties":false,"description":"An id this object has in another system."},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","description":"Error family, such as `invalid_request` or `permission`."},"code":{"type":"string","description":"Specific error code; see the errors page."},"message":{"type":"string","description":"A human-readable explanation."},"param":{"type":"string","description":"The input the error is about, such as `query.limit`."},"requiredScope":{"type":"string","description":"The scope the token is missing."},"requestId":{"type":"string","description":"Quote this id to support."},"docs":{"type":"string","description":"Link to the error's documentation."}},"required":["type","code","message","requestId","docs"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}},"responses":{"BadRequest":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthenticated":{"description":"The token is missing, invalid, expired, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"SubscriptionRequired":{"description":"The workspace's subscription needs attention.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The token is missing a required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such object in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"Conflict with the current state or an in-flight request with the same idempotency key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unprocessable":{"description":"The request cannot be applied, or its idempotency key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limited; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"Temporarily unavailable; retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/leads":{"post":{"operationId":"leads.create","tags":["Leads"],"summary":"Create a lead","description":"Creates a lead that behaves like one from the website form: staff are notified, and your new-lead automations run only if the token has `automations:trigger`. A new email gets a customer account and the address becomes its property; if the email belongs to an existing customer, the token also needs `customers:write`. Its `source` is `api`, which the app shows as API, unless you send `leadSource`: `intake_form` for a request made on your website (it reads as a website form lead, and automations set to start on a website form submission run for it) or `manual` for one a person took down, such as a phone call. For finer detail (a referral, a campaign), attach a tag (`POST /v1/leads/{id}/tags/{tagId}`). `addressLat` and `addressLng` pin the address where you already placed it on a map. With `externalReference`, your id is saved in the same request, and a duplicate fails the request with 409. At most 20 leads a minute per workspace. Send an `Idempotency-Key` to retry safely.\n\nReturns [the lead object](https://docs.shortcutco.com/developers/reference/objects/lead).\n\n**Errors specific to this endpoint:** [`already_exists`](https://docs.shortcutco.com/developers/concepts/errors#already_exists). Every endpoint can also return the [common errors](https://docs.shortcutco.com/developers/concepts/errors).","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":100,"description":"First name."},"lastName":{"type":"string","minLength":1,"maxLength":100,"description":"Last name."},"email":{"type":"string","format":"email","maxLength":254,"description":"Email address. Required: the app uses it to match the lead to an existing customer."},"phone":{"type":"string","maxLength":30,"description":"Phone number, such as `(406) 555-0142`. US numbers may omit the country code."},"companyName":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"description":"Company name, when the lead is a business."},"address":{"type":"string","minLength":1,"maxLength":300,"description":"The service address on one line, such as `412 Elm St, Bozeman, MT 59715`."},"addressLat":{"type":"number","minimum":-90,"maximum":90,"description":"The address's latitude, when you already placed it on a map. Send with `addressLng`; the lead and its property are pinned there instead of waiting to be placed."},"addressLng":{"type":"number","minimum":-180,"maximum":180,"description":"The address's longitude. Send with `addressLat`."},"servicesRequested":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"maxItems":50,"default":[],"description":"What the lead asked for, such as `Weekly mowing`. Duplicates are removed."},"specialRequests":{"type":"string","maxLength":2000,"description":"Anything else the lead said, shown on the lead in the app."},"leadSource":{"type":"string","enum":["api","intake_form","manual"],"description":"The lead's `source`: how it arrived, as the app shows it and reports and filters count it. `intake_form` for a request the customer made on your website, such as a quote form: it reads as a website form lead, and automations set to start on a website form submission run for it (with `automations:trigger`). `manual` for a lead a person took down, such as from a phone call or a walk-in: it reads Added by hand, and like one added in the app it is not badged New for staff. `api` (the default) otherwise. `csv` belongs to imports and cannot be set. Set when the lead is created; for finer detail, such as a referral or a campaign, attach a tag."},"phones":{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"number":{"type":"string","minLength":1,"maxLength":40},"label":{"anyOf":[{"type":"string","enum":["mobile","home","work","other","custom"]},{"type":"null"}]},"customLabel":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"isPrimary":{"type":"boolean"},"smsConsentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"smsConsentSource":{"anyOf":[{"type":"string","enum":["office_recorded","web_form","import","inbound_text"]},{"type":"null"}]}},"required":["number"],"additionalProperties":false,"description":"A number: `number` (required), `label`, `customLabel` (required with `label: custom`), `isPrimary`, and `id` to keep an existing number."},"maxItems":20,"description":"Every phone number, labeled. Send `phones` or `phone`, not both. When the email belongs to an existing customer, these numbers are added to the customer's (none is removed)."},"externalReference":{"type":"object","properties":{"source":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,63}$","description":"Your name for the system the id comes from, such as `hubspot` or `mywebsite`: 1-64 lowercase letters, digits, `_`, `.`, or `-`, starting with a letter or digit."},"externalId":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^\\p{Cc}\\s/\\\\]+$","description":"The object's id in that system: 1-255 characters, no spaces, slashes, or control characters."}},"required":["source","externalId"],"additionalProperties":false,"description":"Your id for this object. It is saved with the object in the same request; if another object already has it, nothing is created and the response is 409 `already_exists`."}},"required":["firstName","lastName","email","address"],"additionalProperties":false,"description":"A new lead."}}}},"responses":{"201":{"description":"Success.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Lead"},"meta":{"type":"object","properties":{},"additionalProperties":true,"description":"Facts about this request beside the object, such as `alreadyReminded` on a repeated reminder. Present only when there is something to report."}},"required":["data"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"$ref":"#/components/responses/SubscriptionRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}}}}
```

## Get a lead

> One lead, with why and when it was lost (\`lostReason\`, \`lostAt\`), when it became a customer, its tag ids, and notes imported with it.\
> \
> Returns \[the lead object]\(<https://docs.shortcutco.com/developers/reference/objects/lead>).

```json
{"openapi":"3.1.0","info":{"title":"Shortcut API","version":"v1"},"tags":[{"name":"Leads","description":"A lead is a request for service. Creating one through the API works like your website form: staff are notified, and the lead appears in Customers with the Lead label.\n\nFields: [The lead object](https://docs.shortcutco.com/developers/reference/objects/lead)."}],"servers":[{"url":"https://api.shortcutco.com","description":"Production"}],"security":[{"bearerAuth":["leads:read"]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"scut_<env>_<id>_<secret>","description":"A workspace API token. Each operation lists the scopes it needs; `write` implies `read`, and `send`/`complete` are never implied."}},"headers":{"RateLimitLimit":{"schema":{"type":"integer"},"description":"Requests allowed in the tightest window."},"RateLimitRemaining":{"schema":{"type":"integer"},"description":"Requests left in that window."},"RateLimitReset":{"schema":{"type":"integer"},"description":"Seconds until that window resets."}},"schemas":{"Lead":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The lead's id."},"object":{"type":"string","const":"lead","description":"Always `lead`."},"firstName":{"type":"string","description":"First name."},"lastName":{"type":"string","description":"Last name."},"companyName":{"type":["string","null"],"description":"Company name, when the lead is a business."},"email":{"type":["string","null"],"description":"Email address, or null when none is on file."},"phone":{"type":["string","null"],"description":"The primary phone number (where texts go) in E.164 form, such as `+14065550142`, or null."},"phones":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The number's id. Send it back to keep the number when replacing the list."},"number":{"type":"string","description":"The number as entered, such as `(406) 555-0142`."},"e164":{"type":["string","null"],"description":"The number in E.164 (`+14065550142`), or null when it cannot be read as a phone number (it is shown, never texted)."},"label":{"anyOf":[{"type":"string","enum":["mobile","home","work","other","custom"]},{"type":"null"}],"description":"`mobile`, `home`, `work`, `other`, or `custom` (see `customLabel`). Null for an unlabeled number."},"customLabel":{"type":["string","null"],"description":"The label when `label` is `custom`, such as `Spouse` or `Property manager`."},"isPrimary":{"type":"boolean","description":"Texts go to the primary number. Exactly one number is primary when the list is not empty; `phone` is its copy."},"smsConsentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When this number agreed to texts, ISO 8601 in UTC, when recorded. It never blocks or allows a text: opting out is a STOP text."},"smsConsentSource":{"anyOf":[{"type":"string","enum":["office_recorded","web_form","import","inbound_text"]},{"type":"null"}],"description":"How the consent was recorded."}},"required":["id","number","e164","label","customLabel","isPrimary","smsConsentAt","smsConsentSource"],"additionalProperties":false,"description":"One of the record's phone numbers."},"description":"Every phone number, primary first. For a lead linked to a customer, only the customer's primary number; read the customer (customers:read) for the rest."},"address":{"type":"string","description":"The service address."},"servicesRequested":{"type":"array","items":{"type":"string"},"description":"What the lead asked for."},"specialRequests":{"type":["string","null"],"description":"Anything else the lead said, or null."},"estimatedHours":{"type":["number","null"],"description":"The office's estimate of the work in hours, or null."},"sqFootage":{"type":["number","null"],"description":"Square footage typed in by hand, or null."},"status":{"type":"string","enum":["pending","dismissed","lost"],"description":"`pending` leads are open; `dismissed` leads were set aside; `lost` leads declined an estimate and reopen when a new estimate is sent or they submit the request form again."},"lifecycleStage":{"type":"string","enum":["lead","prospect","customer"],"description":"`lead` until an estimate is sent (`prospect`) or a job is booked (`customer`)."},"source":{"type":"string","enum":["intake_form","manual","csv","api"],"description":"How the lead arrived: `intake_form` for the website form, `manual` for leads added in the app, `csv` for an import, `api` for leads created with the API (leads it created before October 2026 read `manual`), unless the create set `leadSource` to `intake_form` or `manual`. New values may be added; treat an unknown one like `manual`."},"customerId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The customer account linked to the lead's email. It appears in the customers list and find_customer once it has a job or the lead converts. Null when the lead is not linked, for example when its email belongs to a staff member."},"propertyId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The lead's property (service address), when linked."},"lostReason":{"anyOf":[{"type":"string","enum":["price","timing","competitor","other"]},{"type":"null"}],"description":"Why the lead was lost, as a person marked it (`price`, `timing`, `competitor`, `other`); null unless `status` is `lost`."},"lostAt":{"anyOf":[{"type":"string","format":"date-time","description":"When the lead was marked lost, ISO 8601 in UTC."},{"type":"null"}],"description":"When the lead was marked lost, ISO 8601 in UTC."},"customerAt":{"anyOf":[{"type":"string","format":"date-time","description":"When the lead became a customer (a job was booked), ISO 8601 in UTC."},{"type":"null"}],"description":"When the lead became a customer (a job was booked), ISO 8601 in UTC."},"importedNotes":{"type":["string","null"],"description":"Notes that came in with the lead from another system (an import), as they were written there; null when none."},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The ids of the lead's tags."},"externalReferences":{"type":"array","items":{"$ref":"#/components/schemas/ExternalReference"},"description":"Ids this lead has in your other systems, set with `externalReference`, the external upsert, or a link."},"createdAt":{"type":"string","format":"date-time","description":"When the lead was created, ISO 8601 in UTC."},"updatedAt":{"type":"string","format":"date-time","description":"When the lead last changed, ISO 8601 in UTC."}},"required":["id","object","firstName","lastName","companyName","email","phone","phones","address","servicesRequested","specialRequests","estimatedHours","sqFootage","status","lifecycleStage","source","customerId","propertyId","lostReason","lostAt","customerAt","importedNotes","tagIds","externalReferences","createdAt","updatedAt"],"additionalProperties":false,"description":"A lead: someone who asked for service."},"ExternalReference":{"type":"object","properties":{"source":{"type":"string","description":"The system the id comes from."},"externalId":{"type":"string","description":"The object's id in that system."}},"required":["source","externalId"],"additionalProperties":false,"description":"An id this object has in another system."},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","description":"Error family, such as `invalid_request` or `permission`."},"code":{"type":"string","description":"Specific error code; see the errors page."},"message":{"type":"string","description":"A human-readable explanation."},"param":{"type":"string","description":"The input the error is about, such as `query.limit`."},"requiredScope":{"type":"string","description":"The scope the token is missing."},"requestId":{"type":"string","description":"Quote this id to support."},"docs":{"type":"string","description":"Link to the error's documentation."}},"required":["type","code","message","requestId","docs"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}},"responses":{"BadRequest":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthenticated":{"description":"The token is missing, invalid, expired, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"SubscriptionRequired":{"description":"The workspace's subscription needs attention.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The token is missing a required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such object in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limited; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"Temporarily unavailable; retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/leads/{id}":{"get":{"operationId":"leads.get","tags":["Leads"],"summary":"Get a lead","description":"One lead, with why and when it was lost (`lostReason`, `lostAt`), when it became a customer, its tag ids, and notes imported with it.\n\nReturns [the lead object](https://docs.shortcutco.com/developers/reference/objects/lead).","parameters":[{"name":"id","in":"path","required":true,"description":"The object's id.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Lead"},"meta":{"type":"object","properties":{},"additionalProperties":true,"description":"Facts about this request beside the object, such as `alreadyReminded` on a repeated reminder. Present only when there is something to report."}},"required":["data"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"$ref":"#/components/responses/SubscriptionRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}}}}
```

## Update a lead

> Changes a lead's contact details, address, hours estimate, square footage, or what it asked for (\`servicesRequested\`, \`specialRequests\`), as editing the lead's profile in the app does. Send only the fields to change. A changed address needs \`addressLat\` and \`addressLng\`. Moving the address to another spot clears the lead's property map, its measurements, and a square footage taken from that map: the request is refused with \`409 property\_map\_would\_clear\` unless it sends \`confirmClearPropertyMap: true\`, and \`meta.effects\` lists what was cleared. Changing the square footage of a lead linked to a customer's property, or moving such a lead's address, also needs \`customers:write\`, as does giving an unlinked lead the email of an existing customer. Changing the email does not move the lead to another customer account.\
> \
> Returns \[the lead object]\(<https://docs.shortcutco.com/developers/reference/objects/lead).\\>
> \
> \*\*Errors specific to this endpoint:\*\* \[\`property\_map\_would\_clear\`]\(<https://docs.shortcutco.com/developers/concepts/errors#property\\_map\\_would\\_clear>). Every endpoint can also return the \[common errors]\(<https://docs.shortcutco.com/developers/concepts/errors>).

```json
{"openapi":"3.1.0","info":{"title":"Shortcut API","version":"v1"},"tags":[{"name":"Leads","description":"A lead is a request for service. Creating one through the API works like your website form: staff are notified, and the lead appears in Customers with the Lead label.\n\nFields: [The lead object](https://docs.shortcutco.com/developers/reference/objects/lead)."}],"servers":[{"url":"https://api.shortcutco.com","description":"Production"}],"security":[{"bearerAuth":["leads:write"]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"scut_<env>_<id>_<secret>","description":"A workspace API token. Each operation lists the scopes it needs; `write` implies `read`, and `send`/`complete` are never implied."}},"headers":{"RateLimitLimit":{"schema":{"type":"integer"},"description":"Requests allowed in the tightest window."},"RateLimitRemaining":{"schema":{"type":"integer"},"description":"Requests left in that window."},"RateLimitReset":{"schema":{"type":"integer"},"description":"Seconds until that window resets."}},"schemas":{"Lead":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The lead's id."},"object":{"type":"string","const":"lead","description":"Always `lead`."},"firstName":{"type":"string","description":"First name."},"lastName":{"type":"string","description":"Last name."},"companyName":{"type":["string","null"],"description":"Company name, when the lead is a business."},"email":{"type":["string","null"],"description":"Email address, or null when none is on file."},"phone":{"type":["string","null"],"description":"The primary phone number (where texts go) in E.164 form, such as `+14065550142`, or null."},"phones":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The number's id. Send it back to keep the number when replacing the list."},"number":{"type":"string","description":"The number as entered, such as `(406) 555-0142`."},"e164":{"type":["string","null"],"description":"The number in E.164 (`+14065550142`), or null when it cannot be read as a phone number (it is shown, never texted)."},"label":{"anyOf":[{"type":"string","enum":["mobile","home","work","other","custom"]},{"type":"null"}],"description":"`mobile`, `home`, `work`, `other`, or `custom` (see `customLabel`). Null for an unlabeled number."},"customLabel":{"type":["string","null"],"description":"The label when `label` is `custom`, such as `Spouse` or `Property manager`."},"isPrimary":{"type":"boolean","description":"Texts go to the primary number. Exactly one number is primary when the list is not empty; `phone` is its copy."},"smsConsentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When this number agreed to texts, ISO 8601 in UTC, when recorded. It never blocks or allows a text: opting out is a STOP text."},"smsConsentSource":{"anyOf":[{"type":"string","enum":["office_recorded","web_form","import","inbound_text"]},{"type":"null"}],"description":"How the consent was recorded."}},"required":["id","number","e164","label","customLabel","isPrimary","smsConsentAt","smsConsentSource"],"additionalProperties":false,"description":"One of the record's phone numbers."},"description":"Every phone number, primary first. For a lead linked to a customer, only the customer's primary number; read the customer (customers:read) for the rest."},"address":{"type":"string","description":"The service address."},"servicesRequested":{"type":"array","items":{"type":"string"},"description":"What the lead asked for."},"specialRequests":{"type":["string","null"],"description":"Anything else the lead said, or null."},"estimatedHours":{"type":["number","null"],"description":"The office's estimate of the work in hours, or null."},"sqFootage":{"type":["number","null"],"description":"Square footage typed in by hand, or null."},"status":{"type":"string","enum":["pending","dismissed","lost"],"description":"`pending` leads are open; `dismissed` leads were set aside; `lost` leads declined an estimate and reopen when a new estimate is sent or they submit the request form again."},"lifecycleStage":{"type":"string","enum":["lead","prospect","customer"],"description":"`lead` until an estimate is sent (`prospect`) or a job is booked (`customer`)."},"source":{"type":"string","enum":["intake_form","manual","csv","api"],"description":"How the lead arrived: `intake_form` for the website form, `manual` for leads added in the app, `csv` for an import, `api` for leads created with the API (leads it created before October 2026 read `manual`), unless the create set `leadSource` to `intake_form` or `manual`. New values may be added; treat an unknown one like `manual`."},"customerId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The customer account linked to the lead's email. It appears in the customers list and find_customer once it has a job or the lead converts. Null when the lead is not linked, for example when its email belongs to a staff member."},"propertyId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The lead's property (service address), when linked."},"lostReason":{"anyOf":[{"type":"string","enum":["price","timing","competitor","other"]},{"type":"null"}],"description":"Why the lead was lost, as a person marked it (`price`, `timing`, `competitor`, `other`); null unless `status` is `lost`."},"lostAt":{"anyOf":[{"type":"string","format":"date-time","description":"When the lead was marked lost, ISO 8601 in UTC."},{"type":"null"}],"description":"When the lead was marked lost, ISO 8601 in UTC."},"customerAt":{"anyOf":[{"type":"string","format":"date-time","description":"When the lead became a customer (a job was booked), ISO 8601 in UTC."},{"type":"null"}],"description":"When the lead became a customer (a job was booked), ISO 8601 in UTC."},"importedNotes":{"type":["string","null"],"description":"Notes that came in with the lead from another system (an import), as they were written there; null when none."},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The ids of the lead's tags."},"externalReferences":{"type":"array","items":{"$ref":"#/components/schemas/ExternalReference"},"description":"Ids this lead has in your other systems, set with `externalReference`, the external upsert, or a link."},"createdAt":{"type":"string","format":"date-time","description":"When the lead was created, ISO 8601 in UTC."},"updatedAt":{"type":"string","format":"date-time","description":"When the lead last changed, ISO 8601 in UTC."}},"required":["id","object","firstName","lastName","companyName","email","phone","phones","address","servicesRequested","specialRequests","estimatedHours","sqFootage","status","lifecycleStage","source","customerId","propertyId","lostReason","lostAt","customerAt","importedNotes","tagIds","externalReferences","createdAt","updatedAt"],"additionalProperties":false,"description":"A lead: someone who asked for service."},"ExternalReference":{"type":"object","properties":{"source":{"type":"string","description":"The system the id comes from."},"externalId":{"type":"string","description":"The object's id in that system."}},"required":["source","externalId"],"additionalProperties":false,"description":"An id this object has in another system."},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","description":"Error family, such as `invalid_request` or `permission`."},"code":{"type":"string","description":"Specific error code; see the errors page."},"message":{"type":"string","description":"A human-readable explanation."},"param":{"type":"string","description":"The input the error is about, such as `query.limit`."},"requiredScope":{"type":"string","description":"The scope the token is missing."},"requestId":{"type":"string","description":"Quote this id to support."},"docs":{"type":"string","description":"Link to the error's documentation."}},"required":["type","code","message","requestId","docs"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}},"responses":{"BadRequest":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthenticated":{"description":"The token is missing, invalid, expired, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"SubscriptionRequired":{"description":"The workspace's subscription needs attention.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The token is missing a required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such object in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"Conflict with the current state or an in-flight request with the same idempotency key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unprocessable":{"description":"The request cannot be applied, or its idempotency key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limited; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"Temporarily unavailable; retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/leads/{id}":{"patch":{"operationId":"leads.update","tags":["Leads"],"summary":"Update a lead","description":"Changes a lead's contact details, address, hours estimate, square footage, or what it asked for (`servicesRequested`, `specialRequests`), as editing the lead's profile in the app does. Send only the fields to change. A changed address needs `addressLat` and `addressLng`. Moving the address to another spot clears the lead's property map, its measurements, and a square footage taken from that map: the request is refused with `409 property_map_would_clear` unless it sends `confirmClearPropertyMap: true`, and `meta.effects` lists what was cleared. Changing the square footage of a lead linked to a customer's property, or moving such a lead's address, also needs `customers:write`, as does giving an unlinked lead the email of an existing customer. Changing the email does not move the lead to another customer account.\n\nReturns [the lead object](https://docs.shortcutco.com/developers/reference/objects/lead).\n\n**Errors specific to this endpoint:** [`property_map_would_clear`](https://docs.shortcutco.com/developers/concepts/errors#property_map_would_clear). Every endpoint can also return the [common errors](https://docs.shortcutco.com/developers/concepts/errors).","parameters":[{"name":"id","in":"path","required":true,"description":"The object's id.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":100,"description":"First name."},"lastName":{"type":"string","minLength":1,"maxLength":100,"description":"Last name."},"companyName":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"description":"Company name, when the lead is a business. `null` clears it."},"email":{"type":"string","format":"email","maxLength":254,"description":"Email address. Changing it does not move the lead to another customer account; `customerId` stays as it is."},"phone":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"description":"The primary phone number, such as `(406) 555-0142`. US numbers may omit the country code. `null` clears it. For a lead linked to a customer this is the customer's primary number, which needs the customers:write scope."},"phones":{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"number":{"type":"string","minLength":1,"maxLength":40},"label":{"anyOf":[{"type":"string","enum":["mobile","home","work","other","custom"]},{"type":"null"}]},"customLabel":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"isPrimary":{"type":"boolean"},"smsConsentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"smsConsentSource":{"anyOf":[{"type":"string","enum":["office_recorded","web_form","import","inbound_text"]},{"type":"null"}]}},"required":["number"],"additionalProperties":false,"description":"A number: `number` (required), `label`, `customLabel` (required with `label: custom`), `isPrimary`, and `id` to keep an existing number."},"maxItems":20,"description":"The whole list of phone numbers; it replaces the current one. For a lead linked to a customer these are the customer's numbers, which needs the customers:write scope. Send `phones` or `phone`, not both."},"address":{"type":"string","minLength":1,"maxLength":300,"description":"The service address on one line. A changed address needs `addressLat` and `addressLng`, which place it on the map. Moving it to another spot clears the lead's property map, its measurements, and a square footage taken from that map; send `confirmClearPropertyMap: true` to allow that."},"addressLat":{"type":"number","minimum":-90,"maximum":90,"description":"The address's latitude. Only with `address`."},"addressLng":{"type":"number","minimum":-180,"maximum":180,"description":"The address's longitude. Only with `address`."},"estimatedHours":{"anyOf":[{"type":"number","minimum":0,"maximum":10000},{"type":"null"}],"description":"The office's estimate of the work in hours. `null` clears it."},"sqFootage":{"anyOf":[{"type":"number","minimum":0,"maximum":100000000},{"type":"null"}],"description":"Square footage typed in by hand. `null` clears it, so a reviewed measurement of the property, if any, applies again. When the lead is linked to a customer's property, the property's square footage changes too, which needs `customers:write`."},"servicesRequested":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"maxItems":50,"description":"What the lead asked for; it replaces the current list, and `[]` empties it. Duplicates are removed."},"specialRequests":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"description":"Anything else the lead said, shown on the lead in the app. `null` or an empty string clears it."},"confirmClearPropertyMap":{"type":"boolean","description":"Set `true` to allow an address change that clears the lead's property map, measurements, or measured square footage. Without it such a change is refused with `property_map_would_clear` and nothing changes."}},"additionalProperties":false,"description":"Changes to a lead."}}}},"responses":{"200":{"description":"Success.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Lead"},"meta":{"type":"object","properties":{},"additionalProperties":true,"description":"Facts about this request beside the object, such as `alreadyReminded` on a repeated reminder. Present only when there is something to report."}},"required":["data"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"$ref":"#/components/responses/SubscriptionRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}}}}
```

## Read a lead's recorded contact restrictions

> Current-phone and explicitly lead-linked conversation opt-out facts, category-specific email choices and stored email suppression kinds. Works before a lead has a customer record. These facts do not establish consent or sendability; Inbox blocks remain person-sensitive internal reads.\
> \
> Returns \[the contact preferences object]\(<https://docs.shortcutco.com/developers/reference/objects/contact-preferences>).

```json
{"openapi":"3.1.0","info":{"title":"Shortcut API","version":"v1"},"tags":[{"name":"Leads","description":"A lead is a request for service. Creating one through the API works like your website form: staff are notified, and the lead appears in Customers with the Lead label.\n\nFields: [The lead object](https://docs.shortcutco.com/developers/reference/objects/lead)."}],"servers":[{"url":"https://api.shortcutco.com","description":"Production"}],"security":[{"bearerAuth":["leads:read"]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"scut_<env>_<id>_<secret>","description":"A workspace API token. Each operation lists the scopes it needs; `write` implies `read`, and `send`/`complete` are never implied."}},"headers":{"RateLimitLimit":{"schema":{"type":"integer"},"description":"Requests allowed in the tightest window."},"RateLimitRemaining":{"schema":{"type":"integer"},"description":"Requests left in that window."},"RateLimitReset":{"schema":{"type":"integer"},"description":"Seconds until that window resets."}},"schemas":{"LeadContactPreferences":{"type":"object","properties":{"object":{"type":"string","const":"contact_preferences","description":"Always `contact_preferences`."},"textsOptedOut":{"type":"boolean","description":"Legacy linked-conversation opt-out flag. It may concern an older phone; compare textOptOutSources.currentPhone before interpreting the current number."},"textOptOutSources":{"type":"object","properties":{"currentPhone":{"anyOf":[{"type":"object","properties":{"optedOut":{"type":"boolean","description":"The stored opt-out flag; absence of an opt-out is not proof of consent or sendability."},"optedOutAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Latest recorded time for an active opt-out; null if no active dated opt-out is stored."},"phone":{"type":"string"}},"required":["optedOut","optedOutAt","phone"],"additionalProperties":false},{"type":"null"}],"description":"The normalized phone currently on this record and that phone's company-specific opt-out. Null when no usable phone is stored."},"linkedConversations":{"type":"object","properties":{"optedOut":{"type":"boolean","description":"The stored opt-out flag; absence of an opt-out is not proof of consent or sendability."},"optedOutAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Latest recorded time for an active opt-out; null if no active dated opt-out is stored."}},"required":["optedOut","optedOutAt"],"additionalProperties":false,"description":"An active opt-out on a conversation explicitly linked to this lead, or to this customer/its leads for a customer read. It can concern an older phone."},"sourcesDiffer":{"type":["boolean","null"],"description":"Whether current-phone and linked-conversation flags disagree; null without a usable current phone."},"phones":{"type":"array","items":{"type":"object","properties":{"optedOut":{"type":"boolean","description":"The stored opt-out flag; absence of an opt-out is not proof of consent or sendability."},"optedOutAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Latest recorded time for an active opt-out; null if no active dated opt-out is stored."},"phone":{"type":"string","description":"The number in E.164."},"label":{"type":"string","description":"Its label: `Mobile`, `Spouse`, `Phone`..."},"isPrimary":{"type":"boolean","description":"Texts go to the primary number."}},"required":["optedOut","optedOutAt","phone","label","isPrimary"],"additionalProperties":false},"description":"Every listed number that can be texted, primary first, each with its own opt-out: STOP from one number never blocks another."}},"required":["currentPhone","linkedConversations","sourcesDiffer","phones"],"additionalProperties":false},"emailSuppressionKinds":{"type":"array","items":{"type":"string","enum":["complaint","hard_bounce"]},"description":"Stored company-specific badges for the current email address, separate from category choices. Hard bounce is a recorded delivery fact, not a new universal hold. No kind present is not proof an email can be sent."},"email":{"type":["string","null"],"description":"The address emails go to; null when there is none that can get mail."},"billingEmail":{"type":"string","enum":["enabled","disabled","unspecified"],"description":"Invoices and receipts: `disabled` means they asked not to get them."},"serviceEmail":{"type":"string","enum":["enabled","disabled","unspecified"],"description":"Visit reminders and service updates."},"marketingEmail":{"type":"string","enum":["enabled","disabled","unspecified"],"description":"Promotions; only the customer can turn these on."},"leadId":{"type":"string","format":"uuid","description":"The lead whose current contact fields and explicitly linked conversations were read."}},"required":["object","textsOptedOut","textOptOutSources","emailSuppressionKinds","email","billingEmail","serviceEmail","marketingEmail","leadId"],"additionalProperties":false,"description":"How a customer can be reached, and what they asked not to get."},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","description":"Error family, such as `invalid_request` or `permission`."},"code":{"type":"string","description":"Specific error code; see the errors page."},"message":{"type":"string","description":"A human-readable explanation."},"param":{"type":"string","description":"The input the error is about, such as `query.limit`."},"requiredScope":{"type":"string","description":"The scope the token is missing."},"requestId":{"type":"string","description":"Quote this id to support."},"docs":{"type":"string","description":"Link to the error's documentation."}},"required":["type","code","message","requestId","docs"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}},"responses":{"BadRequest":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthenticated":{"description":"The token is missing, invalid, expired, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"SubscriptionRequired":{"description":"The workspace's subscription needs attention.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The token is missing a required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such object in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limited; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"Temporarily unavailable; retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/leads/{id}/contact-preferences":{"get":{"operationId":"leads.contact_preferences.get","tags":["Leads"],"summary":"Read a lead's recorded contact restrictions","description":"Current-phone and explicitly lead-linked conversation opt-out facts, category-specific email choices and stored email suppression kinds. Works before a lead has a customer record. These facts do not establish consent or sendability; Inbox blocks remain person-sensitive internal reads.\n\nReturns [the contact preferences object](https://docs.shortcutco.com/developers/reference/objects/contact-preferences).","parameters":[{"name":"id","in":"path","required":true,"description":"The object's id.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/LeadContactPreferences"},"meta":{"type":"object","properties":{},"additionalProperties":true,"description":"Facts about this request beside the object, such as `alreadyReminded` on a repeated reminder. Present only when there is something to report."}},"required":["data"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"$ref":"#/components/responses/SubscriptionRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}}}}
```

## Dismiss a lead

> Sets a lead aside, as Dismiss does in the app: its status becomes \`dismissed\`. Dismissing a dismissed lead changes nothing and returns it as it is. Undo with restore. A lead that stands for a customer (at the customer stage, or linked to an active customer account) is refused with \`409 lead\_is\_customer\`; manage the customer instead. If the token has \`automations:trigger\`, the workspace's automations may react to a dismissed lead, for example by emailing or texting it, as they do when staff dismiss one in the app.\
> \
> Returns \[the lead object]\(<https://docs.shortcutco.com/developers/reference/objects/lead).\\>
> \
> \*\*Errors specific to this endpoint:\*\* \[\`lead\_is\_customer\`]\(<https://docs.shortcutco.com/developers/concepts/errors#lead\\_is\\_customer>). Every endpoint can also return the \[common errors]\(<https://docs.shortcutco.com/developers/concepts/errors>).

```json
{"openapi":"3.1.0","info":{"title":"Shortcut API","version":"v1"},"tags":[{"name":"Leads","description":"A lead is a request for service. Creating one through the API works like your website form: staff are notified, and the lead appears in Customers with the Lead label.\n\nFields: [The lead object](https://docs.shortcutco.com/developers/reference/objects/lead)."}],"servers":[{"url":"https://api.shortcutco.com","description":"Production"}],"security":[{"bearerAuth":["leads:write"]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"scut_<env>_<id>_<secret>","description":"A workspace API token. Each operation lists the scopes it needs; `write` implies `read`, and `send`/`complete` are never implied."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Any string up to 255 characters. Retrying with the same key returns the first response instead of repeating the write, for 24 hours.","schema":{"type":"string","maxLength":255}}},"headers":{"RateLimitLimit":{"schema":{"type":"integer"},"description":"Requests allowed in the tightest window."},"RateLimitRemaining":{"schema":{"type":"integer"},"description":"Requests left in that window."},"RateLimitReset":{"schema":{"type":"integer"},"description":"Seconds until that window resets."}},"schemas":{"Lead":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The lead's id."},"object":{"type":"string","const":"lead","description":"Always `lead`."},"firstName":{"type":"string","description":"First name."},"lastName":{"type":"string","description":"Last name."},"companyName":{"type":["string","null"],"description":"Company name, when the lead is a business."},"email":{"type":["string","null"],"description":"Email address, or null when none is on file."},"phone":{"type":["string","null"],"description":"The primary phone number (where texts go) in E.164 form, such as `+14065550142`, or null."},"phones":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The number's id. Send it back to keep the number when replacing the list."},"number":{"type":"string","description":"The number as entered, such as `(406) 555-0142`."},"e164":{"type":["string","null"],"description":"The number in E.164 (`+14065550142`), or null when it cannot be read as a phone number (it is shown, never texted)."},"label":{"anyOf":[{"type":"string","enum":["mobile","home","work","other","custom"]},{"type":"null"}],"description":"`mobile`, `home`, `work`, `other`, or `custom` (see `customLabel`). Null for an unlabeled number."},"customLabel":{"type":["string","null"],"description":"The label when `label` is `custom`, such as `Spouse` or `Property manager`."},"isPrimary":{"type":"boolean","description":"Texts go to the primary number. Exactly one number is primary when the list is not empty; `phone` is its copy."},"smsConsentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When this number agreed to texts, ISO 8601 in UTC, when recorded. It never blocks or allows a text: opting out is a STOP text."},"smsConsentSource":{"anyOf":[{"type":"string","enum":["office_recorded","web_form","import","inbound_text"]},{"type":"null"}],"description":"How the consent was recorded."}},"required":["id","number","e164","label","customLabel","isPrimary","smsConsentAt","smsConsentSource"],"additionalProperties":false,"description":"One of the record's phone numbers."},"description":"Every phone number, primary first. For a lead linked to a customer, only the customer's primary number; read the customer (customers:read) for the rest."},"address":{"type":"string","description":"The service address."},"servicesRequested":{"type":"array","items":{"type":"string"},"description":"What the lead asked for."},"specialRequests":{"type":["string","null"],"description":"Anything else the lead said, or null."},"estimatedHours":{"type":["number","null"],"description":"The office's estimate of the work in hours, or null."},"sqFootage":{"type":["number","null"],"description":"Square footage typed in by hand, or null."},"status":{"type":"string","enum":["pending","dismissed","lost"],"description":"`pending` leads are open; `dismissed` leads were set aside; `lost` leads declined an estimate and reopen when a new estimate is sent or they submit the request form again."},"lifecycleStage":{"type":"string","enum":["lead","prospect","customer"],"description":"`lead` until an estimate is sent (`prospect`) or a job is booked (`customer`)."},"source":{"type":"string","enum":["intake_form","manual","csv","api"],"description":"How the lead arrived: `intake_form` for the website form, `manual` for leads added in the app, `csv` for an import, `api` for leads created with the API (leads it created before October 2026 read `manual`), unless the create set `leadSource` to `intake_form` or `manual`. New values may be added; treat an unknown one like `manual`."},"customerId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The customer account linked to the lead's email. It appears in the customers list and find_customer once it has a job or the lead converts. Null when the lead is not linked, for example when its email belongs to a staff member."},"propertyId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The lead's property (service address), when linked."},"lostReason":{"anyOf":[{"type":"string","enum":["price","timing","competitor","other"]},{"type":"null"}],"description":"Why the lead was lost, as a person marked it (`price`, `timing`, `competitor`, `other`); null unless `status` is `lost`."},"lostAt":{"anyOf":[{"type":"string","format":"date-time","description":"When the lead was marked lost, ISO 8601 in UTC."},{"type":"null"}],"description":"When the lead was marked lost, ISO 8601 in UTC."},"customerAt":{"anyOf":[{"type":"string","format":"date-time","description":"When the lead became a customer (a job was booked), ISO 8601 in UTC."},{"type":"null"}],"description":"When the lead became a customer (a job was booked), ISO 8601 in UTC."},"importedNotes":{"type":["string","null"],"description":"Notes that came in with the lead from another system (an import), as they were written there; null when none."},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The ids of the lead's tags."},"externalReferences":{"type":"array","items":{"$ref":"#/components/schemas/ExternalReference"},"description":"Ids this lead has in your other systems, set with `externalReference`, the external upsert, or a link."},"createdAt":{"type":"string","format":"date-time","description":"When the lead was created, ISO 8601 in UTC."},"updatedAt":{"type":"string","format":"date-time","description":"When the lead last changed, ISO 8601 in UTC."}},"required":["id","object","firstName","lastName","companyName","email","phone","phones","address","servicesRequested","specialRequests","estimatedHours","sqFootage","status","lifecycleStage","source","customerId","propertyId","lostReason","lostAt","customerAt","importedNotes","tagIds","externalReferences","createdAt","updatedAt"],"additionalProperties":false,"description":"A lead: someone who asked for service."},"ExternalReference":{"type":"object","properties":{"source":{"type":"string","description":"The system the id comes from."},"externalId":{"type":"string","description":"The object's id in that system."}},"required":["source","externalId"],"additionalProperties":false,"description":"An id this object has in another system."},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","description":"Error family, such as `invalid_request` or `permission`."},"code":{"type":"string","description":"Specific error code; see the errors page."},"message":{"type":"string","description":"A human-readable explanation."},"param":{"type":"string","description":"The input the error is about, such as `query.limit`."},"requiredScope":{"type":"string","description":"The scope the token is missing."},"requestId":{"type":"string","description":"Quote this id to support."},"docs":{"type":"string","description":"Link to the error's documentation."}},"required":["type","code","message","requestId","docs"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}},"responses":{"BadRequest":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthenticated":{"description":"The token is missing, invalid, expired, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"SubscriptionRequired":{"description":"The workspace's subscription needs attention.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The token is missing a required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such object in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"Conflict with the current state or an in-flight request with the same idempotency key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unprocessable":{"description":"The request cannot be applied, or its idempotency key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limited; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"Temporarily unavailable; retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/leads/{id}/dismiss":{"post":{"operationId":"leads.dismiss","tags":["Leads"],"summary":"Dismiss a lead","description":"Sets a lead aside, as Dismiss does in the app: its status becomes `dismissed`. Dismissing a dismissed lead changes nothing and returns it as it is. Undo with restore. A lead that stands for a customer (at the customer stage, or linked to an active customer account) is refused with `409 lead_is_customer`; manage the customer instead. If the token has `automations:trigger`, the workspace's automations may react to a dismissed lead, for example by emailing or texting it, as they do when staff dismiss one in the app.\n\nReturns [the lead object](https://docs.shortcutco.com/developers/reference/objects/lead).\n\n**Errors specific to this endpoint:** [`lead_is_customer`](https://docs.shortcutco.com/developers/concepts/errors#lead_is_customer). Every endpoint can also return the [common errors](https://docs.shortcutco.com/developers/concepts/errors).","parameters":[{"name":"id","in":"path","required":true,"description":"The object's id.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Lead"},"meta":{"type":"object","properties":{},"additionalProperties":true,"description":"Facts about this request beside the object, such as `alreadyReminded` on a repeated reminder. Present only when there is something to report."}},"required":["data"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"$ref":"#/components/responses/SubscriptionRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}}}}
```

## Link a lead to your id

> Records \`externalId\` as this lead's id in \`source\`, so the external lookup and upsert find it. Linking is always explicit; the API never matches a lead to your id by email or address. Repeating the same link changes nothing. If the id already belongs to another lead, or this lead already has a different id in \`source\`, the request fails with 409 and nothing changes.\
> \
> Returns \[the lead object]\(<https://docs.shortcutco.com/developers/reference/objects/lead).\\>
> \
> \*\*Errors specific to this endpoint:\*\* \[\`already\_exists\`]\(<https://docs.shortcutco.com/developers/concepts/errors#already\\_exists>), \[\`external\_reference\_exists\`]\(<https://docs.shortcutco.com/developers/concepts/errors#external\\_reference\\_exists>). Every endpoint can also return the \[common errors]\(<https://docs.shortcutco.com/developers/concepts/errors>).

```json
{"openapi":"3.1.0","info":{"title":"Shortcut API","version":"v1"},"tags":[{"name":"Leads","description":"A lead is a request for service. Creating one through the API works like your website form: staff are notified, and the lead appears in Customers with the Lead label.\n\nFields: [The lead object](https://docs.shortcutco.com/developers/reference/objects/lead)."}],"servers":[{"url":"https://api.shortcutco.com","description":"Production"}],"security":[{"bearerAuth":["leads:write"]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"scut_<env>_<id>_<secret>","description":"A workspace API token. Each operation lists the scopes it needs; `write` implies `read`, and `send`/`complete` are never implied."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Any string up to 255 characters. Retrying with the same key returns the first response instead of repeating the write, for 24 hours.","schema":{"type":"string","maxLength":255}}},"headers":{"RateLimitLimit":{"schema":{"type":"integer"},"description":"Requests allowed in the tightest window."},"RateLimitRemaining":{"schema":{"type":"integer"},"description":"Requests left in that window."},"RateLimitReset":{"schema":{"type":"integer"},"description":"Seconds until that window resets."}},"schemas":{"Lead":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The lead's id."},"object":{"type":"string","const":"lead","description":"Always `lead`."},"firstName":{"type":"string","description":"First name."},"lastName":{"type":"string","description":"Last name."},"companyName":{"type":["string","null"],"description":"Company name, when the lead is a business."},"email":{"type":["string","null"],"description":"Email address, or null when none is on file."},"phone":{"type":["string","null"],"description":"The primary phone number (where texts go) in E.164 form, such as `+14065550142`, or null."},"phones":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The number's id. Send it back to keep the number when replacing the list."},"number":{"type":"string","description":"The number as entered, such as `(406) 555-0142`."},"e164":{"type":["string","null"],"description":"The number in E.164 (`+14065550142`), or null when it cannot be read as a phone number (it is shown, never texted)."},"label":{"anyOf":[{"type":"string","enum":["mobile","home","work","other","custom"]},{"type":"null"}],"description":"`mobile`, `home`, `work`, `other`, or `custom` (see `customLabel`). Null for an unlabeled number."},"customLabel":{"type":["string","null"],"description":"The label when `label` is `custom`, such as `Spouse` or `Property manager`."},"isPrimary":{"type":"boolean","description":"Texts go to the primary number. Exactly one number is primary when the list is not empty; `phone` is its copy."},"smsConsentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When this number agreed to texts, ISO 8601 in UTC, when recorded. It never blocks or allows a text: opting out is a STOP text."},"smsConsentSource":{"anyOf":[{"type":"string","enum":["office_recorded","web_form","import","inbound_text"]},{"type":"null"}],"description":"How the consent was recorded."}},"required":["id","number","e164","label","customLabel","isPrimary","smsConsentAt","smsConsentSource"],"additionalProperties":false,"description":"One of the record's phone numbers."},"description":"Every phone number, primary first. For a lead linked to a customer, only the customer's primary number; read the customer (customers:read) for the rest."},"address":{"type":"string","description":"The service address."},"servicesRequested":{"type":"array","items":{"type":"string"},"description":"What the lead asked for."},"specialRequests":{"type":["string","null"],"description":"Anything else the lead said, or null."},"estimatedHours":{"type":["number","null"],"description":"The office's estimate of the work in hours, or null."},"sqFootage":{"type":["number","null"],"description":"Square footage typed in by hand, or null."},"status":{"type":"string","enum":["pending","dismissed","lost"],"description":"`pending` leads are open; `dismissed` leads were set aside; `lost` leads declined an estimate and reopen when a new estimate is sent or they submit the request form again."},"lifecycleStage":{"type":"string","enum":["lead","prospect","customer"],"description":"`lead` until an estimate is sent (`prospect`) or a job is booked (`customer`)."},"source":{"type":"string","enum":["intake_form","manual","csv","api"],"description":"How the lead arrived: `intake_form` for the website form, `manual` for leads added in the app, `csv` for an import, `api` for leads created with the API (leads it created before October 2026 read `manual`), unless the create set `leadSource` to `intake_form` or `manual`. New values may be added; treat an unknown one like `manual`."},"customerId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The customer account linked to the lead's email. It appears in the customers list and find_customer once it has a job or the lead converts. Null when the lead is not linked, for example when its email belongs to a staff member."},"propertyId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The lead's property (service address), when linked."},"lostReason":{"anyOf":[{"type":"string","enum":["price","timing","competitor","other"]},{"type":"null"}],"description":"Why the lead was lost, as a person marked it (`price`, `timing`, `competitor`, `other`); null unless `status` is `lost`."},"lostAt":{"anyOf":[{"type":"string","format":"date-time","description":"When the lead was marked lost, ISO 8601 in UTC."},{"type":"null"}],"description":"When the lead was marked lost, ISO 8601 in UTC."},"customerAt":{"anyOf":[{"type":"string","format":"date-time","description":"When the lead became a customer (a job was booked), ISO 8601 in UTC."},{"type":"null"}],"description":"When the lead became a customer (a job was booked), ISO 8601 in UTC."},"importedNotes":{"type":["string","null"],"description":"Notes that came in with the lead from another system (an import), as they were written there; null when none."},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The ids of the lead's tags."},"externalReferences":{"type":"array","items":{"$ref":"#/components/schemas/ExternalReference"},"description":"Ids this lead has in your other systems, set with `externalReference`, the external upsert, or a link."},"createdAt":{"type":"string","format":"date-time","description":"When the lead was created, ISO 8601 in UTC."},"updatedAt":{"type":"string","format":"date-time","description":"When the lead last changed, ISO 8601 in UTC."}},"required":["id","object","firstName","lastName","companyName","email","phone","phones","address","servicesRequested","specialRequests","estimatedHours","sqFootage","status","lifecycleStage","source","customerId","propertyId","lostReason","lostAt","customerAt","importedNotes","tagIds","externalReferences","createdAt","updatedAt"],"additionalProperties":false,"description":"A lead: someone who asked for service."},"ExternalReference":{"type":"object","properties":{"source":{"type":"string","description":"The system the id comes from."},"externalId":{"type":"string","description":"The object's id in that system."}},"required":["source","externalId"],"additionalProperties":false,"description":"An id this object has in another system."},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","description":"Error family, such as `invalid_request` or `permission`."},"code":{"type":"string","description":"Specific error code; see the errors page."},"message":{"type":"string","description":"A human-readable explanation."},"param":{"type":"string","description":"The input the error is about, such as `query.limit`."},"requiredScope":{"type":"string","description":"The scope the token is missing."},"requestId":{"type":"string","description":"Quote this id to support."},"docs":{"type":"string","description":"Link to the error's documentation."}},"required":["type","code","message","requestId","docs"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}},"responses":{"BadRequest":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthenticated":{"description":"The token is missing, invalid, expired, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"SubscriptionRequired":{"description":"The workspace's subscription needs attention.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The token is missing a required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such object in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"Conflict with the current state or an in-flight request with the same idempotency key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unprocessable":{"description":"The request cannot be applied, or its idempotency key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limited; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"Temporarily unavailable; retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/leads/{id}/external-references/{source}":{"put":{"operationId":"leads.externalReferences.link","tags":["Leads"],"summary":"Link a lead to your id","description":"Records `externalId` as this lead's id in `source`, so the external lookup and upsert find it. Linking is always explicit; the API never matches a lead to your id by email or address. Repeating the same link changes nothing. If the id already belongs to another lead, or this lead already has a different id in `source`, the request fails with 409 and nothing changes.\n\nReturns [the lead object](https://docs.shortcutco.com/developers/reference/objects/lead).\n\n**Errors specific to this endpoint:** [`already_exists`](https://docs.shortcutco.com/developers/concepts/errors#already_exists), [`external_reference_exists`](https://docs.shortcutco.com/developers/concepts/errors#external_reference_exists). Every endpoint can also return the [common errors](https://docs.shortcutco.com/developers/concepts/errors).","parameters":[{"name":"id","in":"path","required":true,"description":"The object's id.","schema":{"type":"string","format":"uuid"}},{"name":"source","in":"path","required":true,"description":"Your name for the system the id comes from, such as `hubspot` or `mywebsite`: 1-64 lowercase letters, digits, `_`, `.`, or `-`, starting with a letter or digit.","schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,63}$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"externalId":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^\\p{Cc}\\s/\\\\]+$","description":"The object's id in that system: 1-255 characters, no spaces, slashes, or control characters."}},"required":["externalId"],"additionalProperties":false,"description":"The object's id in that system."}}}},"responses":{"200":{"description":"Success.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Lead"},"meta":{"type":"object","properties":{},"additionalProperties":true,"description":"Facts about this request beside the object, such as `alreadyReminded` on a repeated reminder. Present only when there is something to report."}},"required":["data"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"$ref":"#/components/responses/SubscriptionRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}}}}
```

## Unlink a lead from your id

> Removes this lead's id in \`source\`. The lead itself is unchanged. Unlinking when there is no link changes nothing.\
> \
> Returns \[the lead object]\(<https://docs.shortcutco.com/developers/reference/objects/lead>).

```json
{"openapi":"3.1.0","info":{"title":"Shortcut API","version":"v1"},"tags":[{"name":"Leads","description":"A lead is a request for service. Creating one through the API works like your website form: staff are notified, and the lead appears in Customers with the Lead label.\n\nFields: [The lead object](https://docs.shortcutco.com/developers/reference/objects/lead)."}],"servers":[{"url":"https://api.shortcutco.com","description":"Production"}],"security":[{"bearerAuth":["leads:write"]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"scut_<env>_<id>_<secret>","description":"A workspace API token. Each operation lists the scopes it needs; `write` implies `read`, and `send`/`complete` are never implied."}},"headers":{"RateLimitLimit":{"schema":{"type":"integer"},"description":"Requests allowed in the tightest window."},"RateLimitRemaining":{"schema":{"type":"integer"},"description":"Requests left in that window."},"RateLimitReset":{"schema":{"type":"integer"},"description":"Seconds until that window resets."}},"schemas":{"Lead":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The lead's id."},"object":{"type":"string","const":"lead","description":"Always `lead`."},"firstName":{"type":"string","description":"First name."},"lastName":{"type":"string","description":"Last name."},"companyName":{"type":["string","null"],"description":"Company name, when the lead is a business."},"email":{"type":["string","null"],"description":"Email address, or null when none is on file."},"phone":{"type":["string","null"],"description":"The primary phone number (where texts go) in E.164 form, such as `+14065550142`, or null."},"phones":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The number's id. Send it back to keep the number when replacing the list."},"number":{"type":"string","description":"The number as entered, such as `(406) 555-0142`."},"e164":{"type":["string","null"],"description":"The number in E.164 (`+14065550142`), or null when it cannot be read as a phone number (it is shown, never texted)."},"label":{"anyOf":[{"type":"string","enum":["mobile","home","work","other","custom"]},{"type":"null"}],"description":"`mobile`, `home`, `work`, `other`, or `custom` (see `customLabel`). Null for an unlabeled number."},"customLabel":{"type":["string","null"],"description":"The label when `label` is `custom`, such as `Spouse` or `Property manager`."},"isPrimary":{"type":"boolean","description":"Texts go to the primary number. Exactly one number is primary when the list is not empty; `phone` is its copy."},"smsConsentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When this number agreed to texts, ISO 8601 in UTC, when recorded. It never blocks or allows a text: opting out is a STOP text."},"smsConsentSource":{"anyOf":[{"type":"string","enum":["office_recorded","web_form","import","inbound_text"]},{"type":"null"}],"description":"How the consent was recorded."}},"required":["id","number","e164","label","customLabel","isPrimary","smsConsentAt","smsConsentSource"],"additionalProperties":false,"description":"One of the record's phone numbers."},"description":"Every phone number, primary first. For a lead linked to a customer, only the customer's primary number; read the customer (customers:read) for the rest."},"address":{"type":"string","description":"The service address."},"servicesRequested":{"type":"array","items":{"type":"string"},"description":"What the lead asked for."},"specialRequests":{"type":["string","null"],"description":"Anything else the lead said, or null."},"estimatedHours":{"type":["number","null"],"description":"The office's estimate of the work in hours, or null."},"sqFootage":{"type":["number","null"],"description":"Square footage typed in by hand, or null."},"status":{"type":"string","enum":["pending","dismissed","lost"],"description":"`pending` leads are open; `dismissed` leads were set aside; `lost` leads declined an estimate and reopen when a new estimate is sent or they submit the request form again."},"lifecycleStage":{"type":"string","enum":["lead","prospect","customer"],"description":"`lead` until an estimate is sent (`prospect`) or a job is booked (`customer`)."},"source":{"type":"string","enum":["intake_form","manual","csv","api"],"description":"How the lead arrived: `intake_form` for the website form, `manual` for leads added in the app, `csv` for an import, `api` for leads created with the API (leads it created before October 2026 read `manual`), unless the create set `leadSource` to `intake_form` or `manual`. New values may be added; treat an unknown one like `manual`."},"customerId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The customer account linked to the lead's email. It appears in the customers list and find_customer once it has a job or the lead converts. Null when the lead is not linked, for example when its email belongs to a staff member."},"propertyId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The lead's property (service address), when linked."},"lostReason":{"anyOf":[{"type":"string","enum":["price","timing","competitor","other"]},{"type":"null"}],"description":"Why the lead was lost, as a person marked it (`price`, `timing`, `competitor`, `other`); null unless `status` is `lost`."},"lostAt":{"anyOf":[{"type":"string","format":"date-time","description":"When the lead was marked lost, ISO 8601 in UTC."},{"type":"null"}],"description":"When the lead was marked lost, ISO 8601 in UTC."},"customerAt":{"anyOf":[{"type":"string","format":"date-time","description":"When the lead became a customer (a job was booked), ISO 8601 in UTC."},{"type":"null"}],"description":"When the lead became a customer (a job was booked), ISO 8601 in UTC."},"importedNotes":{"type":["string","null"],"description":"Notes that came in with the lead from another system (an import), as they were written there; null when none."},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The ids of the lead's tags."},"externalReferences":{"type":"array","items":{"$ref":"#/components/schemas/ExternalReference"},"description":"Ids this lead has in your other systems, set with `externalReference`, the external upsert, or a link."},"createdAt":{"type":"string","format":"date-time","description":"When the lead was created, ISO 8601 in UTC."},"updatedAt":{"type":"string","format":"date-time","description":"When the lead last changed, ISO 8601 in UTC."}},"required":["id","object","firstName","lastName","companyName","email","phone","phones","address","servicesRequested","specialRequests","estimatedHours","sqFootage","status","lifecycleStage","source","customerId","propertyId","lostReason","lostAt","customerAt","importedNotes","tagIds","externalReferences","createdAt","updatedAt"],"additionalProperties":false,"description":"A lead: someone who asked for service."},"ExternalReference":{"type":"object","properties":{"source":{"type":"string","description":"The system the id comes from."},"externalId":{"type":"string","description":"The object's id in that system."}},"required":["source","externalId"],"additionalProperties":false,"description":"An id this object has in another system."},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","description":"Error family, such as `invalid_request` or `permission`."},"code":{"type":"string","description":"Specific error code; see the errors page."},"message":{"type":"string","description":"A human-readable explanation."},"param":{"type":"string","description":"The input the error is about, such as `query.limit`."},"requiredScope":{"type":"string","description":"The scope the token is missing."},"requestId":{"type":"string","description":"Quote this id to support."},"docs":{"type":"string","description":"Link to the error's documentation."}},"required":["type","code","message","requestId","docs"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}},"responses":{"BadRequest":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthenticated":{"description":"The token is missing, invalid, expired, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"SubscriptionRequired":{"description":"The workspace's subscription needs attention.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The token is missing a required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such object in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"Conflict with the current state or an in-flight request with the same idempotency key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unprocessable":{"description":"The request cannot be applied, or its idempotency key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limited; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"Temporarily unavailable; retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/leads/{id}/external-references/{source}":{"delete":{"operationId":"leads.externalReferences.unlink","tags":["Leads"],"summary":"Unlink a lead from your id","description":"Removes this lead's id in `source`. The lead itself is unchanged. Unlinking when there is no link changes nothing.\n\nReturns [the lead object](https://docs.shortcutco.com/developers/reference/objects/lead).","parameters":[{"name":"id","in":"path","required":true,"description":"The object's id.","schema":{"type":"string","format":"uuid"}},{"name":"source","in":"path","required":true,"description":"Your name for the system the id comes from, such as `hubspot` or `mywebsite`: 1-64 lowercase letters, digits, `_`, `.`, or `-`, starting with a letter or digit.","schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,63}$"}}],"responses":{"200":{"description":"Success.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Lead"},"meta":{"type":"object","properties":{},"additionalProperties":true,"description":"Facts about this request beside the object, such as `alreadyReminded` on a repeated reminder. Present only when there is something to report."}},"required":["data"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"$ref":"#/components/responses/SubscriptionRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}}}}
```

## Get a lead's measurements

> The lead's own stored map: each measured area with its square feet, whether it was reviewed, which tool measured it (\`source\`), and the lead's lawn size. For a lead linked to a property, \`propertyId\` is set and \`GET /v1/properties/{id}/measurements\` is the full read. Needs property measurement on the company's plan.\
> \
> \*\*Errors specific to this endpoint:\*\* \[\`feature\_not\_available\`]\(<https://docs.shortcutco.com/developers/concepts/errors#feature\\_not\\_available>). Every endpoint can also return the \[common errors]\(<https://docs.shortcutco.com/developers/concepts/errors>).

```json
{"openapi":"3.1.0","info":{"title":"Shortcut API","version":"v1"},"tags":[{"name":"Leads","description":"A lead is a request for service. Creating one through the API works like your website form: staff are notified, and the lead appears in Customers with the Lead label.\n\nFields: [The lead object](https://docs.shortcutco.com/developers/reference/objects/lead)."}],"servers":[{"url":"https://api.shortcutco.com","description":"Production"}],"security":[{"bearerAuth":["leads:read"]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"scut_<env>_<id>_<secret>","description":"A workspace API token. Each operation lists the scopes it needs; `write` implies `read`, and `send`/`complete` are never implied."}},"headers":{"RateLimitLimit":{"schema":{"type":"integer"},"description":"Requests allowed in the tightest window."},"RateLimitRemaining":{"schema":{"type":"integer"},"description":"Requests left in that window."},"RateLimitReset":{"schema":{"type":"integer"},"description":"Seconds until that window resets."}},"responses":{"BadRequest":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthenticated":{"description":"The token is missing, invalid, expired, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"SubscriptionRequired":{"description":"The workspace's subscription needs attention.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The token is missing a required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such object in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limited; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"Temporarily unavailable; retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","description":"Error family, such as `invalid_request` or `permission`."},"code":{"type":"string","description":"Specific error code; see the errors page."},"message":{"type":"string","description":"A human-readable explanation."},"param":{"type":"string","description":"The input the error is about, such as `query.limit`."},"requiredScope":{"type":"string","description":"The scope the token is missing."},"requestId":{"type":"string","description":"Quote this id to support."},"docs":{"type":"string","description":"Link to the error's documentation."}},"required":["type","code","message","requestId","docs"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}},"paths":{"/v1/leads/{id}/measurements":{"get":{"operationId":"leads.measurements.get","tags":["Leads"],"summary":"Get a lead's measurements","description":"The lead's own stored map: each measured area with its square feet, whether it was reviewed, which tool measured it (`source`), and the lead's lawn size. For a lead linked to a property, `propertyId` is set and `GET /v1/properties/{id}/measurements` is the full read. Needs property measurement on the company's plan.\n\n**Errors specific to this endpoint:** [`feature_not_available`](https://docs.shortcutco.com/developers/concepts/errors#feature_not_available). Every endpoint can also return the [common errors](https://docs.shortcutco.com/developers/concepts/errors).","parameters":[{"name":"id","in":"path","required":true,"description":"The object's id.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"leadId":{"type":"string","format":"uuid"},"propertyId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The lead's property when linked; its full read is GET /v1/properties/{id}/measurements."},"lawnSqFootage":{"type":["number","null"],"description":"The lead's lawn size, the one its estimates price on."},"map":{"anyOf":[{"type":"object","properties":{"leadId":{"type":"string","format":"uuid","description":"The lead the map hangs off (a property's newest lead)."},"review":{"type":"string","enum":["reviewed","auto_measured_not_reviewed","drawn_not_reviewed","lot_only"],"description":"reviewed: a person accepted or saved the map; auto_measured_not_reviewed: auto-measure drew it and nobody has looked; drawn_not_reviewed: drawn or edited by hand, not marked reviewed; lot_only: lot lines only, no lawn measured. There is no margin of error: say which of these it is, never a margin."},"reviewedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"drawnBy":{"type":["string","null"],"description":"How the lawn outline was made: auto_measured, manual_drawn, operator_edited, provider_seeded or refreshed_provider."},"source":{"type":["string","null"],"description":"The outside measuring tool that stored these areas through the API (`deeplawn`, `duranta`, as the integration named it); null when Shortcut measured or a person drew them."},"lawnNeedsReview":{"type":"boolean","description":"The app's rule of thumb: an unreviewed auto-measured lawn covering almost the whole lot (imagery may predate the house)."},"lawnShareOfLot":{"type":["number","null"],"description":"Auto-measured lawn as a share of the lot (0–1); null without a lot or auto areas."},"imageryCapturedOn":{"type":["string","null"],"description":"When the satellite imagery of the last auto-measure was taken; null when unknown."},"lastAutoMeasure":{"anyOf":[{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["running","succeeded","failed"]},"outcome":{"type":"string","enum":["measured","lot_only","failed","running"]},"reason":{"type":["string","null"],"description":"Why only the lot was kept, or the run failed; Shortcut's own words."}},"required":["at","status","outcome","reason"],"additionalProperties":false},{"type":"null"}]},"measuredLawnSqft":{"type":["number","null"],"description":"The lawn areas added up (the map's lawn when it has no areas)."},"lotSqft":{"type":["number","null"]},"buildingSqft":{"type":["number","null"]},"boundaryDrawn":{"type":"boolean","description":"The office drew its own property outline (or an integration sent one); auto-measure measures inside it."},"totalsByKind":{"type":"object","additionalProperties":{"type":"number"},"propertyNames":{"enum":["lawn","driveway","sidewalk","bed","excluded","structure"]},"description":"Square feet by kind of area."},"areas":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"kind":{"type":"string","enum":["lawn","driveway","sidewalk","bed","excluded","structure"]},"sqft":{"type":"number"},"origin":{"type":"string","enum":["auto","edited","added"],"description":"auto: auto-measure's, untouched; edited: auto-measured, then changed by a person; added: drawn or typed by a person, or sent by an integration."},"sizeFrom":{"type":"string","enum":["calculated","manual"],"description":"calculated from the outline, or typed in (an area sent without an outline)."}},"required":["id","name","kind","sqft","origin","sizeFrom"],"additionalProperties":false}}},"required":["leadId","review","reviewedAt","drawnBy","source","lawnNeedsReview","lawnShareOfLot","imageryCapturedOn","lastAutoMeasure","measuredLawnSqft","lotSqft","buildingSqft","boundaryDrawn","totalsByKind","areas"],"additionalProperties":false},{"type":"null"}],"description":"Null when the lead has no map yet."}},"required":["leadId","propertyId","lawnSqFootage","map"],"additionalProperties":false},"meta":{"type":"object","properties":{},"additionalProperties":true,"description":"Facts about this request beside the object, such as `alreadyReminded` on a repeated reminder. Present only when there is something to report."}},"required":["data"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"$ref":"#/components/responses/SubscriptionRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}}}}
```

## Store a lead's measurements

> Stores a measurement made with an outside tool (DeepLawn, Duranta) as the lead's map, for a lead with no property (\`propertyId: null\`). That is rare: a lead created with \`POST /v1/leads\`, the external upsert or the website form gets a customer account at once and its address becomes the account's property, so its measurements go to \`PUT /v1/properties/{id}/measurements\` with the lead's \`propertyId\` (which needs \`customers:write\`). A lead has no property when its email belongs to no customer account, such as a staff member's. The same rules as \`PUT /v1/properties/{id}/measurements\`: replaces every area, sets the lead's lawn size to the lawn outlines' combined size, marks the map reviewed, records \`source\`, and refuses a bad outline with \`validation\_failed\`. A lead already linked to a property is refused with \`state\_conflict\` naming the property route. The map stays on the lead; once the lead is linked to a property, the property's map reads it. Needs property measurement on the company's plan.\
> \
> \*\*Errors specific to this endpoint:\*\* \[\`feature\_not\_available\`]\(<https://docs.shortcutco.com/developers/concepts/errors#feature\\_not\\_available>), \[\`state\_conflict\`]\(<https://docs.shortcutco.com/developers/concepts/errors#state\\_conflict>). Every endpoint can also return the \[common errors]\(<https://docs.shortcutco.com/developers/concepts/errors>).

```json
{"openapi":"3.1.0","info":{"title":"Shortcut API","version":"v1"},"tags":[{"name":"Leads","description":"A lead is a request for service. Creating one through the API works like your website form: staff are notified, and the lead appears in Customers with the Lead label.\n\nFields: [The lead object](https://docs.shortcutco.com/developers/reference/objects/lead)."}],"servers":[{"url":"https://api.shortcutco.com","description":"Production"}],"security":[{"bearerAuth":["leads:write"]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"scut_<env>_<id>_<secret>","description":"A workspace API token. Each operation lists the scopes it needs; `write` implies `read`, and `send`/`complete` are never implied."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Any string up to 255 characters. Retrying with the same key returns the first response instead of repeating the write, for 24 hours.","schema":{"type":"string","maxLength":255}}},"headers":{"RateLimitLimit":{"schema":{"type":"integer"},"description":"Requests allowed in the tightest window."},"RateLimitRemaining":{"schema":{"type":"integer"},"description":"Requests left in that window."},"RateLimitReset":{"schema":{"type":"integer"},"description":"Seconds until that window resets."}},"responses":{"BadRequest":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthenticated":{"description":"The token is missing, invalid, expired, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"SubscriptionRequired":{"description":"The workspace's subscription needs attention.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The token is missing a required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such object in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"Conflict with the current state or an in-flight request with the same idempotency key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unprocessable":{"description":"The request cannot be applied, or its idempotency key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limited; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"Temporarily unavailable; retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","description":"Error family, such as `invalid_request` or `permission`."},"code":{"type":"string","description":"Specific error code; see the errors page."},"message":{"type":"string","description":"A human-readable explanation."},"param":{"type":"string","description":"The input the error is about, such as `query.limit`."},"requiredScope":{"type":"string","description":"The scope the token is missing."},"requestId":{"type":"string","description":"Quote this id to support."},"docs":{"type":"string","description":"Link to the error's documentation."}},"required":["type","code","message","requestId","docs"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}},"paths":{"/v1/leads/{id}/measurements":{"put":{"operationId":"leads.measurements.store","tags":["Leads"],"summary":"Store a lead's measurements","description":"Stores a measurement made with an outside tool (DeepLawn, Duranta) as the lead's map, for a lead with no property (`propertyId: null`). That is rare: a lead created with `POST /v1/leads`, the external upsert or the website form gets a customer account at once and its address becomes the account's property, so its measurements go to `PUT /v1/properties/{id}/measurements` with the lead's `propertyId` (which needs `customers:write`). A lead has no property when its email belongs to no customer account, such as a staff member's. The same rules as `PUT /v1/properties/{id}/measurements`: replaces every area, sets the lead's lawn size to the lawn outlines' combined size, marks the map reviewed, records `source`, and refuses a bad outline with `validation_failed`. A lead already linked to a property is refused with `state_conflict` naming the property route. The map stays on the lead; once the lead is linked to a property, the property's map reads it. Needs property measurement on the company's plan.\n\n**Errors specific to this endpoint:** [`feature_not_available`](https://docs.shortcutco.com/developers/concepts/errors#feature_not_available), [`state_conflict`](https://docs.shortcutco.com/developers/concepts/errors#state_conflict). Every endpoint can also return the [common errors](https://docs.shortcutco.com/developers/concepts/errors).","parameters":[{"name":"id","in":"path","required":true,"description":"The object's id.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,39}$","description":"The measuring tool, recorded as the map's source: `deeplawn`, `duranta`. Lowercase letters, digits, `.`, `_`, `-`; up to 40."},"areas":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"What the area is called on the map: \"Front lawn\", \"Driveway\"."},"kind":{"type":"string","enum":["lawn","driveway","sidewalk","bed","excluded","structure"],"description":"lawn (mowed and priced; its total becomes the property's lawn size), driveway and sidewalk (the snow area), bed, excluded (measured, not mowed), structure (a building)."},"sqft":{"type":"number","exclusiveMinimum":0,"maximum":20000000,"description":"The area's size in square feet, as the tool measured it. With an outline, it must agree with the outline's own size within 10% (or 100 sq ft), and the outline's size is stored, as Measure stores a drawn area."},"outline":{"description":"A GeoJSON Polygon or MultiPolygon (or a Feature holding one), corners as [longitude, latitude] in WGS 84. Each ring must be closed (last corner repeats the first), must not cross itself, and the outline must be near the property, at most 20,000,000 sq ft and 5,000 corners. Cut-outs (inner rings) are allowed."}},"required":["name","kind","sqft"],"additionalProperties":false},"minItems":1,"maxItems":50,"description":"Every area of the property. Replaces the map's areas: one not sent is deleted. At least one `lawn` area with an outline."},"boundary":{"anyOf":[{"description":"A GeoJSON Polygon or MultiPolygon (or a Feature holding one), corners as [longitude, latitude] in WGS 84. Each ring must be closed (last corner repeats the first), must not cross itself, and the outline must be near the property, at most 20,000,000 sq ft and 5,000 corners. Cut-outs (inner rings) are allowed."},{"type":"null"}],"description":"The property's outline (lot lines), a single-ring GeoJSON Polygon of up to 200 corners. Null clears it; leave it out to keep the stored one. Shown to crews; it feeds no total or price."}},"required":["source","areas"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"leadId":{"type":"string","format":"uuid","description":"The lead the map is stored on."},"propertyId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The lead's property, when it has one."},"lawnSqFootage":{"type":"number","description":"The lawn size now on the lead and its property: the lawn outlines' combined size."},"replacedAreaCount":{"type":"integer","description":"How many areas the map had before this call; all were replaced."},"map":{"type":"object","properties":{"leadId":{"type":"string","format":"uuid","description":"The lead the map hangs off (a property's newest lead)."},"review":{"type":"string","enum":["reviewed","auto_measured_not_reviewed","drawn_not_reviewed","lot_only"],"description":"reviewed: a person accepted or saved the map; auto_measured_not_reviewed: auto-measure drew it and nobody has looked; drawn_not_reviewed: drawn or edited by hand, not marked reviewed; lot_only: lot lines only, no lawn measured. There is no margin of error: say which of these it is, never a margin."},"reviewedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"drawnBy":{"type":["string","null"],"description":"How the lawn outline was made: auto_measured, manual_drawn, operator_edited, provider_seeded or refreshed_provider."},"source":{"type":["string","null"],"description":"The outside measuring tool that stored these areas through the API (`deeplawn`, `duranta`, as the integration named it); null when Shortcut measured or a person drew them."},"lawnNeedsReview":{"type":"boolean","description":"The app's rule of thumb: an unreviewed auto-measured lawn covering almost the whole lot (imagery may predate the house)."},"lawnShareOfLot":{"type":["number","null"],"description":"Auto-measured lawn as a share of the lot (0–1); null without a lot or auto areas."},"imageryCapturedOn":{"type":["string","null"],"description":"When the satellite imagery of the last auto-measure was taken; null when unknown."},"lastAutoMeasure":{"anyOf":[{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["running","succeeded","failed"]},"outcome":{"type":"string","enum":["measured","lot_only","failed","running"]},"reason":{"type":["string","null"],"description":"Why only the lot was kept, or the run failed; Shortcut's own words."}},"required":["at","status","outcome","reason"],"additionalProperties":false},{"type":"null"}]},"measuredLawnSqft":{"type":["number","null"],"description":"The lawn areas added up (the map's lawn when it has no areas)."},"lotSqft":{"type":["number","null"]},"buildingSqft":{"type":["number","null"]},"boundaryDrawn":{"type":"boolean","description":"The office drew its own property outline (or an integration sent one); auto-measure measures inside it."},"totalsByKind":{"type":"object","additionalProperties":{"type":"number"},"propertyNames":{"enum":["lawn","driveway","sidewalk","bed","excluded","structure"]},"description":"Square feet by kind of area."},"areas":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"kind":{"type":"string","enum":["lawn","driveway","sidewalk","bed","excluded","structure"]},"sqft":{"type":"number"},"origin":{"type":"string","enum":["auto","edited","added"],"description":"auto: auto-measure's, untouched; edited: auto-measured, then changed by a person; added: drawn or typed by a person, or sent by an integration."},"sizeFrom":{"type":"string","enum":["calculated","manual"],"description":"calculated from the outline, or typed in (an area sent without an outline)."}},"required":["id","name","kind","sqft","origin","sizeFrom"],"additionalProperties":false}}},"required":["leadId","review","reviewedAt","drawnBy","source","lawnNeedsReview","lawnShareOfLot","imageryCapturedOn","lastAutoMeasure","measuredLawnSqft","lotSqft","buildingSqft","boundaryDrawn","totalsByKind","areas"],"additionalProperties":false}},"required":["leadId","propertyId","lawnSqFootage","replacedAreaCount","map"],"additionalProperties":false},"meta":{"type":"object","properties":{},"additionalProperties":true,"description":"Facts about this request beside the object, such as `alreadyReminded` on a repeated reminder. Present only when there is something to report."}},"required":["data"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"$ref":"#/components/responses/SubscriptionRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}}}}
```

## Restore a lead

> Brings a dismissed lead back, as Restore does in the app: its status becomes \`pending\`. Restoring an open lead changes nothing and returns it as it is.\
> \
> Returns \[the lead object]\(<https://docs.shortcutco.com/developers/reference/objects/lead>).

```json
{"openapi":"3.1.0","info":{"title":"Shortcut API","version":"v1"},"tags":[{"name":"Leads","description":"A lead is a request for service. Creating one through the API works like your website form: staff are notified, and the lead appears in Customers with the Lead label.\n\nFields: [The lead object](https://docs.shortcutco.com/developers/reference/objects/lead)."}],"servers":[{"url":"https://api.shortcutco.com","description":"Production"}],"security":[{"bearerAuth":["leads:write"]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"scut_<env>_<id>_<secret>","description":"A workspace API token. Each operation lists the scopes it needs; `write` implies `read`, and `send`/`complete` are never implied."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Any string up to 255 characters. Retrying with the same key returns the first response instead of repeating the write, for 24 hours.","schema":{"type":"string","maxLength":255}}},"headers":{"RateLimitLimit":{"schema":{"type":"integer"},"description":"Requests allowed in the tightest window."},"RateLimitRemaining":{"schema":{"type":"integer"},"description":"Requests left in that window."},"RateLimitReset":{"schema":{"type":"integer"},"description":"Seconds until that window resets."}},"schemas":{"Lead":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The lead's id."},"object":{"type":"string","const":"lead","description":"Always `lead`."},"firstName":{"type":"string","description":"First name."},"lastName":{"type":"string","description":"Last name."},"companyName":{"type":["string","null"],"description":"Company name, when the lead is a business."},"email":{"type":["string","null"],"description":"Email address, or null when none is on file."},"phone":{"type":["string","null"],"description":"The primary phone number (where texts go) in E.164 form, such as `+14065550142`, or null."},"phones":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The number's id. Send it back to keep the number when replacing the list."},"number":{"type":"string","description":"The number as entered, such as `(406) 555-0142`."},"e164":{"type":["string","null"],"description":"The number in E.164 (`+14065550142`), or null when it cannot be read as a phone number (it is shown, never texted)."},"label":{"anyOf":[{"type":"string","enum":["mobile","home","work","other","custom"]},{"type":"null"}],"description":"`mobile`, `home`, `work`, `other`, or `custom` (see `customLabel`). Null for an unlabeled number."},"customLabel":{"type":["string","null"],"description":"The label when `label` is `custom`, such as `Spouse` or `Property manager`."},"isPrimary":{"type":"boolean","description":"Texts go to the primary number. Exactly one number is primary when the list is not empty; `phone` is its copy."},"smsConsentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When this number agreed to texts, ISO 8601 in UTC, when recorded. It never blocks or allows a text: opting out is a STOP text."},"smsConsentSource":{"anyOf":[{"type":"string","enum":["office_recorded","web_form","import","inbound_text"]},{"type":"null"}],"description":"How the consent was recorded."}},"required":["id","number","e164","label","customLabel","isPrimary","smsConsentAt","smsConsentSource"],"additionalProperties":false,"description":"One of the record's phone numbers."},"description":"Every phone number, primary first. For a lead linked to a customer, only the customer's primary number; read the customer (customers:read) for the rest."},"address":{"type":"string","description":"The service address."},"servicesRequested":{"type":"array","items":{"type":"string"},"description":"What the lead asked for."},"specialRequests":{"type":["string","null"],"description":"Anything else the lead said, or null."},"estimatedHours":{"type":["number","null"],"description":"The office's estimate of the work in hours, or null."},"sqFootage":{"type":["number","null"],"description":"Square footage typed in by hand, or null."},"status":{"type":"string","enum":["pending","dismissed","lost"],"description":"`pending` leads are open; `dismissed` leads were set aside; `lost` leads declined an estimate and reopen when a new estimate is sent or they submit the request form again."},"lifecycleStage":{"type":"string","enum":["lead","prospect","customer"],"description":"`lead` until an estimate is sent (`prospect`) or a job is booked (`customer`)."},"source":{"type":"string","enum":["intake_form","manual","csv","api"],"description":"How the lead arrived: `intake_form` for the website form, `manual` for leads added in the app, `csv` for an import, `api` for leads created with the API (leads it created before October 2026 read `manual`), unless the create set `leadSource` to `intake_form` or `manual`. New values may be added; treat an unknown one like `manual`."},"customerId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The customer account linked to the lead's email. It appears in the customers list and find_customer once it has a job or the lead converts. Null when the lead is not linked, for example when its email belongs to a staff member."},"propertyId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The lead's property (service address), when linked."},"lostReason":{"anyOf":[{"type":"string","enum":["price","timing","competitor","other"]},{"type":"null"}],"description":"Why the lead was lost, as a person marked it (`price`, `timing`, `competitor`, `other`); null unless `status` is `lost`."},"lostAt":{"anyOf":[{"type":"string","format":"date-time","description":"When the lead was marked lost, ISO 8601 in UTC."},{"type":"null"}],"description":"When the lead was marked lost, ISO 8601 in UTC."},"customerAt":{"anyOf":[{"type":"string","format":"date-time","description":"When the lead became a customer (a job was booked), ISO 8601 in UTC."},{"type":"null"}],"description":"When the lead became a customer (a job was booked), ISO 8601 in UTC."},"importedNotes":{"type":["string","null"],"description":"Notes that came in with the lead from another system (an import), as they were written there; null when none."},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The ids of the lead's tags."},"externalReferences":{"type":"array","items":{"$ref":"#/components/schemas/ExternalReference"},"description":"Ids this lead has in your other systems, set with `externalReference`, the external upsert, or a link."},"createdAt":{"type":"string","format":"date-time","description":"When the lead was created, ISO 8601 in UTC."},"updatedAt":{"type":"string","format":"date-time","description":"When the lead last changed, ISO 8601 in UTC."}},"required":["id","object","firstName","lastName","companyName","email","phone","phones","address","servicesRequested","specialRequests","estimatedHours","sqFootage","status","lifecycleStage","source","customerId","propertyId","lostReason","lostAt","customerAt","importedNotes","tagIds","externalReferences","createdAt","updatedAt"],"additionalProperties":false,"description":"A lead: someone who asked for service."},"ExternalReference":{"type":"object","properties":{"source":{"type":"string","description":"The system the id comes from."},"externalId":{"type":"string","description":"The object's id in that system."}},"required":["source","externalId"],"additionalProperties":false,"description":"An id this object has in another system."},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","description":"Error family, such as `invalid_request` or `permission`."},"code":{"type":"string","description":"Specific error code; see the errors page."},"message":{"type":"string","description":"A human-readable explanation."},"param":{"type":"string","description":"The input the error is about, such as `query.limit`."},"requiredScope":{"type":"string","description":"The scope the token is missing."},"requestId":{"type":"string","description":"Quote this id to support."},"docs":{"type":"string","description":"Link to the error's documentation."}},"required":["type","code","message","requestId","docs"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}},"responses":{"BadRequest":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthenticated":{"description":"The token is missing, invalid, expired, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"SubscriptionRequired":{"description":"The workspace's subscription needs attention.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The token is missing a required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such object in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"Conflict with the current state or an in-flight request with the same idempotency key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unprocessable":{"description":"The request cannot be applied, or its idempotency key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limited; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"Temporarily unavailable; retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/leads/{id}/restore":{"post":{"operationId":"leads.restore","tags":["Leads"],"summary":"Restore a lead","description":"Brings a dismissed lead back, as Restore does in the app: its status becomes `pending`. Restoring an open lead changes nothing and returns it as it is.\n\nReturns [the lead object](https://docs.shortcutco.com/developers/reference/objects/lead).","parameters":[{"name":"id","in":"path","required":true,"description":"The object's id.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Lead"},"meta":{"type":"object","properties":{},"additionalProperties":true,"description":"Facts about this request beside the object, such as `alreadyReminded` on a repeated reminder. Present only when there is something to report."}},"required":["data"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"$ref":"#/components/responses/SubscriptionRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}}}}
```

## Get a lead tag's owner and attachment state

> Reads one existing tag and its native owner: linked client first, otherwise property customer, otherwise the lead. Linked accounts additionally require customers:read. Residual lead attachments are reported because removal also clears them.\
> \
> Returns \[the lead tag object]\(<https://docs.shortcutco.com/developers/reference/objects/lead-tag).\\>
> \
> \*\*Errors specific to this endpoint:\*\* \[\`lead\_tags\_admins\_only\`]\(<https://docs.shortcutco.com/developers/concepts/errors#lead\\_tags\\_admins\\_only>). Every endpoint can also return the \[common errors]\(<https://docs.shortcutco.com/developers/concepts/errors>).

```json
{"openapi":"3.1.0","info":{"title":"Shortcut API","version":"v1"},"tags":[{"name":"Leads","description":"A lead is a request for service. Creating one through the API works like your website form: staff are notified, and the lead appears in Customers with the Lead label.\n\nFields: [The lead object](https://docs.shortcutco.com/developers/reference/objects/lead)."}],"servers":[{"url":"https://api.shortcutco.com","description":"Production"}],"security":[{"bearerAuth":["leads:read","tags:read"]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"scut_<env>_<id>_<secret>","description":"A workspace API token. Each operation lists the scopes it needs; `write` implies `read`, and `send`/`complete` are never implied."}},"headers":{"RateLimitLimit":{"schema":{"type":"integer"},"description":"Requests allowed in the tightest window."},"RateLimitRemaining":{"schema":{"type":"integer"},"description":"Requests left in that window."},"RateLimitReset":{"schema":{"type":"integer"},"description":"Seconds until that window resets."}},"schemas":{"LeadTag":{"type":"object","properties":{"object":{"type":"string","const":"lead_tag","description":"Always `lead_tag`."},"leadId":{"type":"string","format":"uuid","description":"The explicit lead being tagged."},"tagId":{"type":"string","format":"uuid","description":"The existing tag in this workspace."},"tagName":{"type":"string","description":"The existing tag's name, as shown in Shortcut."},"customerId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The exact native customer owner; null means the tag belongs to the lead itself."},"attached":{"type":"boolean","description":"Whether the current native owner has this tag."},"residualLeadAttachment":{"type":"boolean","description":"Whether a linked lead also has an old lead attachment; ordinary removal clears both."}},"required":["object","leadId","tagId","tagName","customerId","attached","residualLeadAttachment"],"additionalProperties":false,"description":"One existing lead tag's native owner and attachment state."},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","description":"Error family, such as `invalid_request` or `permission`."},"code":{"type":"string","description":"Specific error code; see the errors page."},"message":{"type":"string","description":"A human-readable explanation."},"param":{"type":"string","description":"The input the error is about, such as `query.limit`."},"requiredScope":{"type":"string","description":"The scope the token is missing."},"requestId":{"type":"string","description":"Quote this id to support."},"docs":{"type":"string","description":"Link to the error's documentation."}},"required":["type","code","message","requestId","docs"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}},"responses":{"BadRequest":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthenticated":{"description":"The token is missing, invalid, expired, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"SubscriptionRequired":{"description":"The workspace's subscription needs attention.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The token is missing a required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such object in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limited; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"Temporarily unavailable; retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/leads/{id}/tags/{tagId}":{"get":{"operationId":"leads.tags.get","tags":["Leads"],"summary":"Get a lead tag's owner and attachment state","description":"Reads one existing tag and its native owner: linked client first, otherwise property customer, otherwise the lead. Linked accounts additionally require customers:read. Residual lead attachments are reported because removal also clears them.\n\nReturns [the lead tag object](https://docs.shortcutco.com/developers/reference/objects/lead-tag).\n\n**Errors specific to this endpoint:** [`lead_tags_admins_only`](https://docs.shortcutco.com/developers/concepts/errors#lead_tags_admins_only). Every endpoint can also return the [common errors](https://docs.shortcutco.com/developers/concepts/errors).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"tagId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/LeadTag"},"meta":{"type":"object","properties":{},"additionalProperties":true,"description":"Facts about this request beside the object, such as `alreadyReminded` on a repeated reminder. Present only when there is something to report."}},"required":["data"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"$ref":"#/components/responses/SubscriptionRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}}}}
```

## Attach an existing tag to a lead

> Attaches only the explicit existing tag. Pass expectedCustomerId from the owner read; owner changes refuse the write. A linked account additionally requires customers:write and receives the tag instead of the lead. Reattaching is a no-op. Only an actual new insert returns createdAttachment; an exact correction may remove only that row under the same current owner. Converting, replacing or removing it invalidates correction. Native automations may run only with automations:trigger; external approvals apply normally.\
> \
> \*\*Errors specific to this endpoint:\*\* \[\`lead\_tags\_admins\_only\`]\(<https://docs.shortcutco.com/developers/concepts/errors#lead\\_tags\\_admins\\_only>). Every endpoint can also return the \[common errors]\(<https://docs.shortcutco.com/developers/concepts/errors>).

```json
{"openapi":"3.1.0","info":{"title":"Shortcut API","version":"v1"},"tags":[{"name":"Leads","description":"A lead is a request for service. Creating one through the API works like your website form: staff are notified, and the lead appears in Customers with the Lead label.\n\nFields: [The lead object](https://docs.shortcutco.com/developers/reference/objects/lead)."}],"servers":[{"url":"https://api.shortcutco.com","description":"Production"}],"security":[{"bearerAuth":["leads:write"]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"scut_<env>_<id>_<secret>","description":"A workspace API token. Each operation lists the scopes it needs; `write` implies `read`, and `send`/`complete` are never implied."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Any string up to 255 characters. Retrying with the same key returns the first response instead of repeating the write, for 24 hours.","schema":{"type":"string","maxLength":255}}},"headers":{"RateLimitLimit":{"schema":{"type":"integer"},"description":"Requests allowed in the tightest window."},"RateLimitRemaining":{"schema":{"type":"integer"},"description":"Requests left in that window."},"RateLimitReset":{"schema":{"type":"integer"},"description":"Seconds until that window resets."}},"responses":{"BadRequest":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthenticated":{"description":"The token is missing, invalid, expired, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"SubscriptionRequired":{"description":"The workspace's subscription needs attention.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The token is missing a required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such object in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"Conflict with the current state or an in-flight request with the same idempotency key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unprocessable":{"description":"The request cannot be applied, or its idempotency key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limited; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"Temporarily unavailable; retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","description":"Error family, such as `invalid_request` or `permission`."},"code":{"type":"string","description":"Specific error code; see the errors page."},"message":{"type":"string","description":"A human-readable explanation."},"param":{"type":"string","description":"The input the error is about, such as `query.limit`."},"requiredScope":{"type":"string","description":"The scope the token is missing."},"requestId":{"type":"string","description":"Quote this id to support."},"docs":{"type":"string","description":"Link to the error's documentation."}},"required":["type","code","message","requestId","docs"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}},"paths":{"/v1/leads/{id}/tags/{tagId}":{"post":{"operationId":"leads.tags.attach","tags":["Leads"],"summary":"Attach an existing tag to a lead","description":"Attaches only the explicit existing tag. Pass expectedCustomerId from the owner read; owner changes refuse the write. A linked account additionally requires customers:write and receives the tag instead of the lead. Reattaching is a no-op. Only an actual new insert returns createdAttachment; an exact correction may remove only that row under the same current owner. Converting, replacing or removing it invalidates correction. Native automations may run only with automations:trigger; external approvals apply normally.\n\n**Errors specific to this endpoint:** [`lead_tags_admins_only`](https://docs.shortcutco.com/developers/concepts/errors#lead_tags_admins_only). Every endpoint can also return the [common errors](https://docs.shortcutco.com/developers/concepts/errors).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"tagId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedCustomerId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Exact customerId from get_lead_tag; null means the lead itself. Owner changes refuse the write."}},"required":["expectedCustomerId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"leadId":{"type":"string","format":"uuid","description":"The lead the request named."},"tagId":{"type":"string","format":"uuid","description":"The existing tag the request named."},"customerId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The acknowledged current customer owner, or null for the lead itself."},"changed":{"type":"boolean","description":"Whether this request inserted or removed an attachment."},"createdAttachment":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"customerId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["id","createdAt","customerId"],"additionalProperties":false},{"type":"null"}],"description":"Only an actual new attach returns an exact-row correction receipt. No-op attaches and removals return null."}},"required":["leadId","tagId","customerId","changed","createdAttachment"],"additionalProperties":false},"meta":{"type":"object","properties":{},"additionalProperties":true,"description":"Facts about this request beside the object, such as `alreadyReminded` on a repeated reminder. Present only when there is something to report."}},"required":["data"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"$ref":"#/components/responses/SubscriptionRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}}}}
```

## Remove a lead's tag

> Removes the tag from the current linked account and any residual lead attachment, matching the native picker. Requires expectedCustomerId (UUID or null); linked accounts additionally require customers:write. Removal has no Undo or saved inverse; correction is a fresh approved attach. For an attach correction only, pass both attachmentId and attachmentCreatedAt returned by that attach: only that exact row under the unchanged owner is removed; replacements and conversion refuse. External approval and automations:trigger gates apply normally.\
> \
> \*\*Errors specific to this endpoint:\*\* \[\`invalid\_body\`]\(<https://docs.shortcutco.com/developers/concepts/errors#invalid\\_body>), \[\`lead\_tags\_admins\_only\`]\(<https://docs.shortcutco.com/developers/concepts/errors#lead\\_tags\\_admins\\_only>). Every endpoint can also return the \[common errors]\(<https://docs.shortcutco.com/developers/concepts/errors>).

```json
{"openapi":"3.1.0","info":{"title":"Shortcut API","version":"v1"},"tags":[{"name":"Leads","description":"A lead is a request for service. Creating one through the API works like your website form: staff are notified, and the lead appears in Customers with the Lead label.\n\nFields: [The lead object](https://docs.shortcutco.com/developers/reference/objects/lead)."}],"servers":[{"url":"https://api.shortcutco.com","description":"Production"}],"security":[{"bearerAuth":["leads:write"]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"scut_<env>_<id>_<secret>","description":"A workspace API token. Each operation lists the scopes it needs; `write` implies `read`, and `send`/`complete` are never implied."}},"headers":{"RateLimitLimit":{"schema":{"type":"integer"},"description":"Requests allowed in the tightest window."},"RateLimitRemaining":{"schema":{"type":"integer"},"description":"Requests left in that window."},"RateLimitReset":{"schema":{"type":"integer"},"description":"Seconds until that window resets."}},"responses":{"BadRequest":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthenticated":{"description":"The token is missing, invalid, expired, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"SubscriptionRequired":{"description":"The workspace's subscription needs attention.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The token is missing a required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such object in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"Conflict with the current state or an in-flight request with the same idempotency key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unprocessable":{"description":"The request cannot be applied, or its idempotency key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limited; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"Temporarily unavailable; retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","description":"Error family, such as `invalid_request` or `permission`."},"code":{"type":"string","description":"Specific error code; see the errors page."},"message":{"type":"string","description":"A human-readable explanation."},"param":{"type":"string","description":"The input the error is about, such as `query.limit`."},"requiredScope":{"type":"string","description":"The scope the token is missing."},"requestId":{"type":"string","description":"Quote this id to support."},"docs":{"type":"string","description":"Link to the error's documentation."}},"required":["type","code","message","requestId","docs"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}},"paths":{"/v1/leads/{id}/tags/{tagId}":{"delete":{"operationId":"leads.tags.remove","tags":["Leads"],"summary":"Remove a lead's tag","description":"Removes the tag from the current linked account and any residual lead attachment, matching the native picker. Requires expectedCustomerId (UUID or null); linked accounts additionally require customers:write. Removal has no Undo or saved inverse; correction is a fresh approved attach. For an attach correction only, pass both attachmentId and attachmentCreatedAt returned by that attach: only that exact row under the unchanged owner is removed; replacements and conversion refuse. External approval and automations:trigger gates apply normally.\n\n**Errors specific to this endpoint:** [`invalid_body`](https://docs.shortcutco.com/developers/concepts/errors#invalid_body), [`lead_tags_admins_only`](https://docs.shortcutco.com/developers/concepts/errors#lead_tags_admins_only). Every endpoint can also return the [common errors](https://docs.shortcutco.com/developers/concepts/errors).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"tagId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"expectedCustomerId","in":"query","required":true,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},{"name":"attachmentId","in":"query","required":false,"description":"For exact-attachment correction only: the ID returned by a successful attach.","schema":{"type":"string","format":"uuid"}},{"name":"attachmentCreatedAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Success.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"leadId":{"type":"string","format":"uuid","description":"The lead the request named."},"tagId":{"type":"string","format":"uuid","description":"The existing tag the request named."},"customerId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The acknowledged current customer owner, or null for the lead itself."},"changed":{"type":"boolean","description":"Whether this request inserted or removed an attachment."},"createdAttachment":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"customerId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["id","createdAt","customerId"],"additionalProperties":false},{"type":"null"}],"description":"Only an actual new attach returns an exact-row correction receipt. No-op attaches and removals return null."}},"required":["leadId","tagId","customerId","changed","createdAttachment"],"additionalProperties":false},"meta":{"type":"object","properties":{},"additionalProperties":true,"description":"Facts about this request beside the object, such as `alreadyReminded` on a repeated reminder. Present only when there is something to report."}},"required":["data"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"$ref":"#/components/responses/SubscriptionRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}}}}
```

## List a lead's timeline

> Everything that happened with a lead, newest first, as the lead's profile shows it: the request, texts and emails, estimates, automations, notes, tasks and posts. Covers the 200 most recent events. Filter by \`group\` to get one kind of activity.\
> \
> Returns a list of \[timeline event objects]\(<https://docs.shortcutco.com/developers/reference/objects/timeline-event>).

```json
{"openapi":"3.1.0","info":{"title":"Shortcut API","version":"v1"},"tags":[{"name":"Leads","description":"A lead is a request for service. Creating one through the API works like your website form: staff are notified, and the lead appears in Customers with the Lead label.\n\nFields: [The lead object](https://docs.shortcutco.com/developers/reference/objects/lead)."}],"servers":[{"url":"https://api.shortcutco.com","description":"Production"}],"security":[{"bearerAuth":["leads:read","activity:read"]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"scut_<env>_<id>_<secret>","description":"A workspace API token. Each operation lists the scopes it needs; `write` implies `read`, and `send`/`complete` are never implied."}},"headers":{"RateLimitLimit":{"schema":{"type":"integer"},"description":"Requests allowed in the tightest window."},"RateLimitRemaining":{"schema":{"type":"integer"},"description":"Requests left in that window."},"RateLimitReset":{"schema":{"type":"integer"},"description":"Seconds until that window resets."}},"schemas":{"TimelineEvent":{"type":"object","properties":{"id":{"type":"string","description":"The event's id, stable across reads."},"object":{"type":"string","const":"timeline_event","description":"Always `timeline_event`."},"kind":{"type":"string","description":"What happened, e.g. `job_completed`, `sms_received`, `estimate_approved`, `invoice_paid`, `note`, `photo`, `task`. New kinds can appear; treat an unknown kind as a generic event."},"group":{"type":"string","enum":["comments","visits","messages","estimates","billing","automations","tasks","chemicals","lead"],"description":"The filter the profile's Activity tab files the event under."},"occurredAt":{"type":"string","format":"date-time","description":"When it happened, ISO 8601 in UTC."},"title":{"type":"string","description":"The one-line summary the profile shows."},"detail":{"type":"string","description":"More text when the event has it (a note's or message's text); empty otherwise. A note's text needs `notes:read`: without it a note event's title is `Note added` and its detail is empty."},"authorName":{"type":["string","null"],"description":"Who did it, when a person did."},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentReference"},"description":"Photos, videos, and files on the event."},"taskId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The task, for task events."},"activityPostId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The activity post, for posts on the feed."},"visitIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The visits a visit event stands for (a visit can group several services)."},"propertyId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The customer's property the event is about (visits, crew notes and photos, reviews, chemical applications, estimates, invoices and payments, and posts and tasks tagged to a property); null when it is about the whole account (messages, autopay, automations, lead changes)."},"viaApp":{"type":["string","null"],"description":"The connected app or API token whose change made this event, e.g. `Grok`; null when a person, the customer, or Shortcut did."}},"required":["id","object","kind","group","occurredAt","title","detail","authorName","attachments","taskId","activityPostId","visitIds","propertyId","viaApp"],"additionalProperties":false,"description":"One thing that happened with a customer, as the profile's Activity tab shows it."},"AttachmentReference":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The attachment's id; `GET /v1/attachments/{id}` returns a download link."},"source":{"type":"string","enum":["activity_post","visit","estimate","inbox_email","project"],"description":"Where the file lives."},"type":{"type":"string","enum":["photo","video","file"],"description":"Photo, video, or any other file."},"filename":{"type":["string","null"],"description":"The file's name, when the event carries it."}},"required":["id","source","type","filename"],"additionalProperties":false},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","description":"Error family, such as `invalid_request` or `permission`."},"code":{"type":"string","description":"Specific error code; see the errors page."},"message":{"type":"string","description":"A human-readable explanation."},"param":{"type":"string","description":"The input the error is about, such as `query.limit`."},"requiredScope":{"type":"string","description":"The scope the token is missing."},"requestId":{"type":"string","description":"Quote this id to support."},"docs":{"type":"string","description":"Link to the error's documentation."}},"required":["type","code","message","requestId","docs"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}},"responses":{"BadRequest":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthenticated":{"description":"The token is missing, invalid, expired, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"SubscriptionRequired":{"description":"The workspace's subscription needs attention.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The token is missing a required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such object in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limited; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"Temporarily unavailable; retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/leads/{id}/timeline":{"get":{"operationId":"leads.timeline.list","tags":["Leads"],"summary":"List a lead's timeline","description":"Everything that happened with a lead, newest first, as the lead's profile shows it: the request, texts and emails, estimates, automations, notes, tasks and posts. Covers the 200 most recent events. Filter by `group` to get one kind of activity.\n\nReturns a list of [timeline event objects](https://docs.shortcutco.com/developers/reference/objects/timeline-event).","parameters":[{"name":"id","in":"path","required":true,"description":"The object's id.","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"description":"How many items to return, 1-200. Defaults to 50.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","required":false,"description":"The `meta.nextCursor` from the previous page. Omit it for the first page.","schema":{"type":"string","minLength":1,"maxLength":4096}},{"name":"group","in":"query","required":false,"description":"Only events in this group, as the Activity tab's filters group them.","schema":{"type":"string","enum":["comments","visits","messages","estimates","billing","automations","tasks","chemicals","lead"]}}],"responses":{"200":{"description":"Success.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TimelineEvent"}},"meta":{"type":"object","properties":{"nextCursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page; null on the last page."},"hasMore":{"type":"boolean","description":"Whether another page exists."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"$ref":"#/components/responses/SubscriptionRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}}}}
```

## Get a lead by your id

> The lead your id maps to, as \`GET /v1/leads/{id}\` returns it, or 404.\
> \
> Returns \[the lead object]\(<https://docs.shortcutco.com/developers/reference/objects/lead>).

```json
{"openapi":"3.1.0","info":{"title":"Shortcut API","version":"v1"},"tags":[{"name":"Leads","description":"A lead is a request for service. Creating one through the API works like your website form: staff are notified, and the lead appears in Customers with the Lead label.\n\nFields: [The lead object](https://docs.shortcutco.com/developers/reference/objects/lead)."}],"servers":[{"url":"https://api.shortcutco.com","description":"Production"}],"security":[{"bearerAuth":["leads:read"]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"scut_<env>_<id>_<secret>","description":"A workspace API token. Each operation lists the scopes it needs; `write` implies `read`, and `send`/`complete` are never implied."}},"headers":{"RateLimitLimit":{"schema":{"type":"integer"},"description":"Requests allowed in the tightest window."},"RateLimitRemaining":{"schema":{"type":"integer"},"description":"Requests left in that window."},"RateLimitReset":{"schema":{"type":"integer"},"description":"Seconds until that window resets."}},"schemas":{"Lead":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The lead's id."},"object":{"type":"string","const":"lead","description":"Always `lead`."},"firstName":{"type":"string","description":"First name."},"lastName":{"type":"string","description":"Last name."},"companyName":{"type":["string","null"],"description":"Company name, when the lead is a business."},"email":{"type":["string","null"],"description":"Email address, or null when none is on file."},"phone":{"type":["string","null"],"description":"The primary phone number (where texts go) in E.164 form, such as `+14065550142`, or null."},"phones":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The number's id. Send it back to keep the number when replacing the list."},"number":{"type":"string","description":"The number as entered, such as `(406) 555-0142`."},"e164":{"type":["string","null"],"description":"The number in E.164 (`+14065550142`), or null when it cannot be read as a phone number (it is shown, never texted)."},"label":{"anyOf":[{"type":"string","enum":["mobile","home","work","other","custom"]},{"type":"null"}],"description":"`mobile`, `home`, `work`, `other`, or `custom` (see `customLabel`). Null for an unlabeled number."},"customLabel":{"type":["string","null"],"description":"The label when `label` is `custom`, such as `Spouse` or `Property manager`."},"isPrimary":{"type":"boolean","description":"Texts go to the primary number. Exactly one number is primary when the list is not empty; `phone` is its copy."},"smsConsentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When this number agreed to texts, ISO 8601 in UTC, when recorded. It never blocks or allows a text: opting out is a STOP text."},"smsConsentSource":{"anyOf":[{"type":"string","enum":["office_recorded","web_form","import","inbound_text"]},{"type":"null"}],"description":"How the consent was recorded."}},"required":["id","number","e164","label","customLabel","isPrimary","smsConsentAt","smsConsentSource"],"additionalProperties":false,"description":"One of the record's phone numbers."},"description":"Every phone number, primary first. For a lead linked to a customer, only the customer's primary number; read the customer (customers:read) for the rest."},"address":{"type":"string","description":"The service address."},"servicesRequested":{"type":"array","items":{"type":"string"},"description":"What the lead asked for."},"specialRequests":{"type":["string","null"],"description":"Anything else the lead said, or null."},"estimatedHours":{"type":["number","null"],"description":"The office's estimate of the work in hours, or null."},"sqFootage":{"type":["number","null"],"description":"Square footage typed in by hand, or null."},"status":{"type":"string","enum":["pending","dismissed","lost"],"description":"`pending` leads are open; `dismissed` leads were set aside; `lost` leads declined an estimate and reopen when a new estimate is sent or they submit the request form again."},"lifecycleStage":{"type":"string","enum":["lead","prospect","customer"],"description":"`lead` until an estimate is sent (`prospect`) or a job is booked (`customer`)."},"source":{"type":"string","enum":["intake_form","manual","csv","api"],"description":"How the lead arrived: `intake_form` for the website form, `manual` for leads added in the app, `csv` for an import, `api` for leads created with the API (leads it created before October 2026 read `manual`), unless the create set `leadSource` to `intake_form` or `manual`. New values may be added; treat an unknown one like `manual`."},"customerId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The customer account linked to the lead's email. It appears in the customers list and find_customer once it has a job or the lead converts. Null when the lead is not linked, for example when its email belongs to a staff member."},"propertyId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The lead's property (service address), when linked."},"lostReason":{"anyOf":[{"type":"string","enum":["price","timing","competitor","other"]},{"type":"null"}],"description":"Why the lead was lost, as a person marked it (`price`, `timing`, `competitor`, `other`); null unless `status` is `lost`."},"lostAt":{"anyOf":[{"type":"string","format":"date-time","description":"When the lead was marked lost, ISO 8601 in UTC."},{"type":"null"}],"description":"When the lead was marked lost, ISO 8601 in UTC."},"customerAt":{"anyOf":[{"type":"string","format":"date-time","description":"When the lead became a customer (a job was booked), ISO 8601 in UTC."},{"type":"null"}],"description":"When the lead became a customer (a job was booked), ISO 8601 in UTC."},"importedNotes":{"type":["string","null"],"description":"Notes that came in with the lead from another system (an import), as they were written there; null when none."},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The ids of the lead's tags."},"externalReferences":{"type":"array","items":{"$ref":"#/components/schemas/ExternalReference"},"description":"Ids this lead has in your other systems, set with `externalReference`, the external upsert, or a link."},"createdAt":{"type":"string","format":"date-time","description":"When the lead was created, ISO 8601 in UTC."},"updatedAt":{"type":"string","format":"date-time","description":"When the lead last changed, ISO 8601 in UTC."}},"required":["id","object","firstName","lastName","companyName","email","phone","phones","address","servicesRequested","specialRequests","estimatedHours","sqFootage","status","lifecycleStage","source","customerId","propertyId","lostReason","lostAt","customerAt","importedNotes","tagIds","externalReferences","createdAt","updatedAt"],"additionalProperties":false,"description":"A lead: someone who asked for service."},"ExternalReference":{"type":"object","properties":{"source":{"type":"string","description":"The system the id comes from."},"externalId":{"type":"string","description":"The object's id in that system."}},"required":["source","externalId"],"additionalProperties":false,"description":"An id this object has in another system."},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","description":"Error family, such as `invalid_request` or `permission`."},"code":{"type":"string","description":"Specific error code; see the errors page."},"message":{"type":"string","description":"A human-readable explanation."},"param":{"type":"string","description":"The input the error is about, such as `query.limit`."},"requiredScope":{"type":"string","description":"The scope the token is missing."},"requestId":{"type":"string","description":"Quote this id to support."},"docs":{"type":"string","description":"Link to the error's documentation."}},"required":["type","code","message","requestId","docs"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}},"responses":{"BadRequest":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthenticated":{"description":"The token is missing, invalid, expired, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"SubscriptionRequired":{"description":"The workspace's subscription needs attention.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The token is missing a required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such object in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limited; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"Temporarily unavailable; retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/leads/external/{source}/{externalId}":{"get":{"operationId":"leads.external.get","tags":["Leads"],"summary":"Get a lead by your id","description":"The lead your id maps to, as `GET /v1/leads/{id}` returns it, or 404.\n\nReturns [the lead object](https://docs.shortcutco.com/developers/reference/objects/lead).","parameters":[{"name":"source","in":"path","required":true,"description":"Your name for the system the id comes from, such as `hubspot` or `mywebsite`: 1-64 lowercase letters, digits, `_`, `.`, or `-`, starting with a letter or digit.","schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,63}$"}},{"name":"externalId","in":"path","required":true,"description":"The object's id in that system: 1-255 characters, no spaces, slashes, or control characters.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^\\p{Cc}\\s/\\\\]+$"}}],"responses":{"200":{"description":"Success.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Lead"},"meta":{"type":"object","properties":{},"additionalProperties":true,"description":"Facts about this request beside the object, such as `alreadyReminded` on a repeated reminder. Present only when there is something to report."}},"required":["data"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"$ref":"#/components/responses/SubscriptionRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}}}}
```

## Create or update a lead by your id

> The sync endpoint. If your id is new, creates the lead exactly as \`POST /v1/leads\` does and saves the id (\`created: true\`, status 201): staff are notified, your new-lead automations run only if the token has \`automations:trigger\`, an existing customer's email needs \`customers:write\`, and it counts toward the 20 leads a minute per workspace. If the id exists (\`created: false\`, status 200), every field that differs from the stored lead is applied as \`PATCH /v1/leads/{id}\` applies it, with its scope rules: names, company, email, phone, \`servicesRequested\` (replaces the list), \`specialRequests\` (empty clears it), and the address with \`addressLat\` and \`addressLng\`. Fields equal to what is stored are left alone, so resending the same record writes nothing. A field sent but not applied is listed in \`meta.ignored\` (\`field\`, \`reason\`, \`message\`) while the rest applies: an address without coordinates (\`coordinates\_required\`), or an address move that would clear the lead's measured property map without \`confirmClearPropertyMap: true\` (\`property\_map\_would\_clear\`) or without \`customers:write\` for a lead linked to a customer's property (\`customers\_write\_required\`), or a \`leadSource\` that differs from the stored \`source\`, which only a create sets (\`set\_at\_creation\`). \`meta.effects\` lists what an applied address move cleared. Concurrent requests for the same id run one after another, so they never create two leads.\
> \
> \*\*Errors specific to this endpoint:\*\* \[\`external\_reference\_changed\`]\(<https://docs.shortcutco.com/developers/concepts/errors#external\\_reference\\_changed>), \[\`property\_map\_would\_clear\`]\(<https://docs.shortcutco.com/developers/concepts/errors#property\\_map\\_would\\_clear>). Every endpoint can also return the \[common errors]\(<https://docs.shortcutco.com/developers/concepts/errors>).

```json
{"openapi":"3.1.0","info":{"title":"Shortcut API","version":"v1"},"tags":[{"name":"Leads","description":"A lead is a request for service. Creating one through the API works like your website form: staff are notified, and the lead appears in Customers with the Lead label.\n\nFields: [The lead object](https://docs.shortcutco.com/developers/reference/objects/lead)."}],"servers":[{"url":"https://api.shortcutco.com","description":"Production"}],"security":[{"bearerAuth":["leads:write"]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"scut_<env>_<id>_<secret>","description":"A workspace API token. Each operation lists the scopes it needs; `write` implies `read`, and `send`/`complete` are never implied."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Any string up to 255 characters. Retrying with the same key returns the first response instead of repeating the write, for 24 hours.","schema":{"type":"string","maxLength":255}}},"headers":{"RateLimitLimit":{"schema":{"type":"integer"},"description":"Requests allowed in the tightest window."},"RateLimitRemaining":{"schema":{"type":"integer"},"description":"Requests left in that window."},"RateLimitReset":{"schema":{"type":"integer"},"description":"Seconds until that window resets."}},"schemas":{"Lead":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The lead's id."},"object":{"type":"string","const":"lead","description":"Always `lead`."},"firstName":{"type":"string","description":"First name."},"lastName":{"type":"string","description":"Last name."},"companyName":{"type":["string","null"],"description":"Company name, when the lead is a business."},"email":{"type":["string","null"],"description":"Email address, or null when none is on file."},"phone":{"type":["string","null"],"description":"The primary phone number (where texts go) in E.164 form, such as `+14065550142`, or null."},"phones":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The number's id. Send it back to keep the number when replacing the list."},"number":{"type":"string","description":"The number as entered, such as `(406) 555-0142`."},"e164":{"type":["string","null"],"description":"The number in E.164 (`+14065550142`), or null when it cannot be read as a phone number (it is shown, never texted)."},"label":{"anyOf":[{"type":"string","enum":["mobile","home","work","other","custom"]},{"type":"null"}],"description":"`mobile`, `home`, `work`, `other`, or `custom` (see `customLabel`). Null for an unlabeled number."},"customLabel":{"type":["string","null"],"description":"The label when `label` is `custom`, such as `Spouse` or `Property manager`."},"isPrimary":{"type":"boolean","description":"Texts go to the primary number. Exactly one number is primary when the list is not empty; `phone` is its copy."},"smsConsentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When this number agreed to texts, ISO 8601 in UTC, when recorded. It never blocks or allows a text: opting out is a STOP text."},"smsConsentSource":{"anyOf":[{"type":"string","enum":["office_recorded","web_form","import","inbound_text"]},{"type":"null"}],"description":"How the consent was recorded."}},"required":["id","number","e164","label","customLabel","isPrimary","smsConsentAt","smsConsentSource"],"additionalProperties":false,"description":"One of the record's phone numbers."},"description":"Every phone number, primary first. For a lead linked to a customer, only the customer's primary number; read the customer (customers:read) for the rest."},"address":{"type":"string","description":"The service address."},"servicesRequested":{"type":"array","items":{"type":"string"},"description":"What the lead asked for."},"specialRequests":{"type":["string","null"],"description":"Anything else the lead said, or null."},"estimatedHours":{"type":["number","null"],"description":"The office's estimate of the work in hours, or null."},"sqFootage":{"type":["number","null"],"description":"Square footage typed in by hand, or null."},"status":{"type":"string","enum":["pending","dismissed","lost"],"description":"`pending` leads are open; `dismissed` leads were set aside; `lost` leads declined an estimate and reopen when a new estimate is sent or they submit the request form again."},"lifecycleStage":{"type":"string","enum":["lead","prospect","customer"],"description":"`lead` until an estimate is sent (`prospect`) or a job is booked (`customer`)."},"source":{"type":"string","enum":["intake_form","manual","csv","api"],"description":"How the lead arrived: `intake_form` for the website form, `manual` for leads added in the app, `csv` for an import, `api` for leads created with the API (leads it created before October 2026 read `manual`), unless the create set `leadSource` to `intake_form` or `manual`. New values may be added; treat an unknown one like `manual`."},"customerId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The customer account linked to the lead's email. It appears in the customers list and find_customer once it has a job or the lead converts. Null when the lead is not linked, for example when its email belongs to a staff member."},"propertyId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The lead's property (service address), when linked."},"lostReason":{"anyOf":[{"type":"string","enum":["price","timing","competitor","other"]},{"type":"null"}],"description":"Why the lead was lost, as a person marked it (`price`, `timing`, `competitor`, `other`); null unless `status` is `lost`."},"lostAt":{"anyOf":[{"type":"string","format":"date-time","description":"When the lead was marked lost, ISO 8601 in UTC."},{"type":"null"}],"description":"When the lead was marked lost, ISO 8601 in UTC."},"customerAt":{"anyOf":[{"type":"string","format":"date-time","description":"When the lead became a customer (a job was booked), ISO 8601 in UTC."},{"type":"null"}],"description":"When the lead became a customer (a job was booked), ISO 8601 in UTC."},"importedNotes":{"type":["string","null"],"description":"Notes that came in with the lead from another system (an import), as they were written there; null when none."},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The ids of the lead's tags."},"externalReferences":{"type":"array","items":{"$ref":"#/components/schemas/ExternalReference"},"description":"Ids this lead has in your other systems, set with `externalReference`, the external upsert, or a link."},"createdAt":{"type":"string","format":"date-time","description":"When the lead was created, ISO 8601 in UTC."},"updatedAt":{"type":"string","format":"date-time","description":"When the lead last changed, ISO 8601 in UTC."}},"required":["id","object","firstName","lastName","companyName","email","phone","phones","address","servicesRequested","specialRequests","estimatedHours","sqFootage","status","lifecycleStage","source","customerId","propertyId","lostReason","lostAt","customerAt","importedNotes","tagIds","externalReferences","createdAt","updatedAt"],"additionalProperties":false,"description":"A lead: someone who asked for service."},"ExternalReference":{"type":"object","properties":{"source":{"type":"string","description":"The system the id comes from."},"externalId":{"type":"string","description":"The object's id in that system."}},"required":["source","externalId"],"additionalProperties":false,"description":"An id this object has in another system."},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","description":"Error family, such as `invalid_request` or `permission`."},"code":{"type":"string","description":"Specific error code; see the errors page."},"message":{"type":"string","description":"A human-readable explanation."},"param":{"type":"string","description":"The input the error is about, such as `query.limit`."},"requiredScope":{"type":"string","description":"The scope the token is missing."},"requestId":{"type":"string","description":"Quote this id to support."},"docs":{"type":"string","description":"Link to the error's documentation."}},"required":["type","code","message","requestId","docs"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}},"responses":{"BadRequest":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthenticated":{"description":"The token is missing, invalid, expired, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"SubscriptionRequired":{"description":"The workspace's subscription needs attention.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The token is missing a required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such object in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"Conflict with the current state or an in-flight request with the same idempotency key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unprocessable":{"description":"The request cannot be applied, or its idempotency key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limited; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"Temporarily unavailable; retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/leads/external/{source}/{externalId}":{"put":{"operationId":"leads.external.upsert","tags":["Leads"],"summary":"Create or update a lead by your id","description":"The sync endpoint. If your id is new, creates the lead exactly as `POST /v1/leads` does and saves the id (`created: true`, status 201): staff are notified, your new-lead automations run only if the token has `automations:trigger`, an existing customer's email needs `customers:write`, and it counts toward the 20 leads a minute per workspace. If the id exists (`created: false`, status 200), every field that differs from the stored lead is applied as `PATCH /v1/leads/{id}` applies it, with its scope rules: names, company, email, phone, `servicesRequested` (replaces the list), `specialRequests` (empty clears it), and the address with `addressLat` and `addressLng`. Fields equal to what is stored are left alone, so resending the same record writes nothing. A field sent but not applied is listed in `meta.ignored` (`field`, `reason`, `message`) while the rest applies: an address without coordinates (`coordinates_required`), or an address move that would clear the lead's measured property map without `confirmClearPropertyMap: true` (`property_map_would_clear`) or without `customers:write` for a lead linked to a customer's property (`customers_write_required`), or a `leadSource` that differs from the stored `source`, which only a create sets (`set_at_creation`). `meta.effects` lists what an applied address move cleared. Concurrent requests for the same id run one after another, so they never create two leads.\n\n**Errors specific to this endpoint:** [`external_reference_changed`](https://docs.shortcutco.com/developers/concepts/errors#external_reference_changed), [`property_map_would_clear`](https://docs.shortcutco.com/developers/concepts/errors#property_map_would_clear). Every endpoint can also return the [common errors](https://docs.shortcutco.com/developers/concepts/errors).","parameters":[{"name":"source","in":"path","required":true,"description":"Your name for the system the id comes from, such as `hubspot` or `mywebsite`: 1-64 lowercase letters, digits, `_`, `.`, or `-`, starting with a letter or digit.","schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,63}$"}},{"name":"externalId","in":"path","required":true,"description":"The object's id in that system: 1-255 characters, no spaces, slashes, or control characters.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^\\p{Cc}\\s/\\\\]+$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":100,"description":"First name."},"lastName":{"type":"string","minLength":1,"maxLength":100,"description":"Last name."},"email":{"type":"string","format":"email","maxLength":254,"description":"Email address. Required: the app uses it to match the lead to an existing customer."},"phone":{"type":"string","maxLength":30,"description":"Phone number, such as `(406) 555-0142`. US numbers may omit the country code."},"companyName":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"description":"Company name, when the lead is a business."},"address":{"type":"string","minLength":1,"maxLength":300,"description":"The service address on one line, such as `412 Elm St, Bozeman, MT 59715`."},"addressLat":{"type":"number","minimum":-90,"maximum":90,"description":"The address's latitude, when you already placed it on a map. Send with `addressLng`; the lead and its property are pinned there instead of waiting to be placed."},"addressLng":{"type":"number","minimum":-180,"maximum":180,"description":"The address's longitude. Send with `addressLat`."},"servicesRequested":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"maxItems":50,"default":[],"description":"What the lead asked for, such as `Weekly mowing`. Duplicates are removed."},"specialRequests":{"type":"string","maxLength":2000,"description":"Anything else the lead said, shown on the lead in the app."},"leadSource":{"type":"string","enum":["api","intake_form","manual"],"description":"The lead's `source`: how it arrived, as the app shows it and reports and filters count it. `intake_form` for a request the customer made on your website, such as a quote form: it reads as a website form lead, and automations set to start on a website form submission run for it (with `automations:trigger`). `manual` for a lead a person took down, such as from a phone call or a walk-in: it reads Added by hand, and like one added in the app it is not badged New for staff. `api` (the default) otherwise. `csv` belongs to imports and cannot be set. Set when the lead is created; for finer detail, such as a referral or a campaign, attach a tag."},"confirmClearPropertyMap":{"type":"boolean","description":"On an existing lead, set `true` to let a new address move the lead off its measured spot, which clears its property map, measurements, and a square footage taken from that map. Without it such an address is not applied (the rest is) and `meta.ignored` says so."}},"required":["firstName","lastName","email","address"],"additionalProperties":false,"description":"The lead as in `POST /v1/leads`. When the reference is new the lead is created. When it exists, every field that differs from the stored lead is applied as `PATCH /v1/leads/{id}` applies it: names, company, email, phone, `servicesRequested` (replaces the list), `specialRequests`, and the address with `addressLat` and `addressLng`. A field that is sent but cannot be applied is listed in `meta.ignored` with the reason, and the rest still applies: an address without coordinates, or one whose move would clear a measured property map without `confirmClearPropertyMap: true` (or without `customers:write` for a lead linked to a customer's property)."}}}},"responses":{"200":{"description":"Success.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"created":{"type":"boolean","description":"True when this request created the lead."},"lead":{"$ref":"#/components/schemas/Lead"}},"required":["created","lead"],"additionalProperties":false},"meta":{"type":"object","properties":{},"additionalProperties":true,"description":"Facts about this request beside the object, such as `alreadyReminded` on a repeated reminder. Present only when there is something to report."}},"required":["data"],"additionalProperties":false}}}},"201":{"description":"Your id was new: the lead was created and your id saved (`created: true`).","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"created":{"type":"boolean","description":"True when this request created the lead."},"lead":{"$ref":"#/components/schemas/Lead"}},"required":["created","lead"],"additionalProperties":false},"meta":{"type":"object","properties":{},"additionalProperties":true,"description":"Facts about this request beside the object, such as `alreadyReminded` on a repeated reminder. Present only when there is something to report."}},"required":["data"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"$ref":"#/components/responses/SubscriptionRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}}}}
```

## List why leads and estimates were lost

> Leads marked lost and estimates declined between \`from\` and \`to\` (default the last 90 days), newest first, each with the reason code a person picked (\`price\`, \`timing\`, \`competitor\`, \`other\`) and, for an estimate, what the customer typed when declining. \`counts\` totals each kind by reason. Up to 200 of each kind.

```json
{"openapi":"3.1.0","info":{"title":"Shortcut API","version":"v1"},"tags":[{"name":"Leads","description":"A lead is a request for service. Creating one through the API works like your website form: staff are notified, and the lead appears in Customers with the Lead label.\n\nFields: [The lead object](https://docs.shortcutco.com/developers/reference/objects/lead)."}],"servers":[{"url":"https://api.shortcutco.com","description":"Production"}],"security":[{"bearerAuth":["leads:read","estimates:read"]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"scut_<env>_<id>_<secret>","description":"A workspace API token. Each operation lists the scopes it needs; `write` implies `read`, and `send`/`complete` are never implied."}},"headers":{"RateLimitLimit":{"schema":{"type":"integer"},"description":"Requests allowed in the tightest window."},"RateLimitRemaining":{"schema":{"type":"integer"},"description":"Requests left in that window."},"RateLimitReset":{"schema":{"type":"integer"},"description":"Seconds until that window resets."}},"responses":{"BadRequest":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthenticated":{"description":"The token is missing, invalid, expired, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"SubscriptionRequired":{"description":"The workspace's subscription needs attention.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The token is missing a required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such object in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limited; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"Temporarily unavailable; retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","description":"Error family, such as `invalid_request` or `permission`."},"code":{"type":"string","description":"Specific error code; see the errors page."},"message":{"type":"string","description":"A human-readable explanation."},"param":{"type":"string","description":"The input the error is about, such as `query.limit`."},"requiredScope":{"type":"string","description":"The scope the token is missing."},"requestId":{"type":"string","description":"Quote this id to support."},"docs":{"type":"string","description":"Link to the error's documentation."}},"required":["type","code","message","requestId","docs"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}},"paths":{"/v1/leads/lost-reasons":{"get":{"operationId":"leads.lost_reasons.list","tags":["Leads"],"summary":"List why leads and estimates were lost","description":"Leads marked lost and estimates declined between `from` and `to` (default the last 90 days), newest first, each with the reason code a person picked (`price`, `timing`, `competitor`, `other`) and, for an estimate, what the customer typed when declining. `counts` totals each kind by reason. Up to 200 of each kind.","parameters":[{"name":"from","in":"query","required":false,"description":"The window's first day (default 90 days before `to`), `YYYY-MM-DD` in the workspace's timezone.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"The window's last day (default today), `YYYY-MM-DD` in the workspace's timezone.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"reason","in":"query","required":false,"description":"Only this reason code.","schema":{"type":"string","enum":["price","timing","competitor","other"]}},{"name":"kind","in":"query","required":false,"description":"Only lost leads, or only declined estimates.","schema":{"type":"string","enum":["lead","estimate"]}}],"responses":{"200":{"description":"Success.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"from":{"type":"string","description":"The window's first day (company time)."},"to":{"type":"string","description":"The window's last day (company time)."},"counts":{"type":"object","properties":{"leads":{"type":"object","additionalProperties":{"type":"integer"},"description":"Lost leads by reason code; `none` for a lead lost with no reason picked."},"estimates":{"type":"object","additionalProperties":{"type":"integer"},"description":"Declined estimates by reason code; `none` for a decline with no reason picked."}},"required":["leads","estimates"],"additionalProperties":false},"rows":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["lead","estimate"],"description":"`lead`: a lead marked lost. `estimate`: an estimate the customer declined."},"on":{"type":"string","description":"The day it was lost or declined (company time)."},"name":{"type":"string","description":"Who: the lead's or the customer's name as it is on file."},"leadId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"estimateId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string","enum":["price","timing","competitor","other"]},{"type":"null"}],"description":"The reason code a person picked; null when none was picked."},"declineReason":{"type":["string","null"],"description":"What the customer typed when declining the estimate; null for a lead or when they typed nothing."},"total":{"type":["number","null"],"description":"The estimate's total in dollars; null for a lead."},"servicesRequested":{"type":"array","items":{"type":"string"},"description":"What a lost lead asked for; empty for an estimate."}},"required":["kind","on","name","leadId","customerId","estimateId","reason","declineReason","total","servicesRequested"],"additionalProperties":false}},"truncated":{"type":"boolean","description":"True when more than 200 leads or estimates matched; the newest are returned."}},"required":["from","to","counts","rows","truncated"],"additionalProperties":false},"meta":{"type":"object","properties":{},"additionalProperties":true,"description":"Facts about this request beside the object, such as `alreadyReminded` on a repeated reminder. Present only when there is something to report."}},"required":["data"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"$ref":"#/components/responses/SubscriptionRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}}}}
```
