I'm using REST API to create Apex Class in Salesforce org. It worked in my testing for multiple orgs, but for a customer I'm getting this error -
Can not create Apex Class on an active organization.
To create the apex class using API, I'm just creating a object of type
ApexClass with payload having
body of class.
I see that Salesforce doesn't allow creation of classes in a production org directly, but it worked in multiple orgs I tested with, so I think it's allowed to be created by the API.
Is there a org setting that might be preventing this?