0

You can create a contact and specify email, but the only option for updating a contact seems to be name. Is it possible to update a contact's email?

This would be preferable to making the user delete the contact and then add it again it with a new email, in cases where they mistype the email (or if the address changes, I suppose).

Sophie
  • 304
  • 10
  • 12

2 Answers2

0

Nah, there's no way to change the email address. You can programmatically delete the contact rather than making the user delete them, I think this is what the website did.

Just a note, as I mentioned on this other thread (Add contact to pushbullet with the api): the official apps use the (not yet documented) /v2/chats objects instead of contacts

Community
  • 1
  • 1
Chris Pushbullet
  • 1,039
  • 9
  • 10
  • Did any of the parameters change with the switch to /v2/chats object? The following command adds new contacts but they don't have a name, even though a name is specified: `curl -su $auth_id: https://api.pushbullet.com/v2/chats -X POST -d name="andy" -d email="andy@email.com"` So, `name` no longer seems to work, which is odd, because I see `name` in the JSON object that is returned when I request a list of my contacts. – Sophie Sep 11 '15 at 23:02
  • Yeah they are totally different. I just noticed that for chats you can't set the name at all :/ Guess if you want that ability you'll have to store your own names client side for now. – Chris Pushbullet Sep 12 '15 at 03:38
0

You can update a contact, but the exact rule is vague:

Any non-contact data will not be modified.

I use it to change a contact's primary email address, but sometimes it works, sometimes not, and it seems to be related to how the email found its way into the user's google contacts.

I suspect if an email address was imported, there's an issue, but I have spent a lot of time and still have no real idea.

In fact, my implementation is horrible. I first store the current email addresses for a contact. Then I do an update to clear them out. Then I do another update to add them back, but this time with the primary=true flag set on the new primary email. Can't get it to work as in the reference, whereby a single update transaction should work.

Ian White
  • 91
  • 1
  • 3