Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Auto-fill fields in document from REST API `POST` method?

default discord avatar
arskeliss2 years ago
2

I am trying to write a frontend where users can register themselves and take that data(e.g.username, email,password) and create a mew user document for the user amd auto-fill the collection fields with the input. All this coming from Next.js based frontend. Is it possible?

  • default discord avatar
    jessrynkar2 years ago

    hi

    @537385969230413846

    - if I am understanding correctly you want to create a new user using the REST API. You can absolutely do this by sending a POST request to

    /api/users

    along with the required data as the body.

    https://payloadcms.com/docs/rest-api/overview#auth-operations
  • default discord avatar
    arskeliss2 years ago
    @854377910689202256

    thank you for your reply, that's right I want to use REST API for that. It looks easy enough, reading the docs, i will try it out. 🙌

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.