Contacts

Contacts

Your address book: add, merge, import and export.

On this page
  1. contacts list
  2. contacts search
  3. contacts get
  4. contacts add
  5. contacts update
  6. contacts remove
  7. contacts duplicates
  8. contacts merge
  9. contacts import
  10. contacts export
  11. contacts others
  12. contacts forget
  13. contacts photo set
  14. contacts photo remove

mailset contacts list

List your contacts, by name.

Flags

  • --limit<n>optional

    How many contacts a page holds, 1 to 200.

    Default 50.

  • --after<after>optional

    The next of the page before, for the page after it.

  • --label<label>optional

    Only contacts with this label.

Returns

With --json it prints what the API returns.

In the API: POST /v1/contacts.list

Usage
mailset contacts list [--limit <n>] [--after <after>] [--label <label>]
Example
mailset contacts list --label Customers --limit 100

mailset contacts get

Show one contact.

Flags

  • <id>argumentrequired

    The contact’s id.

Returns

With --json it prints the Contact object.

In the API: POST /v1/contacts.get

Usage
mailset contacts get <id>
Example
mailset contacts get con_4e9a2c7f1b6d3058a3c7e1b9

mailset contacts add

Save someone.

Flags

  • <name>argumentoptional

    The full name as shown. Left empty, it is put together from the parts.

  • --first-name<first-name>optional

    Their first name.

  • --middle-name<middle-name>optional

    Their middle name.

  • --last-name<last-name>optional

    Their last name.

  • --prefix<prefix>optional

    What goes before the name: Dr.

  • --suffix<suffix>optional

    What goes after it: Jr.

  • --nickname<nickname>optional

    What you call them.

  • --company<company>optional

    Where they work.

  • --title<title>optional

    Their job title.

  • --department<department>optional

    Their department.

  • --emails<a,b,…>optional

    Addresses, the first is primary. Each is an address, or { value, label }. Up to 20.

    Or @<path>, to read the JSON from a file.

  • --phones<a,b,…>optional

    Phone numbers, each a number or { value, label }. Up to 20.

    Or @<path>, to read the JSON from a file.

  • --addresses<a,b,…>optional

    Postal addresses, each as text or { value, label }. Up to 10.

    Or @<path>, to read the JSON from a file.

  • --websites<a,b,…>optional

    Websites, each a URL or { value, label }. Up to 10.

    Or @<path>, to read the JSON from a file.

  • --birthday<birthday>optional

    Their birthday, as written: 1990-04-12.

  • --notes<notes>optional

    Your own notes about them.

  • --labels<a,b,…>optional

    The labels on the contact, by name. Up to 50.

    Or @<path>, to read the JSON from a file.

  • --other<a,b,…>optional

    Anything else a contact came with: events, relations, custom fields.

    Or @<path>, to read the JSON from a file.

Returns

With --json it prints the Contact object.

In the API: POST /v1/contacts.add

Usage
mailset contacts add [<name>] [--first-name <first-name>] [--middle-name <middle-name>] [--last-name <last-name>] [--prefix <prefix>] [--suffix <suffix>] [--nickname <nickname>] [--company <company>] [--title <title>] [--department <department>] [--emails <a,b,…>] [--phones <a,b,…>] [--addresses <a,b,…>] [--websites <a,b,…>] [--birthday <birthday>] [--notes <notes>] [--labels <a,b,…>] [--other <a,b,…>]
Example
mailset contacts add "Maria Lopez" --emails moc.elpmaxe@airam --phones "+1 555 0100" --company "Example Inc"

mailset contacts update

Change a contact. Only the fields you pass change.

Flags

  • <id>argumentrequired

    The contact’s id.

  • --name<name>optional

    The full name as shown. Left empty, it is put together from the parts.

  • --first-name<first-name>optional

    Their first name.

  • --middle-name<middle-name>optional

    Their middle name.

  • --last-name<last-name>optional

    Their last name.

  • --prefix<prefix>optional

    What goes before the name: Dr.

  • --suffix<suffix>optional

    What goes after it: Jr.

  • --nickname<nickname>optional

    What you call them.

  • --company<company>optional

    Where they work.

  • --title<title>optional

    Their job title.

  • --department<department>optional

    Their department.

  • --emails<a,b,…>optional

    Addresses, the first is primary. Each is an address, or { value, label }. Up to 20.

    Or @<path>, to read the JSON from a file.

  • --phones<a,b,…>optional

    Phone numbers, each a number or { value, label }. Up to 20.

    Or @<path>, to read the JSON from a file.

  • --addresses<a,b,…>optional

    Postal addresses, each as text or { value, label }. Up to 10.

    Or @<path>, to read the JSON from a file.

  • --websites<a,b,…>optional

    Websites, each a URL or { value, label }. Up to 10.

    Or @<path>, to read the JSON from a file.

  • --birthday<birthday>optional

    Their birthday, as written: 1990-04-12.

  • --notes<notes>optional

    Your own notes about them.

  • --labels<a,b,…>optional

    The labels on the contact, by name. Up to 50.

    Or @<path>, to read the JSON from a file.

  • --other<a,b,…>optional

    Anything else a contact came with: events, relations, custom fields.

    Or @<path>, to read the JSON from a file.

Returns

With --json it prints the Contact object.

In the API: POST /v1/contacts.update

Usage
mailset contacts update <id> [--name <name>] [--first-name <first-name>] [--middle-name <middle-name>] [--last-name <last-name>] [--prefix <prefix>] [--suffix <suffix>] [--nickname <nickname>] [--company <company>] [--title <title>] [--department <department>] [--emails <a,b,…>] [--phones <a,b,…>] [--addresses <a,b,…>] [--websites <a,b,…>] [--birthday <birthday>] [--notes <notes>] [--labels <a,b,…>] [--other <a,b,…>]
Example
mailset contacts update con_4e9a2c7f1b6d3058a3c7e1b9 --company "Example Inc" --title "Head of Finance"

mailset contacts remove

Delete contacts and their photos.

Flags

  • <ids>argumentrequired

    One contact’s id, or a list of up to 200.

Returns

With --json it prints what the API returns.

In the API: POST /v1/contacts.remove

Usage
mailset contacts remove <ids>
Example
mailset contacts remove con_4e9a2c7f1b6d3058a3c7e1b9

mailset contacts duplicates

Find contacts that look like the same person.

Returns

With --json it prints what the API returns.

In the API: POST /v1/contacts.duplicates

Usage
mailset contacts duplicates
Example
mailset contacts duplicates

mailset contacts merge

Merge duplicates.

Flags

  • --ids<a,b,…>optional

    The contacts to merge, 2 to 50. The first is kept.

    Or @<path>, to read the JSON from a file.

  • --allflagoptional

    Merge every group contacts duplicates finds.

Returns

With --json it prints what the API returns.

In the API: POST /v1/contacts.merge

Usage
mailset contacts merge [--ids <a,b,…>] [--all]
Example
mailset contacts merge --ids con_4e9a2c7f1b6d3058a3c7e1b9,con_a1c6e3b9f2d74058b6e2a9c4

mailset contacts import

Import a Google Contacts CSV or a vCard file.

Flags

  • --file<path>required

    The file to send, read from this machine.

Returns

With --json it prints what the API returns.

In the API: POST /v1/contacts.import

Usage
mailset contacts import --file <path>
Example
mailset contacts import --file contacts.vcf

mailset contacts export

Print your contacts as vCard or CSV.

Flags

  • --formatenumoptional

    vcard or csv.

    One ofvcardcsv

    Default vcard.

  • --photosflagoptional

    Inline each photo in a vCard.

Returns

With --json it prints what the API returns.

In the API: POST /v1/contacts.export

Usage
mailset contacts export [--format vcard|csv] [--photos]
Example
mailset contacts export --format csv

mailset contacts others

People you’ve exchanged mail with and haven’t saved.

Flags

  • --limit<n>optional

    How many people a page holds, 1 to 200.

    Default 50.

  • --after<after>optional

    The next of the page before, for the page after it.

  • --query<query>optional

    Only people whose name or address has this in it.

Returns

With --json it prints what the API returns.

In the API: POST /v1/contacts.others

Usage
mailset contacts others [--limit <n>] [--after <after>] [--query <query>]
Example
mailset contacts others --query example.com

mailset contacts forget

Take someone off your other contacts.

Flags

  • <address>argumentrequired

    The person’s address.

Returns

With --json it prints what the API returns.

In the API: POST /v1/contacts.forget

Usage
mailset contacts forget <address>
Example
mailset contacts forget moc.elpmaxe@airam

mailset contacts photo set

Set a contact’s photo from a PNG, JPEG or WebP file.

Flags

  • <id>argumentrequired

    The contact’s id.

  • --file<path>required

    The file to send, read from this machine.

Returns

With --json it prints what the API returns.

In the API: POST /v1/contacts.photo.set

Usage
mailset contacts photo set <id> --file <path>
Example
mailset contacts photo set con_4e9a2c7f1b6d3058a3c7e1b9 --file maria.jpg

mailset contacts photo remove

Remove a contact’s photo.

Flags

  • <id>argumentrequired

    The contact’s id.

Returns

With --json it prints what the API returns.

In the API: POST /v1/contacts.photo.remove

Usage
mailset contacts photo remove <id>
Example
mailset contacts photo remove con_4e9a2c7f1b6d3058a3c7e1b9