def METHOD_NAME(self, request, pk=None):
    # Add or update a Translation record for each message
    lang = pk
    if lang not in (lang for lang, label in settings.LANGUAGES):
        return Response("", status=status.HTTP_404_NOT_FOUND)
    for context, messages in request.data.items():
        for slug, message in messages.items():
            record, created = models.Translation.objects.get_or_create(
                lang=lang,
                context=context,
                slug=slug,
            )
            record.text = message["message"]
            record.save()
    update_all_translations.delay(lang)
    return Response({})