How do i create a custom API route?

default discord avatar
5 months ago

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


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!


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.