## Bug description

Since users can now be part of multiple projects, the `get_team_from_token` function used in capture and decide endpoints cannot work reliably with personal API keys. These endpoints should be e.g. nested under `/api/projects/:project_id` _or_ should accept `project_id` in request body.

#### *Thank you* for your bug report – we love squashing them!

posthog/api/test/test_capture.py
response = self.client.get(
            "/e/?data=eyJldmVudCI6IndoYXRldmVmciIsInByb3BlcnRpZXMiOnsidG9rZW4iOiJ0b2tlbjEyMyIsImRpc3RpbmN0X2lkIjoiYXNkZiJ9fQ",
            content_type="application/json",
            HTTP_REFERER="https://localhost",
        )
        self.assertEqual(response.json()["status"], 1)
        self.assertEqual(patch_process_event_with_plugins.call_args[1]["args"][3]["event"], "whatevefr")
    @patch("posthog.models.team.TEAM_CACHE", {})
    @patch("posthog.api.capture.celery_app.send_task")
    def test_empty_request_returns_an_error(self, patch_process_event_with_plugins):
        """
        Empty requests that fail silently cause confusion as to whether they were successful or not.
        """
        # Empty GET
        response = self.client.get("/e/?data=", content_type="application/json", HTTP_ORIGIN="https://localhost",)
        self.assertEqual(response.status_code, 400)
        self.assertEqual(patch_process_event_with_plugins.call_count, 0)
        # Empty P
        response = self.client.post("/e/", {}, content_type="application/json", HTTP_ORIGIN="https://localhost",)
        self.assertEqual(response.status_code, 400)
        self.assertEqual(patch_process_event_with_plugins.call_count, 0)
    @patch("posthog.models.team.TEAM_CACHE", {})
    @patch("posthog.api.capture.celery_app.send_task")
    def test_batch(self, patch_process_event_with_plugins):