> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt # Data pipelines API Canonical URL: https://posthog.com/docs/data-pipelines/surfaces/api > **Cloud region:** This page uses US Cloud hosts. For an EU Cloud project, use `https://eu.posthog.com` instead of `https://us.posthog.com` (app host for links). ## On this page - [Before you start](#before-you-start) - [What's available](#whats-available) - [Authentication](#authentication) - [Related](#related) Use the API when you want pipelines to live in your own configuration rather than being clicked together in the UI – provisioning the same destinations across projects, keeping function definitions in version control, or wiring pipeline changes into your deploy process. ## Before you start 1. **Set up a pipeline** – [create a source, destination, or transformation](https://posthog.com/docs/data-pipelines/start-here.md) so there's something to manage. 2. **Get API access** – [create a personal API key](https://posthog.com/docs/api/personal-api-keys.md) with the scopes you need. See [authentication](#authentication) below. ## What's available **Hog functions** Every source, transformation, destination, and web script is a Hog function, so a single set of endpoints covers all of them. You can list and filter functions by type, create one from a template or from raw Hog code, update its inputs and filters, reorder transformation execution, and delete it. See the [Hog functions API reference](https://posthog.com/docs/api/hog-functions.md). **Batch exports** Batch exports have their own endpoints for listing, creating, updating, and deleting scheduled exports, plus inspecting individual runs. See the [batch exports API reference](https://posthog.com/docs/api/batch-exports.md). ## Authentication Use a [personal API key](https://posthog.com/docs/api.md#authentication) with the appropriate scopes, passed as a bearer token: ```bash curl -H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \ https://us.posthog.com/api/projects/:project_id/hog_functions/ ``` Reading requires `hog_function:read` and writing requires `hog_function:write`. Grant only what the integration needs – a key that can write functions can also change where your event data is sent. ## Related - Build and monitor pipelines in the [web app](https://posthog.com/docs/data-pipelines/surfaces/web-app.md). - Do the same work conversationally over [MCP](https://posthog.com/docs/data-pipelines/surfaces/mcp.md). - See the full [PostHog API reference](https://posthog.com/docs/api.md).