Hello,
Thank you for contacting us and bringing your concern to our attention.
WordPress automatically generates the permalink for your posts based on the title. However, if you want, you can change the permalink from the Rank Math SEO Meta box. https://rankmath.com/kb/wordpress-permalinks/#edit-snippet-using-rank-math
Meanwhile, please make sure the Auto Post Redirect option is enabled in Rank Math > General Settings > Redirections so that it can create the redirection automatically after changing the slug of the page.
Hope that helps and please don’t hesitate to let us know if you have any other questions.
Thanks for your reply
We use REST API to create website posts
I created the long permalink manually with the ranking settings but I want to do it programmatically
Where is the ranking permalink stored in the database to do the right thing?