How to populate inputs on a Sanity site via external API

3 replies
Last updated: Feb 8, 2021
Is it possible to populate input options from an external API? The use case is that we have artworks stored on our own server, and would like to feature certain ones to show on our website’s homepage.
Feb 8, 2021, 2:58 PM
Hi Lawrence, this is indeed possible but may require some work. If you don't mind setting up a custom input component, this should allow you to basically make a call to the external API and populate your options from the response: https://www.sanity.io/docs/custom-input-widgets
Please let me know if you need an assist along the way.
Feb 8, 2021, 3:05 PM
Hi Lawrence, this is indeed possible but may require some work. If you don't mind setting up a custom input component, this should allow you to basically make a call to the external API and populate your options from the response: https://www.sanity.io/docs/custom-input-widgets
Please let me know if you need an assist along the way.
Feb 8, 2021, 3:05 PM
That’s super, thank you. The additional work is no problem at all — just wanted to get a sense of whether it’s possible
Feb 8, 2021, 3:12 PM

Sanity.io – build remarkable experiences at scale

Sanity is a customizable solution that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.