provider external_data_sources POST /api/environments/{environment_id}/external_data_sources/draft_custom_manifest/
@utdk/posthog /api/environments/{environment_id}/external_data_sources/draft_custom_manifest/
environments_external_data_sources_draft_custom_manifest_create
Draft a Custom REST source manifest from API documentation using an LLM. Reads the docs (a URL fetched server-side, or pasted text / OpenAPI spec), asks the model to author a RESTAPIConfig manifest, and validates it against the create-path checks — repairing against validation errors up to a small budget. Returns the manifest for the user to review and tweak in the builder before creating the source; it does NOT create anything. Gated by the `dwh-custom-source-ai-builder` flag, and requires the org to have approved AI data processing, since the docs are sent to the LLM gateway.
environment_id path required
Deprecated. Use /api/projects/{project_id}/ instead.
string

Try it

Authentication
Configure credentials for PostHog API
environmentsExternalDataSourcesDraftCustomManifestCreate
POST/api/environments/{environment_id}/external_data_sources/draft_custom_manifest/
Draft a Custom REST source manifest from API documentation using an LLM. Reads the docs (a URL fetched server-side, or pasted text / OpenAPI spec), asks the model to author a RESTAPIConfig manifest, and validates it against the create-path checks — repairing against validation errors up to a small budget. Returns the manifest for the user to review and tweak in the builder before creating the source; it does NOT create anything. Gated by the `dwh-custom-source-ai-builder` flag, and requires the org to have approved AI data processing, since the docs are sent to the LLM gateway.

Parameters

required

Deprecated. Use /api/projects/{project_id}/ instead.

Input

Optional human name of the API being connected (e.g. 'Acme CRM'). Used only to orient the model.

URL of the API documentation to read. Provide this or docs_text; fetched server-side via the egress proxy.

Raw API documentation or an OpenAPI/Swagger spec, pasted directly. Provide this or docs_url.

Configure credentials above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import posthog from '@utdk/posthog';

await posthog.environmentsExternalDataSourcesDraftCustomManifestCreate()