I'm unsure whether to post this as an answer or as a comment to another answer. (Posting as separate answer as it's rather long.)
However, I was wondering the same thing and I searched the IANA listing.
There's currently (2023-05-13) a draft entry for registering YAML in the IANA listing. Registering it under the mime-type:
application/yaml
However, it's not been added yet and I do not know how long the rest of the process is going to last.
Draft 06 IANA state:
IANA review state:
Version Changed - Review Needed
IANA expert review state:
Need IANA Expert(s)
Where: Review Needed
, means: Document has not yet been reviewed by IANA.
[ review-state ]
Update (2023-06-06)
Draft 07 Review State changed to:
IANA review state IANA OK - Actions Needed
IANA action state In Progress
IANA expert review state Expert Reviews OK
Where IANA OK - Actions Needed
, means: Document requires IANA actions, and the IANA Considerations section indicates the details of the actions correctly.
and, In Progress
means: IANA is currently processing the actions for this document
and, Expert Reviews OK
means: All expert reviews have been completed with no blocking issues
.
I.e. seems like we'll get a media-type before the end of this year (2023).