# posthog v2.23.4 - API Reference

## Modules

- [PostHog](PostHog.md): Main API for working with PostHog

- [PostHog.API.Client](PostHog.API.Client.md): Behaviour and the default implementation of a PostHog API client. Uses `Req`.
- [PostHog.Config](PostHog.Config.md): PostHog configuration
- [PostHog.FeatureFlags](PostHog.FeatureFlags.md): Convenience functions to work with Feature Flags API

- [PostHog.FeatureFlags.Evaluations](PostHog.FeatureFlags.Evaluations.md): Snapshot of feature flag evaluations for a single `distinct_id`.
- [PostHog.FeatureFlags.FlagDefinitionCacheProvider](PostHog.FeatureFlags.FlagDefinitionCacheProvider.md): Optional shared cache contract for local feature flag definitions.
- [PostHog.FeatureFlags.Result](PostHog.FeatureFlags.Result.md): Represents the result of a feature flag evaluation.
- [PostHog.Handler](PostHog.Handler.md): A [`logger handler`](https://www.erlang.org/doc/apps/kernel/logger_chapter.html#handlers).
- [PostHog.LLMAnalytics](PostHog.LLMAnalytics.md): [LLM Analytics](https://posthog.com/docs/llm-analytics) is an observability
product for LLM-powered applications.
- [PostHog.OpenFeature.Provider](PostHog.OpenFeature.Provider.md): [OpenFeature](https://openfeature.dev) provider backed by PostHog feature flags.
- [PostHog.OpenTelemetry.ContextSpanProcessor](PostHog.OpenTelemetry.ContextSpanProcessor.md): Adds PostHog IDs to application spans when they start.
- [PostHog.Supervisor](PostHog.Supervisor.md): Supervisor that manages the processes required for PostHog event capture.

- Emails
  - [PostHog.Emails](PostHog.Emails.md): Send transactional email, such as a password reset or a receipt, and read its status.
  - [PostHog.Emails.Error](PostHog.Emails.Error.md): PostHog did not queue the email or return its status, or the SDK could not tell whether it did.
  - [PostHog.Emails.SendResult](PostHog.Emails.SendResult.md): The queued email. A result means PostHog queued the email, not that it was delivered.
  - [PostHog.Emails.Status](PostHog.Emails.Status.md): What happened to an email that `PostHog.Emails.send/2` queued.
  - [PostHog.Emails.Warning](PostHog.Emails.Warning.md): A warning PostHog returned with a queued email. `PostHog.Emails.send/2` also logs it.

- Integrations
  - [PostHog.Integrations.LLMAnalytics.Req](PostHog.Integrations.LLMAnalytics.Req.md): Req plugin that automatically captures
[`$ai_generation`](https://posthog.com/docs/llm-analytics/manual-capture?tab=Generation)
events for LLMs.
  - [PostHog.Integrations.Plug](PostHog.Integrations.Plug.md): Provides a plug that automatically extracts and sets relevant metadata from
`Plug.Conn`.

- Testing
  - [PostHog.Test](PostHog.Test.md): PostHog Test Utilities Module

- Exceptions
  - [PostHog.Error](PostHog.Error.md): Generic PostHog SDK error.
  - [PostHog.UnexpectedResponseError](PostHog.UnexpectedResponseError.md): PostHog error that includes a response from the API, either full or partial.

## Mix Tasks

- [mix posthog.package_source_code](Mix.Tasks.Posthog.PackageSourceCode.md): Packages source code into a binary file for source context in error tracking.
- [mix posthog.public_api](Mix.Tasks.Posthog.PublicApi.md): Checks the committed public API snapshot.

