You can use logging to log django api requests and add a custom middleware or exception handler to modifiy the contents if required https://docs.djangoproject.com/en/5.1/howto/logging/