Create a new endpoint.
Request
- Base URL: https://us.posthog.com
- URL: https://us.posthog.com/api/projects/{project_id}/endpoints/
- Auth: HTTP bearer
Path parameters
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Request body
Unique URL-safe name. Must start with a letter, only letters/numbers/hyphens/underscores, max 128 chars.
Human-readable description of what this endpoint returns.
How fresh the data should be, in seconds. Must be one of: 900 (15 min), 1800 (30 min), 3600 (1 h), 21600 (6 h), 43200 (12 h), 86400 (24 h, default), 604800 (7 d). Controls cache TTL and materialization sync frequency.
Whether this endpoint is available for execution via the API.
Whether query results are materialized to S3.
Short ID of the insight this endpoint was derived from.
Target a specific version for updates (defaults to current version).
Per-column bucket overrides for range variable materialization. Keys are column names, values are bucket keys.
Set to true to soft-delete this endpoint.
List of tag names to associate with this endpoint. Replaces any existing tags.
Breakdown property names that may be omitted on /run. Omitted ones return data aggregated across all values of that breakdown. Defaults to [] — every breakdown variable is required.
Response
Unique endpoint identifier (UUID).
URL-safe endpoint name, unique per team.
Human-readable description of the endpoint.
Whether the endpoint can be executed via the API.
How fresh the data is, in seconds. One of: 900, 1800, 3600, 21600, 43200, 86400, 604800.
Relative API path to execute this endpoint (e.g. /api/projects/{team_id}/endpoints/{name}/run).
Absolute URL to execute this endpoint.
Absolute URL to view this endpoint in the PostHog UI.
When the endpoint was created (ISO 8601).
When the endpoint was last updated (ISO 8601).
Whether the current version's results are pre-computed to S3.
Latest version number.
UUID of the current EndpointVersion row.
Total number of versions for this endpoint.
Short ID of the source insight, if derived from one.
When this endpoint was last executed via the API (ISO 8601), or null if never executed.
Per-column bucket overrides for range variable materialization.
Tag names associated with this endpoint.
Breakdown property names that may be omitted on /run. Omitted ones return data aggregated across all values of that breakdown.
Changes
No recorded changes to this operation across all 1 revision of this API.