Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

744 B
Raw Blame
from products.warehouse_sources.sources.sdk import incremental_field

ENDPOINTS = {
    "surveys": "surveys",
    "questions": "surveys/{survey_id}/questions",
    "responses": "surveys/{survey_id}/responses",
    "respondent_attributes": "respondents/{respondent_uuid}/attributes",
}
INCREMENTAL_FIELDS = {"responses": [incremental_field("collected_at")]}
PRIMARY_KEYS = {
    "surveys": ["id"],
    "questions": ["survey_id", "id"],
    "responses": ["survey_id", "uuid"],
    "respondent_attributes": ["respondent_uuid", "id"],
}
AUTH_ERRORS = {
    401: "Survicate rejected your API key. Check the key in Settings > Organization > Access Keys.",
    403: "Survicate denied API access. Check that your plan includes the Data Export API.",
}