How to create a Preview Deployment with Cloudflare Pages API?

The Create Deployment API does not have any parameter to specify the branch to deploy. If I understand the API correctly, this endpoint is only for the prod deployment (that is the main branch`). So I would like to ask if it is possible to trigger Preview Deployment with Cloudflare API? Many thanks in advance

you need to set Preview Branches then run Create Development Pages API with POST body branch set to preview branch you set before.