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.

How do i create a custom API route?

default discord avatar
derosul2 years ago
3

I'm currently working on a custom field which should fetch resources from an external API, I don't want my secrets for that API to be living in the frontend. Is it possible to create a custom API route which proxies the request to the external API?



I can create an Express route in the

server.ts

for it, but I was wondering if Payload has something built in for this.

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.