Get answers quicker by searching

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Update email through API?
  • Vote Up0Vote Down cmercmer
    Posts: 8Sendy user

    How can I update a user's email through the API? I understand that the POST /subscribe can be used to update users, but posting a new email will just create a new entry, unless I'm missing something.

    Thanks

  • 6 Comments
  • Vote Up0Vote Down BenBen
    Posts: 3,484Sendy support

    Hi Carl,

    You can't do that as the 'email' is the only identifier for the API to know which record to change in the database.

    If you need to update a user's email, call the Unsubscribe API to unsubscribe the record with the old email in addition to calling the Subscribe API to add the user's email.

    Thanks.

    Ben

  • Vote Up0Vote Down cmercmer
    Posts: 8Sendy user

    :(

    The problem with this is that if the user is already unsubscribed, I'll subscribe them again. Also, doesn't subscribing send them an email to tell them they've just subscribed to the newsletter?

    I think it would be great if you had a real REST API where we can do GET/POST/PUT/DELETE. This is hacking POST a bit too much IMO.

    Thanks!

  • Vote Up0Vote Down BenBen
    Posts: 3,484Sendy support

    Hi Carl,

    Thanks for your suggestion, I'll move this to the suggestion category.

    Ben

  • Vote Up0Vote Down cmercmer
    Posts: 8Sendy user

    BTW, my Sendyr Ruby gem mimicks updating the email address. It's not perfect, but it's good enough for most purposes.

  • Hi,

    We would love to see this feature as well. A script would do the job but think this should be something the API provides.

    Btw.: We love Sendy and it does a great job for us.

    Best, Peter

  • Vote Up0Vote Down mackaaijmackaaij
    Posts: 11Sendy user

    Any news on this, Ben? Is it already possible to update a users email address using the API? The API documentation does read "You can also use this method to update an existing subscriber." but it looks like there's only one parameter for a user email address.