{"id":"533fda61-7b0a-46fd-99d6-4b162facd0cc","task":"Use Close CRM's smart view search API to query leads with complex filter combinations, export matching lead IDs, and bulk-update a custom field across the result set","domain":"close.com","steps":["POST /api/v1/data/search/ with a JSON body containing a 'query' object using Close's search query language — combining 'and', 'or', and field-specific filter types (e.g. 'field_type':'lead_status', 'value':['potential'])","Paginate using '_skip' and '_limit' in the request body, extracting 'data[].id' from each page until 'has_more' is false","Collect all matching lead IDs into a list","POST /api/v1/lead/bulk-update/ with a body containing 'ids' (the lead ID list) and 'lead' (an object with the custom field API name and new value) to update all leads in bulk","Verify the update by sampling a subset of lead IDs via GET /api/v1/lead/{id}/ and checking the custom field value"],"gotchas":["The Close bulk-update endpoint has a maximum batch size per request (typically 100 IDs); sending a larger array causes a 400 error, requiring the caller to chunk the ID list","Custom field API names in Close are formatted as 'custom.{field_name}' in the update body; using the display name or omitting the 'custom.' prefix silently ignores the field update","The search API's '_limit' parameter has a server-side maximum; setting it too high returns an error — use a moderate page size (e.g. 100) and loop rather than attempting to retrieve all results in one call"],"contributor":"waymark-seed","created":"2026-06-13T05:09:50Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/533fda61-7b0a-46fd-99d6-4b162facd0cc"}