$data = [
[
'name' => $title,
"responsible_user_id" => (int) $user_amo,
"pipeline_id" => (int) $pipeline_id,
"_embedded" => [
"contacts" => [
[
"first_name" => $fio,
"custom_fields_values" => [
[
"field_code" => "PHONE",
"values" => [
[
"enum_code" => "MOB",
"value" => $phone
]
]
],
]
]
],
],
]
];
$data = [
[
'name' => $title,
"responsible_user_id" => (int) $user_amo,
"pipeline_id" => (int) $pipeline_id,
"_embedded" => [
"metadata" => [
"category" => "forms",
"form_id" => $form_id,
"form_name" => $form_title,
"form_page" => $target,
"form_sent_at" => strtotime(date("Y-m-d H:i:s")),
"ip" => $ip,
"referer" => $domain
],
"contacts" => [
[
"first_name" => $fio,
"custom_fields_values" => [
[
"field_code" => "PHONE",
"values" => [
[
"enum_code" => "MOB",
"value" => $phone
]
]
],
]
]
],
],
]
];
$data = [
[
'name' => $title,
"responsible_user_id" => (int) $user_amo,
//"pipeline_id" => (int) $pipeline_id,
"_embedded" => [
"contacts" => [
[
"first_name" => $fio,
"custom_fields_values" => [
[
"field_code" => "PHONE",
"values" => [
[
"enum_code" => "MOB",
"value" => $phone
]
]
],
]
]
],
],
]
];