How do i create a custom API route?

default discord avatar
Derosul
5 months ago
5

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.

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

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

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