def METHOD_NAME(self, request: Request, project, plugin_id) -> Response:
    plugin = self._get_plugin(plugin_id)
    config = [
        serialize_field(project, plugin, c)
        for c in plugin.get_config(project=project, user=request.user, initial=request.data)
    ]
    cleaned = {}
    errors = {}
    for field in config:
        key = field["name"]
        value = request.data.get(key)
        if field.get("required") and not value:
            errors[key] = ERR_FIELD_REQUIRED
        try:
            value = plugin.validate_config_field(
                project=project, name=key, value=value, actor=request.user
            )
        except (
            forms.ValidationError,
            serializers.ValidationError,
            InvalidIdentity,
            PluginError,
        ) as e:
            errors[key] = str(e)
        if not errors.get(key):
            cleaned[key] = value
    if not errors:
        try:
            cleaned = plugin.validate_config(
                project=project, config=cleaned, actor=request.user
            )
        except (InvalidIdentity, PluginError) as e:
            errors["__all__"] = str(e)
    if errors:
        return Response({"errors": errors}, status=400)
    for key, value in cleaned.items():
        if value is None:
            plugin.unset_option(project=project, key=key)
        else:
            plugin.set_option(project=project, key=key, value=value)
    context = serialize(plugin, request.user, PluginWithConfigSerializer(project))
    plugin_enabled.send(plugin=plugin, project=project, user=request.user, sender=self)
    self.create_audit_entry(
        request=request,
        organization=project.organization,
        target_object=project.id,
        event=audit_log.get_event_id("INTEGRATION_EDIT"),
        data={"integration": plugin_id, "project": project.slug},
    )
    return Response(context)