---
title: "Install snippet"
method: GET
path: "/v1/projects/{projectId}/install-snippet"
tags: ["Install"]
---

# Install snippet

`GET /v1/projects/{projectId}/install-snippet`

## Request

- Base URL: `https://hootlens-api-368877148687.us-east1.run.app`
- URL: `https://hootlens-api-368877148687.us-east1.run.app/v1/projects/{projectId}/install-snippet`
- Auth: HTTP bearer

The exact tag and steps for a platform. The site (project) ID is public and the snippet holds no secret.

Required token scopes are listed in x-hootlens-scopes. A signed-in person needs the matching permission on the site instead (the viewer and editor roles are presets of the permissions).

## Path parameters

- `projectId` string, required: An identifier: 1 to 80 letters, digits, underscores or hyphens.

## Query parameters

- `platform` 'gtm' | 'wordpress' | 'shopify' | 'nextjs' | 'remix' | 'nuxt' | 'sveltekit' | 'astro' | 'angular' | 'gatsby' | 'vite' | 'webflow' | 'squarespace' | 'wix' | 'html'
- `variant` 'app' | 'pages'

## Response `200`

The snippet and steps.

- InstallSnippet
  - `projectId` string, required: An identifier: 1 to 80 letters, digits, underscores or hyphens.
  - `platform` string, required
  - `label` string
  - `where` string
  - `tag` string, required: The script tag.
  - `variants` object[]
  - `variant` string
  - `steps` string[], required
  - `blocks` object[], required
    - `file` string
    - `code` string
  - `allowedOrigins` string[]
  - `verify` string[]
  - `platforms` string[]

## Other responses

- `400`: The request fields are invalid.
- `401`: The credential is missing, expired or revoked.
- `403`: The credential or the person's permissions on the site do not permit this action.
- `404`: The site, or the record inside it, does not exist or the caller is not a member (a non-member cannot tell the two apart).
- `429`: A rate limit or a per-site limit was reached.

---

[API](https://skmtc.dev/hootlens/apis/hoot-lens-api.md) · [All operations](https://skmtc.dev/hootlens/apis/hoot-lens-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hootlens/apis/hoot-lens-api/revisions/f64f8dc7b84e?raw)
