# Data pipelines API - Docs

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.

## 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](/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](/docs/api/batch-exports.md).

## Authentication

Use a [personal API key](/docs/api.md#authentication) with the appropriate scopes, passed as a bearer token:

Terminal

PostHog AI

```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](/docs/cdp/surfaces/web-app.md).
-   Do the same work conversationally over [MCP](/docs/cdp/surfaces/mcp.md).
-   See the full [PostHog API reference](/docs/api.md).

### Community questions

Ask a question

### Was this page useful?

HelpfulCould be better