How extensible are payload hooks

default discord avatar
3 months ago

Hey everyone!

I'm currently comparing my options for building a website for an event. It has to have functionality to vote for a team. Voting would be '1 vote/phone number' so is that possible with (maybe collection) hooks? It would use an external API for sending a SMS and verify the code that would be stored in another collection.


  • discord user avatar
    Payload Team
    3 months ago

    Hi there,

    sounds like that should be easily possible! You could use a field


    to check if there have been multiple votes for that phone number, and if so, reject it there.

    In an afterChange or beforeChange hook, you could then trigger the sending of an SMS, so that it would trigger whenever a new Vote has been created

  • default discord avatar
    3 months ago

    Oh, thanks! Just wanted to confirm :)

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!


Connect with the Payload Community on Discord



Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.