Post to lead custom field

I’m trying to post to a lead’s custom field and every time I try to it doesn’t load the lead.

$leads = array(
    'title' => $name,
    'person_id' => $person_id,
    'organization_id' => (int)($org_id),
    'customfieldcode' => $_SESSION['advert_code'] 
); 

The custom field is setup in the lead/deal data fields.

When I just post title, person_id and organization_id to the lead endpoint there isn’t an issue, however when I try and post to the custom field the post fails.

Any ideas?

Leads

Leads are potential deals stored in Leads Inbox before they are archived or converted to a Deal. Each Lead needs to be named (using the title field) and be linked to a Person or an Organization. In addition to that, a Lead can contain most of the fields a Deal can (such as value or expected_close_date ). The Leads API does not support custom fields yet.

1 Like