Contacts
The people and companies you work with.
Contacts has no microservice of its own. Its public methods belong to the account microservice, which also holds Profiles, and to the team microservice for friend requests. Each one acts for the account whose API key you use.
Groups, tags, custom fields, Keep in touch, the duplicate check, the import and choosing a plan have no public method today. Those are done in the dashboard.
Send a request to a method with your key:
A refused request answers a negative code and says why in data. Most of the methods below also take an optional workspace_id, to act in a workspace you own other than your home one.
Read contacts
get_contacts lists the contacts.
_idorcontact_idreturns one contact.searchfilters the list by a search string, andnameby a name.filter_typenarrows the list, for example toarchived,shared,pinned,favoritesoronline. Left out, it lists the active contacts together with the requests to connect that are waiting.with_requestsset totrueadds the pending requests, sent and received, to a filtered list too.taglists the contacts that carry one tag,folder_idlists one folder (send__none__for the contacts in no folder), andgroup_idlists the members of one contact group.profile_idreads the contacts of another profile of yours.limit,skipandbookmarkpage the list.
Add a contact
create_contact adds a person by hand. It takes name and email, which are required, and optionally phone, company, job_title, and account_type set to personal or business, which saves a model the work of guessing.
- The email is the book's key. Sending one you already hold returns the existing contact instead of a second copy.
sourcerecords where the contact came from,manualwhen you send none, andcontextis one line that shows on the contact's activity.profile_idfiles the contact under another profile of yours.- Nobody is asked anything and no email is sent. It is the same as Add without invitation in the dashboard.
To bring a list in from code, call it once per person.
Friend requests
add_contact_membersends a request to another Xuda user, found byaccess_emailor byto_uid.get_contact_memberslists your requests and connections, each with the other person's card.stattakes one request status, or several, to list.unfriend_contacttakes acontact_idand ends the connection. The contact stays in your book.
Organize a contact
Each of these takes a contact_id.
favorite_contactandunfavorite_contactset and clear the heart, which is what the Favorites choice of the Filter lists.pin_contactandunpin_contactpin a contact and take the pin away.set_not_contactmoves a sender out of the list into Not contacts, for a bank's alerts, a store's receipts or a no-reply address. Its mail is still read as before.unset_not_contactputs it back and keeps it there.not_spam_contactmarks a contact as not spam and trusts its address.set_deep_research_contactturns deep research on for a contact, andunset_deep_research_contactturns it off and clears what it kept.generate_contact_avatarclears a contact's pictures and draws a new avatar. It is not available on free accounts.
Archive and delete
archive_contactmoves a contact to Archived.unarchive_contactbrings it back.delete_contactdeletes a contact. In the dashboard only an archived contact can be deleted, so archive first.
A contact deleted with delete_contact is gone. Archive is the step to use when you only want a contact out of the way.