I think the way i would solve this is to do the following.
- Create a GET request to an endpoint to get the data back. Then check if the data exists or the ID exists. If it does not switch it over to make a post request to another endpoint to create it.
I’m guessing you can also do this behind the scenes in strapi itself.
Extend or create your own endpoint that gets the data, if it’s undefined then make the data itself.