---
title: "CreatePipeline"
method: POST
path: "/v1.1/pipeline"
tags: ["ControlService"]
---

# CreatePipeline

`POST /v1.1/pipeline`

Creates a pipeline for a writekey.
 Supply scope to determine where to save the pipeline.
 Most clients should use scope PIPELINE_SCOPE_PUBLIC.

## Request body

- ProtobufControlpbV1CreatePipelineRequest
  - `pipeline` union
    - object, nullable
    - ProtobufStreamingpbV1Pipeline
      - `author` string
      - `createdAt` string, date-time, nullable
      - `eventSplit` union — EventSplit runs an expression that returns an array of child events for the same pipeline. The source event is replaced by the emitted children. Each child must set the current pipeline write key, and the forwarder rejects the split if any child emits a different write key or if the event does not match a known ingestion schema like AJS. WARNING: This feature is experimental and will not activate on any live pipelines. And may be removed in the future.
        - object, nullable
        - ProtobufStreamingpbV1EventSplit
          - `expression` union
            - object, nullable
            - ProtobufStreamingpbV1Expression
              - …
      - `filter` union — Filter drops source events before destination processing.
        - object, nullable
        - ProtobufStreamingpbV1PipelineFilter
          - `byLua` union — Will filter any event when the value of the LUA expression returns true If there is an error with the LUA filter the event will NOT be dropped
            - object, nullable
            - ProtobufStreamingpbV1FilterOpLua
              - …
      - `integrations` union[], nullable
        - union
          - object, nullable
          - ProtobufStreamingpbV1Integration
            - `connection` union
              - …
            - `consent` union
              - …
            - `delayEvent` union
              - …
            - `description` string
            - `disabled` boolean
            - `endpointSchema` union
              - …
            - `id` string
            - `integrationName` string
            - `modes` string[], nullable — Options for altering integration processing behavior. Recommended for advanced use only.
            - `revision` union
              - …
            - `scope` 'INTEGRATION_SCOPE_UNSPECIFIED' | 'INTEGRATION_SCOPE_PUBLIC' | 'INTEGRATION_SCOPE_INTERNAL'
            - `secretRef` string — UUID of secret object for resolving $$secret.KEY$$ patterns anywhere within the integration.
            - `transformStages` union[], nullable
              - …
      - `transform` union — Transform modifies each event before integration-level transforms run.
        - object, nullable
        - ProtobufStreamingpbV1TransformStage
          - `data` union
            - object, nullable
            - ProtobufStreamingpbV1TransformStageData
              - …
          - `desc` string
          - `name` string
          - `outputContentType` string
      - `writeKey` string
  - `scope` 'INTEGRATION_SCOPE_UNSPECIFIED' | 'INTEGRATION_SCOPE_PUBLIC' | 'INTEGRATION_SCOPE_INTERNAL'

## Response `200`

OK

- ProtobufControlpbV1CreatePipelineResponse
  - `limits` union
    - object, nullable
    - ProtobufControlpbV1CreatePipelineResponseLimits
      - `integrationCount` integer — Current number of deployed integrations, excluding MetaRouter internal integrations
      - `integrationLimit` integer — Maximum number of integrations allowed in the cluster
  - `pipeline` union
    - object, nullable
    - ProtobufStreamingpbV1Pipeline
      - `author` string
      - `createdAt` string, date-time, nullable
      - `eventSplit` union — EventSplit runs an expression that returns an array of child events for the same pipeline. The source event is replaced by the emitted children. Each child must set the current pipeline write key, and the forwarder rejects the split if any child emits a different write key or if the event does not match a known ingestion schema like AJS. WARNING: This feature is experimental and will not activate on any live pipelines. And may be removed in the future.
        - object, nullable
        - ProtobufStreamingpbV1EventSplit
          - `expression` union
            - object, nullable
            - ProtobufStreamingpbV1Expression
              - …
      - `filter` union — Filter drops source events before destination processing.
        - object, nullable
        - ProtobufStreamingpbV1PipelineFilter
          - `byLua` union — Will filter any event when the value of the LUA expression returns true If there is an error with the LUA filter the event will NOT be dropped
            - object, nullable
            - ProtobufStreamingpbV1FilterOpLua
              - …
      - `integrations` union[], nullable
        - union
          - object, nullable
          - ProtobufStreamingpbV1Integration
            - `connection` union
              - …
            - `consent` union
              - …
            - `delayEvent` union
              - …
            - `description` string
            - `disabled` boolean
            - `endpointSchema` union
              - …
            - `id` string
            - `integrationName` string
            - `modes` string[], nullable — Options for altering integration processing behavior. Recommended for advanced use only.
            - `revision` union
              - …
            - `scope` 'INTEGRATION_SCOPE_UNSPECIFIED' | 'INTEGRATION_SCOPE_PUBLIC' | 'INTEGRATION_SCOPE_INTERNAL'
            - `secretRef` string — UUID of secret object for resolving $$secret.KEY$$ patterns anywhere within the integration.
            - `transformStages` union[], nullable
              - …
      - `transform` union — Transform modifies each event before integration-level transforms run.
        - object, nullable
        - ProtobufStreamingpbV1TransformStage
          - `data` union
            - object, nullable
            - ProtobufStreamingpbV1TransformStageData
              - …
          - `desc` string
          - `name` string
          - `outputContentType` string
      - `writeKey` string
  - `scope` 'INTEGRATION_SCOPE_UNSPECIFIED' | 'INTEGRATION_SCOPE_PUBLIC' | 'INTEGRATION_SCOPE_INTERNAL'

## 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)
