Four changes, and only one of them raises an error
The base path and the authentication change are loud: get either wrong and the request fails immediately with a 404 or a 401, and you fix it in a minute. The other two are quiet and cost days.
PUT became PATCH with merge semantics. A v1 PUT replaced the record, so omitting a field cleared it; a v2 PATCH merges, so omitting a field leaves it alone. Code that relied on omission to clear values silently stops clearing them, and nothing anywhere reports a problem.
Custom fields moved. In v1 a custom field's 40-character hash key sat at the top level of the record object alongside title and value. In v2 those keys live inside a custom_fields object. Sending the v1 shape to a v2 endpoint does not produce an invalid-field error — Pipedrive accepts the request, ignores the unrecognised top-level key, and returns 200.
v1 to v2, and how each change announces itself
| Change | v1 | v2 | Failure mode |
|---|
| Base path | /v1/... | /api/v2/... | 404 — loud |
| Auth | ?api_token=TOK | x-api-token header | 401 — loud |
| Update verb | PUT (replace) | PATCH (merge) | Silent — omitted fields stop clearing |
| Custom fields | Top-level hash key | Nested in custom_fields | Silent — write ignored, read empty |
| Pagination | start / limit offset | cursor / limit | Silent — duplicate and skipped rows |
The two payloads side by side
The hash key itself is unchanged between versions — the same 40-character string identifies the same field in both. Only its position in the JSON moves. That is precisely why the mistake is so easy to make and so hard to spot: the value that matters is correct, and the object it sits in is wrong.
# v1 (sunset) # v2 (current)
PUT /v1/deals/901?api_token=TOK PATCH /api/v2/deals/901
x-api-token: TOK
{ "title": "Acme", { "title": "Acme",
"a1b2c3d4e5f6...": "gold" } "custom_fields": {
"a1b2c3d4e5f6...": "gold" } }
# Sending the LEFT body to the RIGHT endpoint:
# -> 200 OK, title updated, custom field untouched. No error.
# Reading it back in an n8n expression
# v1: {{ $json["a1b2c3d4e5f6..."] }}
# v2: {{ $json.custom_fields["a1b2c3d4e5f6..."] }}
v2 reads do not return custom fields by default
The second half of the same change catches people on the read path. A v2 list or detail read returns the standard fields and omits custom fields unless the request asks for them. There is no error and no empty object — the keys are simply absent, so an expression reading through custom_fields evaluates to undefined and whatever is downstream receives nothing.
Ask for them explicitly, and ask for the ones you need rather than everything, since a narrower response is cheaper against the token-based daily budget.
# Without the parameter: no custom fields in the response at all
GET https://COMPANY.pipedrive.com/api/v2/deals/901
x-api-token: YOUR_TOKEN
# -> { "data": { "id": 901, "title": "Acme", "value": 12000 } }
# With it
GET https://COMPANY.pipedrive.com/api/v2/deals/901
?custom_fields=a1b2c3d4e5f6...,9f8e7d6c5b4a...
# -> { "data": { "id": 901, "title": "Acme",
# "custom_fields": { "a1b2c3d4e5f6...": "gold",
# "9f8e7d6c5b4a...": "2026-10-31" } } }
# Same for list reads, alongside cursor pagination:
GET /api/v2/deals?limit=100&custom_fields=a1b2c3d4e5f6...
# -> additional_data.next_cursor, not start/limit offsets
Migrating without a silent data gap
Because both custom-field failures are silent, the only reliable verification is a round trip: write a known value through the v2 path, read the record back through the v2 path with the field explicitly requested, and assert the value matches. Do that for one record of each object type before migrating the workflow, and keep the assertion in the workflow afterwards for the first production cycle.
Migrate the pagination at the same time rather than later. An offset walk left in place against a v2 endpoint re-reads and skips records whenever the underlying data changes mid-walk, which produces duplicates and gaps that look like application bugs and are not.
Do not migrate authentication and payload shape in the same deploy. Changing both means a failure could be either, and the two have completely different fixes.
- Base path /api/v2/, credential in the x-api-token header.
- PATCH merges — clear a field by sending null, not by omitting it.
- Writes nest custom fields under custom_fields.
- Reads must name the field hashes in ?custom_fields= to receive them.
- Pagination is cursor-based; next_cursor null means the last page.
- Verify with a write-then-read round trip, not with the write's status code.
Clearing a value under merge semantics
The move from PUT to PATCH changes how you empty a field, and it is the change most likely to survive testing and fail in production. Under v1's replace semantics, omitting a field from the payload cleared it. Under v2's merge semantics, omitting a field leaves whatever was there untouched.
So a sync whose job is to keep Pipedrive matching a source system will, after a naive migration, stop clearing values that were removed at the source. Records accumulate stale data that was correct when written and is no longer true, and because nothing errors, the drift is only discovered when someone notices a report disagreeing with the source.
Clear explicitly by sending null for the field you want emptied. Decide per field whether an absent source value means "clear it" or "leave it alone" — both are legitimate requirements and the code cannot infer which you meant. Writing that decision down per field is tedious once and saves an audit later.
Test it specifically. A test suite that only ever sets values passes completely while the clearing path is broken, because every assertion it makes is about a value being present.
# Leaves the field untouched (v2 merge)
PATCH /api/v2/deals/901
{ "title": "Acme" }
# Actually clears it
PATCH /api/v2/deals/901
{ "title": "Acme",
"custom_fields": { "a1b2c3d4e5f6...": null } }
# v1 behaviour this replaces:
# PUT /v1/deals/901 { "title": "Acme" }
# -> every omitted field cleared
Where these facts come from