@Rob Wilson Thank you for reaching out to Microsoft Q&A. I assume you are performing the customization on the managed developer portal (not self-hosted).
Have you explored migration script in our docs: https://learn.microsoft.com/en-us/azure/api-management/automate-portal-deployments? This script relies on multiple other scripts underneath and perform steps like copying portal's content such as customizations, configuration etc., copying media files such as images (stored in azure blob storage) etc. from one service to other. Please note, things like users, user groups etc. aren't captured as part of this. Based on your scenario, you can just use the backup part, skip the upload to destination service and then configure to run in your CI/CD pipeline. If you have any questions on this, let me know. I am happy to help :).
Unfortunately, there is no option to save as a template and I recommend you share feedback in aka.ms/apimwish so that others can upvote on it for our product team to take it forward.
I hope this answers your question and feel free to add if you have any questions.