> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate the install snippet

> Body: { platform }. Returns { snippet, instructions }.

Body: `&#123; platform &#125;`. Returns `&#123; snippet, instructions &#125;`.

### Path parameters

<ParamField path="id" type="string" required>
  Site id
</ParamField>

### Response

`object`

<ResponseField name="snippet" type="string" required>
  The \<script> tag to paste
</ResponseField>

<ResponseField name="instructions" type="string" />

### Status codes

| Code  | Meaning                  |
| ----- | ------------------------ |
| `200` | Snippet and instructions |
| `401` | Error                    |
| `404` | Error                    |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.example.com/api/admin/sites/{id}/install/snippet' \
    --header 'Authorization: Bearer YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "snippet": "string",
    "instructions": "Two-person tent, green — replacement for damaged pole set."
  }
  ```
</ResponseExample>
