Can't figure out how to add custom_fields in contact create

I’m using the PHP SDK, using the REST api. I can get a contact created, but I can’t figure out how to add any info to any of my contact custom fields. I have tried a couple of different things based on different examples that I’ve seen, and nothing I have tried has worked yet:

[custom_fields] => Array
        (
            [0] => Array
                (
                    [_FormEditUrl] => http://www.awesome.com
                )

        )

Or:

[custom_fields] => Array
        (
            [0] => Array
                (
                    [content] => http://www.awesome.com
                    [id] => 1
                )

        )

Hoping someone can point me in the right direction here. The custom field I have is named: “Form Edit Url”, and in the Infusionsoft admin when I click on the “View the field database names (for the API)” link, it tells me that the “Database Name” for that field is “FormEditUrl”.

Nothing seems to work.

As some others have answered on other threads, it looks like you have to reference the the numerical ID of the custom field. And the only way to get that is to do an API call to get the custom field data. Not sure why the admin interface can’t just show you this value…

I’ve been pretty disappointed with how finicky and unclear this API has been in general. It’s possible to get it working eventually, but the battle it’s been to figure everything out is more than I bargained for… The sales folks at Infusionsoft boasted how amazing and easy the API was! It’s clear they haven’t had to actually do any development with it…

Here’s a thread that covers this same question and has an answer: