Retrieve data from your endpoint

  1. Create a personal API key

    Required

    Create a personal API key with the endpoint:read scope to authenticate your requests.

    1. Go to Personal API Keys in your PostHog settings
    2. Click Create personal API key
    3. Give it a name (e.g., "Endpoints")
    4. Select the endpoint:read scope
    5. Click Create key and copy it somewhere safe
    Personal API keys are secret!
    Store your API key securely. Never expose it in client-side code or commit it to version control.
  2. Choose your language

    Required

    Select your language or framework to see how to call your endpoint.

Community questions

Was this page useful?

Questions about this page? or post a community question.