How to generate bulk discount codes without errors?

I am getting below error when I send the POST request to this end point -

/admin/api/2023-10/price_rules/PriceRuleID/batch.json

What is it that I am missing? API documentation does not list any need of additional parameter besides Price rule id.

Also how do I enter no. of discount codes i need? For ex. if i need 50 codes, how should I add to this end point?

{

Errors: {

discount_codes: Required parameter missing or invalid

}

}