There are 2 step required to add an image to media
- Create a media id by sending post request to Media with MediaFolderId like this
www.example.com/api/v1/media?_response=true
with body
{
„mediaFolderId“: „aa387d75254946bdbd27cb018e433da0“
}
you will get the response with id which will be act as mediaId.
- Now you have to post media using this id
and with body
{
„url“:„https://upload.wikimedia.org/wikipedia/commons/8/8b/BD_4C_Cartoon_(PSF).jpg“
}
and thats it.