How to create a dynamic CTA button that calls an API?

Hello i want to create CTA button with dynamics link, this button is used to call API where the API response the link with random token. maybe someone can help