---
title: "Create credentials"
method: POST
path: "/credentials"
tags: ["credentials"]
---

# Create credentials

`POST /credentials`

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

## Query parameters

- `workspaceId` integer

## Request body

- CreateCredentialsRequest
  - `credentials` Credentials
    - `id` string
    - `name` string, required
    - `description` string
    - `provider` 'aws' | 'azure' | 'azure_entra' | 'google' | 'github' | 'gitlab' | 'bitbucket' | 'ssh' | 'k8s' | 'container-reg' | 'tw-agent' | 'codecommit' | 'gitea' | 'azurerepos' | 'seqeracompute' | 'azure-cloud' | 's3', required
    - `baseUrl` string
    - `category` string
    - `deleted` boolean
    - `lastUsed` string, date-time
    - `dateCreated` string, date-time
    - `lastUpdated` string, date-time
    - `keys` union
      - object
        - `discriminator` string
        - `accessKey` string
        - `secretKey` string
        - `assumeRoleArn` string
      - object
        - `discriminator` string
        - `data` string
      - object
        - `discriminator` string
        - `username` string
        - `password` string
        - `token` string
      - object
        - `discriminator` string
        - `username` string
        - `password` string
        - `token` string
      - object
        - `discriminator` string
        - `username` string
        - `password` string
        - `token` string
      - object
        - `discriminator` string
        - `username` string
        - `password` string
        - `token` string
      - object
        - `discriminator` string
        - `privateKey` string
        - `passphrase` string
      - object
        - `discriminator` string
        - `certificate` string
        - `privateKey` string
        - `token` string
      - object
        - `discriminator` string
        - `batchName` string
        - `storageName` string
        - `batchKey` string
        - `storageKey` string
      - object
        - `discriminator` string
        - `batchName` string
        - `storageName` string
        - `batchKey` string
        - `storageKey` string
        - `subscriptionId` string
        - `tenantId` string
        - `clientId` string
        - `clientSecret` string
      - object
        - `discriminator` string
        - `username` string
        - `password` string
        - `token` string
      - object
        - `discriminator` string
        - `userName` string
        - `password` string
        - `registry` string
      - object
        - `discriminator` string
        - `connectionId` string
        - `workDir` string
        - `shared` boolean
      - object
        - `discriminator` string
        - `username` string
        - `password` string
        - `token` string
      - object
        - `discriminator` string
        - `batchName` string
        - `storageName` string
        - `batchKey` string
        - `storageKey` string
        - `tenantId` string
        - `clientId` string
        - `clientSecret` string
      - object
        - `discriminator` string
        - `accessKey` string
        - `secretKey` string
        - `assumeRoleArn` string
      - object
        - `discriminator` string
        - `accessKey` string
        - `secretKey` string
        - `pathStyleAccessEnabled` boolean
      - object
        - `discriminator` string
        - `password` string

## Response `200`

OK

- CreateCredentialsResponse
  - `credentialsId` string

## Other responses

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

## Changes

> 3 revisions in range; 1 not diffed.

- **2026-01-20** `98d6b538c88e` — 2 warning, 34 info
  - removed `#/components/schemas/AwsSecurityKeys, subschema #2` from the `credentials/keys/oneOf[#/components/schemas/SeqeraComputeSecurityKeys -> subschema #16: Seqera Compute credentials]/` request property `allOf` list
  - removed `#/components/schemas/AzureSecurityKeys, subschema #2` from the `credentials/keys/oneOf[#/components/schemas/AzureEntraKeys -> subschema #15: Azure Entra credentials]/` request property `allOf` list
  - added the new optional request property `credentials/keys/oneOf[#/components/schemas/AzureEntraKeys -> subschema #15: Azure Entra credentials]/batchKey`
  - added the new optional request property `credentials/keys/oneOf[#/components/schemas/AzureEntraKeys -> subschema #15: Azure Entra credentials]/batchName`
  - …32 more

[Change history](https://skmtc.dev/seqeralabs/apis/seqera-api/changes/credentials/post.md)

---

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