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

API: Clearing subscribers or getting list of subscribers
  • Vote Up0Vote Down mahemoffmahemoff
    Posts: 6Sendy user

    I'd like to run a periodic batch process to ensure Sendy DB is sync'd with my app's DB. So is there any way to reset the list (so I can re-subscribe everyone) or get the list of current subscriptions (so I can update it with the appropriate subscribes and unsubscribes).

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

    Hi @mahemoff,

    is there any way to reset the list

    Can you clarify what you mean by "reset the list"?

    Thanks.

    Ben

  • Vote Up0Vote Down mahemoffmahemoff
    Posts: 6Sendy user

    I mean empty it.

    (I think the ideal situation would be a way to upload the actual list of subscribers and the server would then delete those currently subscribed who are not on the new list.)

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

    I mean empty it

    To empty a list, just delete the list and all subscribers in the list will be deleted as well.

    I think the ideal situation would be a way to upload the actual list of subscribers and the server would then delete those currently subscribed who are not on the new list.

    When you upload a CSV into a list, existing subscribers won't be touched. If a subscriber already exist in the list, it will be left alone.

    Ben

  • Vote Up0Vote Down mahemoffmahemoff
    Posts: 6Sendy user

    Ok, thanks for clarifying what's there.

    I do think it would be useful if the CSV import did have an option to delete subscribers not in the CSV, ie make it a pure replication call. Otherwise, what happens if someone leaves my app while Sendy is down, meaning I can't unsubscribe them via the API? The only way I could deal with that is to start tracking which subscribers were successfully sent to Sendy. It would be easier if, every day, I could just upload the complete list. Anyway, please consider it my 2p of a feature request.

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

    Hi @mahemoff,

    I understand you'd want to sync your app's DB with Sendy's DB.

    The most straightforward and simplest way to do it is by making use of the Subscribe and Unsubscribe API. When a new user is added to your app, call the Subscribe API to add the user to Sendy. If a user leaves your app, call the Unsubscribe API to unsubscribe the user from Sendy.

    That's what I'm currently doing for all my apps.

    Ben

  • Vote Up0Vote Down mahemoffmahemoff
    Posts: 6Sendy user

    Thanks Ben, I understand, but I'm suggesting that if the connection or Sendy goes down, the databases get out of sync and there's no straightforward way to repair that situation afaict, because there's no way to send or retrieve the exact list of subscribers.

    Not a big deal, but pointing this out as it might be a consideration for future upgrades.

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

    Will do, thank you.

This discussion has been closed.
All Discussions