## 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
if len(timestamp) > 11:  
        timestamp_number = float(timestamp) / 1000
    else:
        timestamp_number = int(timestamp)
    return datetime.fromtimestamp(timestamp_number, timezone.utc)
def _get_sent_at(data, request) -> Optional[datetime]:
    if request.GET.get("_"):  
        sent_at = request.GET["_"]
    elif isinstance(data, dict) and data.get("sent_at"):  
        sent_at = data["sent_at"]
    elif request.POST.get("sent_at"):  
        sent_at = request.POST["sent_at"]
    else:
        return None
    if re.match(r"^[0-9]+$", sent_at):
        return _datetime_from_seconds_or_millis(sent_at)
    return parser.isoparse(sent_at)
def _get_token(data, request) -> Optional[str]:
    if request.POST.get("api_key"):
        return request.POST["api_key"]
    if isinstance(data, list) and len(data) > 0:
        return data[0]["properties"]["token"]  
    if data.get("$token"):
        return data["$token"]  
    if data.get("api_key"):
        return data["api_key"]  
    if data.get("properties") and data["properties"].get("token"):
        return data["properties"]["token"]  
    return None
def _get_distinct_id(data: Dict[str, Any]) -> str: