civicrm_whoami
Get current contact
The CiviCRM contact this API key belongs to (contact id, display name, contact type) and how it authenticated. Everything the other tools do is limited to that contact's permissions. GET /civicrm/authx/id, then APIv4 Contact.get.
Takes no parameters.
civicrm_search_contacts
Search contacts
Find contacts (people, organizations, households) by a word in their name, e-mail address or phone number, optionally of one contact type. Trashed contacts are left out. Returns id, display name, type, primary e-mail and phone. APIv4 Contact.get.
Parameterslimitqueryoffsetcontact_type
civicrm_get_contact
Get contact
One contact by id: name, type, job title, source, communication preferences (do not e-mail, opted out, ...), dates, plus all their e-mail addresses, phone numbers and postal addresses. APIv4 Contact.get, Email.get, Phone.get, Address.get.
Parameterscontact_idrequired
civicrm_list_contact_notes
List contact notes
The notes recorded on one contact (subject, text, who wrote it, when), newest first. APIv4 Note.get.
Parameterslimitoffsetcontact_idrequired
civicrm_list_relationships
List contact relationships
The relationships of one contact (employee of, spouse of, volunteer for, ...) with the other contact, start and end date and whether it is active. APIv4 Relationship.get.
Parameterslimitoffsetcontact_idrequiredactive_only
civicrm_list_contributions
List contributions
Contributions (donations, membership dues, event fees) with contact, amount, currency, financial type, status, payment method, date and source, newest first. Filter by contact, status, financial type, date range and minimum amount. Test contributions are left out. APIv4 Contribution.get.
Parameterslimitoffsetstatusdate_todate_fromcontact_idmin_amountfinancial_type
civicrm_list_memberships
List memberships
Memberships with contact, membership type, status (New, Current, Grace, Expired, ...), join, start and end date. Filter by contact, status, type, or those ending before a date (renewal follow-up). Test memberships are left out. APIv4 Membership.get.
Parameterslimitoffsetstatuscontact_idends_afterends_beforemembership_type
civicrm_list_events
List events
Events with title, type, start and end date, whether active and public, maximum participants and summary. Upcoming events first when upcoming_only is set. Template events are left out. APIv4 Event.get.
Parameterslimittitleoffsetactive_onlyupcoming_only
civicrm_list_participants
List event participants
Event registrations with event, contact, status (Registered, Attended, Cancelled, ...), role, registration date and fee. Filter by event, contact or status. Test registrations are left out. APIv4 Participant.get.
Parameterslimitoffsetstatusevent_idcontact_id
civicrm_list_activities
List activities
Activities (meetings, phone calls, e-mails, follow-ups, ...) with type, subject, status, date and details, newest first. With contact_id: the activities that contact took part in, with their role (source, target or assignee). Otherwise all activities, optionally of one type or status. APIv4 ActivityContact.get / Activity.get.
Parameterslimitoffsetstatusdate_todate_fromcontact_idactivity_type
civicrm_list_cases
List cases
Cases (CiviCase) with subject, case type, status and dates. With contact_id: the cases that contact is a client of. Needs the CiviCase component to be enabled. APIv4 CaseContact.get / Case.get.
Parameterslimitoffsetstatuscontact_id
civicrm_list_groups
List groups
Contact groups (mailing lists, static groups, smart groups) with title, description, visibility and type. APIv4 Group.get.
Parameterslimittitleoffsetactive_only
civicrm_list_group_contacts
List group members
The members of one static group (or the groups one contact belongs to): contact, group and membership status (Added, Removed, Pending). Smart groups are computed by CiviCRM and not listed here. APIv4 GroupContact.get.
Parameterslimitoffsetstatusgroup_idcontact_id
civicrm_get_fields
Describe an entity's fields
The fields of one CiviCRM entity (Contact, Contribution, Event, ...) including custom fields: name, label, data type, whether required, and the allowed options for a pick-list field. Use it to find the right field names for civicrm_query and the right option names for the filters and write tools. APIv4 <Entity>.getFields.
Parametersfieldactionentityrequired
civicrm_list_entities
List API entities
The APIv4 entities this CiviCRM site offers (Contact, Contribution, Event, plus those of installed extensions), with a short description. Use the names with civicrm_get_fields and civicrm_query. APIv4 Entity.get.
Parameterssearch
civicrm_query
Query any entity
Read records of ANY CiviCRM entity with APIv4 Entity.get: choose fields, filter, sort and page. Use civicrm_list_entities and civicrm_get_fields for the names. Field names may be joined (`contact_id.display_name`, `email_primary.email`) or ask for an option's text (`status_id:label`). Examples: entity Tag; entity Campaign with where [{field:'is_active',op:'=',value:true}]; entity Contribution with select ['id','total_amount'] and where [{field:'total_amount',op:'>=',value:1000}]. Read-only; credential fields and system entities (settings, payment processors, mailings, users) are refused.
Parameterslimitwhereentityrequiredoffsetselectrequiredorder_by
civicrm_create_contact
Create contact
WRITE: creates ONE new contact (an individual, organization or household) and optionally its first e-mail address and phone number. Does not check for duplicates: search first with civicrm_search_contacts. Sends nothing. APIv4 Contact.create, Email.create, Phone.create.
Parametersemailphonesourcejob_titlelast_namefirst_namecontact_typerequiredhousehold_nameorganization_name
civicrm_update_contact
Update contact
WRITE: changes basic fields of ONE existing contact (name, job title, source, preferred language) and/or its communication preferences (do not e-mail, do not phone, do not mail, do not SMS, opted out of bulk mail). Only the fields you give are changed. Setting a do-not flag to false re-enables contact the person may have declined, so only do that on the person's request. APIv4 Contact.update.
Parameterssourcejob_titlelast_namecontact_idrequireddo_not_smsfirst_nameis_opt_outdo_not_maildo_not_emaildo_not_phonehousehold_nameorganization_name+1 more
civicrm_add_contact_note
Add contact note
WRITE: adds ONE note to a contact's record, written by the contact this API key belongs to. Sends nothing. APIv4 Note.create.
Parametersnoterequiredsubjectcontact_idrequired
civicrm_log_activity
Log activity
WRITE: records ONE activity (a meeting, phone call, e-mail, follow-up, ...) with one or more contacts. It only STORES the record: an activity of type Email does not send an e-mail. Added by the contact this API key belongs to unless source_contact_id is given. APIv4 Activity.create.
Parametersstatusdetailssubjectrequiredactivity_typerequiredwith_contact_idsrequiredsource_contact_idactivity_date_timeassignee_contact_ids
civicrm_record_contribution
Record contribution
WRITE: records ONE contribution (a donation, a payment received elsewhere) for a contact. It only STORES the financial record: no card is charged, no receipt is e-mailed, and the amount shows up in CiviCRM's reports and the contact's giving history. Check civicrm_list_contributions first to avoid a duplicate. APIv4 Contribution.create.
Parameterssourcestatustrxn_idcurrencycontact_idrequiredreceive_datetotal_amountrequiredfinancial_typerequiredpayment_method
civicrm_create_membership
Create membership
WRITE: gives ONE contact a membership of a type. CiviCRM works out the dates and status from the type unless you give dates. It does NOT record a payment (use civicrm_record_contribution for that) and sends nothing. APIv4 Membership.create.
Parameterssourceend_datejoin_datecontact_idrequiredstart_datemembership_typerequired
civicrm_add_contact_to_group
Add contact to group
WRITE: adds ONE contact to ONE static group. If the group is used as a mailing list, the contact will receive future mailings sent to it, so only add people who agreed. Sends nothing by itself. Adding a contact who is already in the group changes nothing; a contact who was removed from it (or is pending) is set back to Added. APIv4 GroupContact.save matched on group and contact.
Parametersgroup_idrequiredcontact_idrequired
civicrm_register_participant
Register participant
WRITE: registers ONE contact for ONE event (a participant record). It does not check the event's capacity or fee, does not take payment and sends no confirmation e-mail. APIv4 Participant.create.
Parametersrolesourcestatusevent_idrequiredcontact_idrequired