Hello Amy Zhang,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you would like to add custom request body in APIM.
To include a trace_id in each API call for enhanced auditing purposes, you can use Azure API Management (APIM) policies to modify the request payload and log the trace_id. By using the set-body policy, you can dynamically add a trace_id to the request payload. Additionally, using the log-to-application-insights policy, you can log the trace_id for auditing and correlation purposes - https://learn.microsoft.com/en-us/azure/api-management/trace-policy and https://learn.microsoft.com/en-us/azure/api-management/api-management-howto-api-inspector
I hope this is helpful! Do not hesitate to let me know if you have any other questions.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.