Save contacts on the phone
save_contactsSave WhatsApp contacts to the linked phone and its address book, individually or in batches of up to 500, while queued sync reports pending, synced, or failed status.
Instructions
Save contacts on the linked phone, in WhatsApp and in the phone's own address book, as if they were saved on the phone. Any number can be saved. Saves are queued (also while the account reconnects): each contact's phoneSync says pending, then synced or failed (not_on_whatsapp, account_offline), and contact.updated fires; the phone shows the name about a minute later. Removing a contact is not supported. backfill_auto_save queues the contacts of the account's existing direct chats, named with its auto-save templates (update_account contactAutoSave), at most 200 a day.
Actions:
one: Save one contact undersavedName. Returns the contact with itsphoneSync.many: Save up to 500 contacts at once. Returns the batch id and each contact's status.backfill_auto_save: Queue the auto-save of the contacts of the account's existing direct chats.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | What to do. See the list of actions in the tool description. | |
| contacts | No | 1 to 500 contacts to save. Required for `many`. | |
| accountId | No | The wuapi account id of the linked number to act as (from list_accounts). Required for every action. | |
| contactId | No | A contact: E.164 with + (`+584241112233`) or `lid:<digits>`. Required for `one`. | |
| firstName | No | The short name the phone shows. Defaults to the first word of `savedName`. Optional for `one`. | |
| savedName | No | The name to save the contact under. Required for `one`. |