# Create Pipeline

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Create Pipeline"}
>
</Heading>

<MethodEndpoint
  method={"post"}
  path={"/api/v1/workspaces/{workspace_name}/pipelines"}
  context={"endpoint"}
>
  
</MethodEndpoint>

Creates a pipeline YAML file.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"description":"Type the name of the workspace.","in":"path","name":"workspace_name","required":true,"schema":{"description":"Type the name of the workspace.","title":"Workspace Name","type":"string"}},{"description":"Validates the pipeline without actually storing it.","in":"query","name":"dry_run","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"Validates the pipeline without actually storing it.","title":"Dry Run"}}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"content":{"application/json":{"schema":{"$defs":{"DeepsetCloudVersion":{"enum":["v2"],"title":"DeepsetCloudVersion","type":"string"}},"properties":{"deepset_cloud_version":{"default":"v2","description":"The version of deepset the pipeline was created with.","title":"deepset Version","enum":["v2"],"type":"string"},"indexing_yaml":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The deepset pipeline YAML configuration for indexing.","title":"Indexing YAML"},"name":{"description":"Name of the pipeline.","title":"Pipeline Name","type":"string"},"query_yaml":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The deepset pipeline YAML configuration for querying.","title":"Query YAML"}},"required":["name"],"title":"CreatePipeline","type":"object"}}},"required":true}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"content":{"application/json":{"schema":{"properties":{"name":{"description":"Name of the pipeline.","title":"Pipeline Name","type":"string"}},"required":["name"],"title":"PipelineName","type":"object"}}},"description":"Your pipeline was created."},"201":{"content":{"application/json":{"schema":{"properties":{"name":{"description":"Name of the pipeline.","title":"Pipeline Name","type":"string"}},"required":["name"],"title":"PipelineName","type":"object"}}},"description":"Successful Response"},"402":{"description":"You've reached the maximum number of pipelines for your organization."},"409":{"description":"A pipeline with this name is already in your workspace. You can't create pipelines with the same names. Give your pipeline a unique name and save it."},"422":{"description":"Invalid request body or pipeline configuration."},"424":{"description":"We couldn't find the model used in this pipeline so the pipeline wasn't created. Make sure you use an existing model."}}}
>
  
</StatusCodes>
