Profiles
The faces you and your business show.
Profiles has six public methods for the profiles themselves: list, make, change, archive, restore and delete. One more sets which profiles an item belongs to, and three belong to Phone and cover a profile's answering rules and business identity. Each one acts for the account whose API key you use.
Choosing a Profiles plan, inviting a member, choosing a profile's assistant, and attaching a number 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. Every method also takes an optional workspace_id, to act in a workspace you own other than your home one.
Read profiles
get_account_profiles lists the profiles of the workspace, most recently changed first.
_idorprofile_idreturns one profile.filter_typenarrows the list:archivedfor archived profiles,sharedfor profiles shared with you,favoritesfor the ones marked with the heart. Left out, it lists every active profile.account_typenarrows by kind:personal,businessorvirtual.folder_idlists one dashboard folder, or__none__for the profiles in no folder.search,limit,skipandbookmarkpage and search the list.
Make a profile
create_account_profile takes a profile_name and an account_type, and optionally a profile_signature (the description), a picture and an avatar, and an email_account_id to attach a connected mailbox.
- A virtual profile also takes
virtual_character, the description its portrait is drawn from, andvirtual_traits, one choice each for age, gender, ethnicity and look. It is refused unless the workspace's Profiles plan includes virtual profiles (Starter and up) or the account has a paid membership, and the account has been verified. - A personal profile of a personal account, or a business profile of a business account, starts with the account's own picture and avatar when you send none.
- A workspace that already holds as many profiles as its plan allows refuses a new one with
code-62 andreasonplan_cap. It keeps the profiles it has. The main profile an account or workspace starts with is never refused.
Change a profile
update_account_profile takes the profile's _id and any of the fields you want to change: the name, the description, the picture and avatar, email_account_id, account_type, the virtual character and traits, and registered_apps and registered_mini_apps, which decide the modules that get a tab on every contact in the profile (registered_apps is the whole ordered list).
- Switching a profile to virtual clears the same bar as making one.
- A profile that was shared with you is a copy: its owner arranges its canvas, so a change to
canvason it is refused.
Archive, restore and delete
archive_account_profiletakesprofile_idand moves the profile to Archived. The main profile is refused. If the profile was the one in use in that workspace, the workspace goes back to its main profile.unarchive_account_profilebrings an archived profile back. It counts against the plan's limit again, so a full workspace refuses it. A profile that came with a team share cannot be restored this way.delete_account_profiledeletes an archived profile for good, and the chats that hang off it with it. It takes only an archived profile: archive first, then delete.
A profile deleted with delete_account_profile is gone, and so are the chats attached to it. Archive is the step to use when you only want a profile out of the way.
Set which profiles an item belongs to
update_entity_account_profiles takes the item's _id and a non-empty account_profiles list, and sets which profiles that item belongs to. It works on a contact, a chat, an AI assistant, an AI agent and a mini app, and refuses any other kind of item.
A profile's phone line
Three methods of Phone take a profile. They are listed with the rest of Phone's methods, and a profile is how they find its number.
get_profile_answering_rulesreads a line's answering rules (business hours, ring timeout, who is rung, forwarding, voicemail and recording) and what the current plan allows.update_profile_answering_rulessaves them. A setting the plan does not include is refused rather than dropped.update_profile_business_identitystores the business identity on the profile that will own the number.