Leads update custom fields

Hi guys, how are you?

I’m trying to use the method cited in the article Pipedrive API v1 Reference, which defined that we can update custom fields on leads in the same way as the deal described in this article: Updating custom fields' values.

But I tried many things and always gave me a bad request error, 400. I’m using make.com to do this requests:

Input file:

[
    {
        "ca": null,
        "qs": [],
        "url": "<company>/v1/leads/<id>?api_token=<token>",
        "gzip": true,
        "method": "put",
        "headers": [
            {
                "name": "Content-Type",
                "value": "application/x-www-form-urlencoded"
            }
        ],
        "timeout": null,
        "useMtls": false,
        "authPass": null,
        "authUser": null,
        "bodyType": "x_www_form_urlencoded",
        "formFields": [
            {
                "key": "name",
                "value": "4dc45df663f49764a79de2c441a78d187c00314d"
            },
            {
                "key": "options",
                "value": "TESTEEEE"
            }
        ],
        "serializeUrl": false,
        "shareCookies": false,
        "parseResponse": false,
        "followRedirect": true,
        "useQuerystring": false,
        "followAllRedirects": false,
        "rejectUnauthorized": true
    }
]

Following the output file:

    [
    {
        "statusCode": 404,
        "headers": [
            {
                "name": "date",
                "value": "Mon, 19 Sep 2022 09:27:05 GMT"
            },
            {
                "name": "content-type",
                "value": "text/plain; charset=utf-8"
            },
            {
                "name": "content-length",
                "value": "9"
            },
            {
                "name": "connection",
                "value": "close"
            },
            {
                "name": "cf-ray",
                "value": "74d148938ea85950-IAD"
            },
            {
                "name": "cache-control",
                "value": "no-cache"
            },
            {
                "name": "strict-transport-security",
                "value": "max-age=31536000; includeSubDomains"
            },
            {
                "name": "cf-cache-status",
                "value": "DYNAMIC"
            },
            {
                "name": "access-control-expose-headers",
                "value": "X-RateLimit-Remaining, X-RateLimit-Limit, X-RateLimit-Reset"
            },
            {
                "name": "badi",
                "value": "Routing: us-east-1=>us-east-1; Version: 12b7; Host: bari;"
            },
            {
                "name": "content-security-policy",
                "value": "default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self' https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"
            },
            {
                "name": "expect-ct",
                "value": "max-age=0"
            },
            {
                "name": "referrer-policy",
                "value": "no-referrer"
            },
            {
                "name": "x-content-type-options",
                "value": "nosniff"
            },
            {
                "name": "x-correlation-id",
                "value": "950f1920-fa4e-40c0-8cdb-b82ea2dc8970"
            },
            {
                "name": "x-daily-requests-left",
                "value": "9977"
            },
            {
                "name": "x-dns-prefetch-control",
                "value": "off"
            },
            {
                "name": "x-download-options",
                "value": "noopen"
            },
            {
                "name": "x-frame-options",
                "value": "SAMEORIGIN"
            },
            {
                "name": "x-permitted-cross-domain-policies",
                "value": "none"
            },
            {
                "name": "x-ratelimit-limit",
                "value": "40"
            },
            {
                "name": "x-ratelimit-remaining",
                "value": "39"
            },
            {
                "name": "x-ratelimit-reset",
                "value": "2"
            },
            {
                "name": "x-xss-protection",
                "value": "0, 1; mode=block"
            },
            {
                "name": "set-cookie",
                "value": "__cf_bm=houMI8maAj0A44XCDAgISLcNC1juAp9L1xO5iOmdEkM-1663579625-0-AYu/7W0Br015WgHB3wu4zYcxkt1V6ZmtpiEUm1ZTzr+4lchVSmesE+txM+kk8SkdufR1gR9Ec9KMnJrC/3S+2yA=; path=/; expires=Mon, 19-Sep-22 09:57:05 GMT; domain=.pipedrive.com; HttpOnly; Secure; SameSite=None"
            },
            {
                "name": "server",
                "value": "cloudflare"
            },
            {
                "name": "alt-svc",
                "value": "h3=\":443\"; ma=86400, h3-29=\":443\"; ma=86400"
            }
        ],
        "cookieHeaders": [
            "__cf_bm=houMI8maAj0A44XCDAgISLcNC1juAp9L1xO5iOmdEkM-1663579625-0-AYu/7W0Br015WgHB3wu4zYcxkt1V6ZmtpiEUm1ZTzr+4lchVSmesE+txM+kk8SkdufR1gR9Ec9KMnJrC/3S+2yA=; path=/; expires=Mon, 19-Sep-22 09:57:05 GMT; domain=.pipedrive.com; HttpOnly; Secure; SameSite=None"
        ],
        "data": "Not Found",
        "fileSize": 9
    }
]

appreciate any help :slight_smile: