PostHog Endpoints API

The endpoints API from PostHog — 16 operation(s) for endpoints.

GitHub OpenAPI

Operations 26

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /api/environments/{environment_id}/endpoints/ List endpoints in an environment · Environments endpoints list #
Ask an LLM
“Which endpoints exist in an older environment?”
“Can I list only active endpoints in an environment?”
Tell an agent
List endpoints in environment {environment_id}.
Show active endpoints in environment {environment_id} with {limit} per page.
POST /api/environments/{environment_id}/endpoints/ Create an endpoint in an environment · Environments endpoints create #
Ask an LLM
“How do I create a new endpoint in an environment?”
“Can I set freshness and materialization when creating an endpoint?”
Tell an agent
Create endpoint {name} in environment {environment_id} running {query}.
Add an active endpoint {name} to environment {environment_id} with freshness {data_freshness_seconds}.
GET /api/environments/{environment_id}/endpoints/{name}/ Get an endpoint in an environment · Environments endpoints retrieve #
Ask an LLM
“Is a given named endpoint in this environment materialized?”
“Can I fetch an environment endpoint by name?”
Tell an agent
Get environment endpoint {name} in {environment_id}.
Show the materialization status of endpoint {name} in environment {environment_id}.
PUT /api/environments/{environment_id}/endpoints/{name}/ Replace an endpoint in an environment · Environments endpoints update #
Ask an LLM
“How do I overwrite an endpoint's query in an environment?”
“Can I deactivate an endpoint in an environment?”
Tell an agent
Replace endpoint {name} in environment {environment_id} with query {query}.
Set endpoint {name} in environment {environment_id} inactive.
PATCH /api/environments/{environment_id}/endpoints/{name}/ Patch an endpoint in an environment · Environments endpoints partial update #
Ask an LLM
“Can I change just the description of an endpoint in an environment?”
“Is it possible to soft-delete an environment endpoint?”
Tell an agent
Patch endpoint {name} in environment {environment_id} with description {description}.
Soft-delete endpoint {name} in environment {environment_id} by setting deleted {deleted}.
DELETE /api/environments/{environment_id}/endpoints/{name}/ Delete an endpoint in an environment · Environments endpoints destroy #
Ask an LLM
“How do I delete an endpoint from an environment?”
“Does deleting an environment endpoint clean up its materialization?”
Tell an agent destructive · confirm first
Delete endpoint {name} from environment {environment_id}.
Remove the materialized query for endpoint {name} in environment {environment_id}.
POST /api/environments/{environment_id}/endpoints/{name}/materialization_preview/ Preview materialization of an endpoint · Environments endpoints materialization preview create #
Ask an LLM
“What will an endpoint's query look like after materialization?”
“Can I override bucket functions when previewing materialization?”
Tell an agent
Preview materialization of endpoint {name} in environment {environment_id}.
Materialize endpoint {name} in environment {environment_id} with bucket overrides {bucket_overrides}.
GET /api/environments/{environment_id}/endpoints/{name}/materialization_status/ Check an environment endpoint's materialization status · Environments endpoints materialization status retrieve #
Ask an LLM
“Has the endpoint in my environment been materialized yet?”
“Can I check materialization status of an environment endpoint by version?”
Tell an agent
Get materialization status of endpoint {name} in {environment_id}.
Check whether environment endpoint {name} in {environment_id} is materialized.
GET /api/environments/{environment_id}/endpoints/{name}/openapi.json/ Get an endpoint's OpenAPI spec · Environments endpoints openapi json retrieve #
Ask an LLM
“How do I generate a typed SDK client for an endpoint?”
“Can I get the OpenAPI spec for an older endpoint version?”
Tell an agent
Get the OpenAPI spec for endpoint {name} in environment {environment_id}.
Generate an SDK spec for version {version} of endpoint {name} in environment {environment_id}.
GET /api/environments/{environment_id}/endpoints/{name}/run/ Run a saved endpoint in an environment · Environments endpoints run retrieve #
Ask an LLM
“Can I execute a saved endpoint in my environment and get its results back?”
“What happens if I run an environment endpoint without choosing a version?”
Tell an agent
Run the saved endpoint {name} in environment {environment_id} and return its results.
Execute the latest version of endpoint {name} under environment {environment_id}.
POST /api/environments/{environment_id}/endpoints/{name}/run/ Run an endpoint in an environment with filters · Environments endpoints run create #
Ask an LLM
“Can I filter the results when running an endpoint in an environment?”
“How do I limit how many rows an environment endpoint returns?”
Tell an agent
Run endpoint {name} in environment {environment_id} with filters {filters_override}.
Execute endpoint {name} in environment {environment_id} limited to {limit} rows.
GET /api/environments/{environment_id}/endpoints/{name}/versions/ List versions of an endpoint · Environments endpoints versions list #
Ask an LLM
“What versions exist for an endpoint?”
“Can I list only the active versions of an endpoint?”
Tell an agent
List versions of endpoint {name} in environment {environment_id}.
Show active versions of endpoint {name} in environment {environment_id}.
POST /api/environments/{environment_id}/endpoints/last_execution_times/ Get recent execution times for endpoints · Environments endpoints last execution times create #
Ask an LLM
“When was each of my endpoints last executed?”
“Can I check execution times for several endpoints at once?”
Tell an agent
Get last execution times for endpoints {names} in environment {environment_id}.
Show when endpoints {names} were last run in environment {environment_id}.
GET /api/projects/{project_id}/endpoints/ List endpoints in a project · Endpoints list #
Ask an LLM
“Which endpoints exist in my project?”
“Can I list only endpoints created by a specific user?”
Tell an agent
List endpoints in project {project_id}.
Show endpoints in project {project_id} created by {created_by}.
POST /api/projects/{project_id}/endpoints/ Create an endpoint in a project · Endpoints create #
Ask an LLM
“How do I create a new endpoint in a project?”
“Can I make an endpoint materialized and set its freshness?”
Tell an agent
Create endpoint {name} in project {project_id} with query {query}.
Add an active endpoint {name} to project {project_id} with freshness {data_freshness_seconds}.
GET /api/projects/{project_id}/endpoints/{name}/ Get a project endpoint · Endpoints retrieve #
Ask an LLM
“What does a materialized project endpoint return?”
“Can I fetch a project-level endpoint by name?”
Tell an agent
Get project endpoint {name} in project {project_id}.
Show materialization status of endpoint {name} in project {project_id}.
PUT /api/projects/{project_id}/endpoints/{name}/ Replace an endpoint in a project · Endpoints update #
Ask an LLM
“How do I overwrite an endpoint's query in a project?”
“Can I deactivate an endpoint in a project?”
Tell an agent
Replace endpoint {name} in project {project_id} with query {query}.
Set endpoint {name} in project {project_id} inactive.
PATCH /api/projects/{project_id}/endpoints/{name}/ Patch an endpoint in a project · Endpoints partial update #
Ask an LLM
“Can I change just the description of an endpoint in a project?”
“Is it possible to soft-delete a project endpoint?”
Tell an agent
Patch endpoint {name} in project {project_id} with description {description}.
Soft-delete endpoint {name} in project {project_id} by setting deleted {deleted}.
DELETE /api/projects/{project_id}/endpoints/{name}/ Delete an endpoint in a project · Endpoints destroy #
Ask an LLM
“How do I delete an endpoint from a project?”
“Does deleting a project endpoint clean up its materialization?”
Tell an agent destructive · confirm first
Delete endpoint {name} from project {project_id}.
Remove the materialized query for endpoint {name} in project {project_id}.
POST /api/projects/{project_id}/endpoints/{name}/materialization_preview/ Preview an endpoint's materialization transform · Endpoints materialization preview create #
Ask an LLM
“How would a project endpoint look once its materialization is built?”
“Can I preview materialization bucket functions for an endpoint?”
Tell an agent
Preview materialization of endpoint {name} in project {project_id}.
Show materialization preview for endpoint {name} in {project_id} with bucket overrides {overrides}.
GET /api/projects/{project_id}/endpoints/{name}/materialization_status/ Check whether an endpoint has been materialized · Endpoints materialization status retrieve #
Ask an LLM
“Has my custom endpoint finished materializing?”
“Can I check the materialization status of an endpoint?”
Tell an agent
Get the materialization status of endpoint {name} in project {project_id}.
Check whether endpoint {name} in project {project_id} is materialized.
GET /api/projects/{project_id}/endpoints/{name}/openapi.json/ Get the OpenAPI spec for an endpoint · Endpoints openapi json retrieve #
Ask an LLM
“Can I generate a typed client for my custom endpoint?”
“Where do I get the OpenAPI 3.0 spec for an endpoint?”
Tell an agent
Get the OpenAPI spec for endpoint {name} in project {project_id}.
Generate a typed SDK client for endpoint {name} in project {project_id}.
GET /api/projects/{project_id}/endpoints/{name}/run/ Run an endpoint without materialization · Endpoints run retrieve #
Ask an LLM
“Can I run my custom endpoint without materializing it?”
“What does an endpoint return when I execute it without materializing?”
Tell an agent
Run endpoint {name} in project {project_id} without materializing.
Execute endpoint {name} in project {project_id} and return the results.
POST /api/projects/{project_id}/endpoints/{name}/run/ Run an endpoint with materialization · Endpoints run create #
Ask an LLM
“How do I run an endpoint and save its results as a materialized table?”
“Can I limit how many rows an endpoint returns when I run it?”
Tell an agent
Run endpoint {name} in project {project_id} and materialize the results.
Execute endpoint {name} in project {project_id} with variables {variables} and materialize.
GET /api/projects/{project_id}/endpoints/{name}/versions/ List versions of an endpoint · Endpoints versions list #
Ask an LLM
“Which versions of my endpoint exist?”
“Can I see only the active versions of an endpoint?”
Tell an agent
List all versions of endpoint {name} in project {project_id}.
Show versions of endpoint {name} in project {project_id} where active is {is_active}.
POST /api/projects/{project_id}/endpoints/last_execution_times/ Get last execution times for several endpoints · Endpoints last execution times create #
Ask an LLM
“When were my endpoints last executed?”
“Can I check the last execution time of multiple endpoints at once?”
Tell an agent
Get the last execution times for endpoints {names} in project {project_id}.
Show when endpoints {names} in project {project_id} were last run.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/posthog:posthog-endpoints-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

posthog-endpoints-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PostHog Endpoints API
  version: 1.0.0
  description: ''
tags:


# --- truncated at 32 KB (76 KB total) ---
# Full source: https://artifacts.apis.io/posthog/openapi/posthog-endpoints-api-openapi.yml