Can I create a pipeline based on a commit using the API?

Am I only allowed to trigger a pipeline based on branch or tag? Why not commit?