How to run a one-time pipeline using REST API?

I'm researching how to run a pipeline without adding a .gitlab-ci.yml file.

I want to know if it's possible to use the REST API to run a pipeline (or a job) and manually pass the .gitlab-ci.yml content when executing it.