---
title: "CreateAnalyticsJSFile stores a gzipped analytics.js file inside of the cluster."
method: POST
path: "/v1.1/analytics_js_file"
tags: ["ControlService"]
---

# CreateAnalyticsJSFile stores a gzipped analytics.js file inside of the cluster.

`POST /v1.1/analytics_js_file`

This file is then served by the ingestor e.g. ingest.mr-in.com/v1/files/pipeline-id
 Each cluster will have one file per pipeline.

## Request body

- ProtobufControlpbV1CreateAnalyticsJSFileRequest
  - `file` union
    - object, nullable
    - ProtobufControlpbV1AnalyticsJSFile
      - `author` string
      - `createdAt` string, date-time, nullable
      - `gzippedFileContent` string, byte — Maximum size of the file is 500 KB
  - `pipelineId` string

## Response `200`

OK

- ProtobufControlpbV1CreateAnalyticsJSFileResponse
  - `file` union
    - object, nullable
    - ProtobufControlpbV1AnalyticsJSFile
      - `author` string
      - `createdAt` string, date-time, nullable
      - `gzippedFileContent` string, byte — Maximum size of the file is 500 KB

## Other responses

- `4XX` — Something is wrong with your request such as missing or invalid data. Correct your request and try again.
- `5XX` — Internal server error. Try again later or reach out to MetaRouter support.

---

[API](https://skmtc.net/metarouter/apis/control-api.md) · [All operations](https://skmtc.net/metarouter/apis/control-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/metarouter/control-api/versions/5afc05bfaaa2/schema)
