## 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/models/team.py
from typing import Dict, Optional
import posthoganalytics
from django.contrib.postgres.fields import ArrayField, JSONField
from django.db import models
from django.utils import timezone
from posthog.constants import TREND_FILTER_TYPE_EVENTS, TRENDS_LINEAR
from posthog.helpers.dashboard_templates import create_dashboard_from_template
from .dashboard import Dashboard
from .dashboard_item import DashboardItem
from .personal_api_key import PersonalAPIKey
from .utils import UUIDT, generate_random_token, sane_repr
TEAM_CACHE: Dict[str, "Team"] = {}
class TeamManager(models.Manager):
    def create_with_data(self, user=None, **kwargs) -> "Team":
        team = Team.objects.create(**kwargs)
        
        if user and posthoganalytics.feature_enabled("1694-dashboards", user.distinct_id):
            
            dashboard = Dashboard.objects.create(name="My App Dashboard", pinned=True, team=team,)
            create_dashboard_from_template("DEFAULT_APP", dashboard)
        else:
            
            dashboard = Dashboard.objects.create(
                name="Default", pinned=True, team=team, share_token=generate_random_token()
            )
            DashboardItem.objects.create(
                team=team,