I have integrated Jenkins CI with pagerduty. Once I do that, I can see intergration key generated.

That will be used in jenkins to send the events to pagerduty.
The requirement is to rotate the keys after some time. I want to automate this. Is there any api to regenerate the intergration key and return the key in response to be stored in jenkins?

I think the simplest solution here is to use the REST API -- it isn't possible to regenerate the integration key directly, but you can delete the integration and create a new one programmatically.
First fetch the service details:
This will include all of the integrations on the service -- make note of the
integration_idand thevendor_id.The delete endpoint isn't documented but it does seem to exist:
And finally you can create the new integration, using the
vendor_idfrom the GET request: