All APIs can't always be JSON or text-based. You may want to send files, images, and other content. That's why REST APIs allow a data type called "multipart". We will be focusing on the "multipart/form-data" subtype which allows us to send files in the request body along with other text data
When developing your APIs always remember that an error scenario will always arise. The user may send an incorrect request or there might be some errors within your logic that might have been overlooked. In any condition, your ultimate aim is to never let the system stop execution.