1

I successfully used civicrm to create a contact but I want to send a custom field value through api to be saved on the created contact but can't find a way to do can you advise, when I search in support -> developer -> api explorer only found "CustomField" but can't use it to set custom field value on a specific contact.

1

good to hear you had some success! I would expect the api explorer to show you the custom fields for contact? You can use the custom fields with the api if you know the id of the custom field. So for custom field with id 5 the parameter for the API would be:

 custom_5 => <your value>

So an example would be:

$result = civicrm_api3('Contact', 'create', [
  'custom_11' => "blablabla",
])

;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.