## 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/capture.py
import re
from datetime import datetime
from typing import Any, Dict, Optional
import statsd
from dateutil import parser
from django.conf import settings
from django.http import JsonResponse
from django.utils import timezone
from django.views.decorators.csrf import csrf_exempt
from posthog.auth import PersonalAPIKeyAuthentication
from posthog.celery import app as celery_app
from posthog.ee import is_ee_enabled
from posthog.models import Team
from posthog.utils import cors_response, get_ip_address, load_data_from_request
if settings.EE_AVAILABLE:
    from ee.clickhouse.process_event import log_event, process_event_ee
def _datetime_from_seconds_or_millis(timestamp: str) -> datetime: