...#Your view.py code @action(detail=True, methods=['POST']) def send_mail(self, request, pk=None): email = request.data[0] name = request.data[1] surname = request.data[2] ...