---
title: "Create pipeline secret"
method: POST
path: "/pipeline-secrets"
tags: ["pipeline-secrets"]
---

# Create pipeline secret

`POST /pipeline-secrets`

Creates a new pipeline secret in the user context. Append `?workspaceId` to create the secret in a workspace context.

## Query parameters

- `workspaceId` integer

## Request body

- CreatePipelineSecretRequest
  - `name` string
  - `value` string

## Response `200`

OK

- CreatePipelineSecretResponse
  - `secretId` integer

## Other responses

- `400` — Bad request
- `403` — Operation not allowed

---

[API](https://skmtc.net/seqeralabs/apis/seqera-api.md) · [All operations](https://skmtc.net/seqeralabs/apis/seqera-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/seqeralabs/seqera-api/revisions/13316c9fe5ff/schema)
