Js-snippet

For instructions on how to authenticate to use this endpoint, see API overview.

Endpoints

GET
GET
PATCH

Retrieve js snippet resolve

Preview what a given pin would resolve to, without saving it.

Path parameters

  • project_id
    string

Example request

GET /api/projects/:project_id/js-snippet/resolve
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/js-snippet/resolve/

Example response

Status 200 No response body

Retrieve js snippet version

Return the team's current version pin and resolved version.

Path parameters

  • project_id
    string

Example request

GET /api/projects/:project_id/js-snippet/version
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/js-snippet/version/

Example response

Status 200 No response body

Update js snippet version

Update the team's version pin.

Path parameters

  • project_id
    string

Example request

PATCH /api/projects/:project_id/js-snippet/version
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/js-snippet/version/

Example response

Status 200 No response body

Community questions

Questions about this page? or post a community question.