---
title: "Create credential"
method: POST
path: "/v2/container-registry-auths"
tags: ["Credentials v2", "API v2"]
---

# Create credential

`POST /v2/container-registry-auths`

## Request

- The document declares no server URL.
- Auth: none required
- TypeScript: <https://skmtc.dev/yottalabs/apis/docs-yottalabs-ai/docs/v2/container-registry-auths/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new container registry credential

## Request body

- CredentialV2CreateRequest: Container Registry Credential Create Request (v2)
  - `name` string, required: Credential name (1-20 chars, starts with letter)
  - `username` string, required: Registry username
  - `password` string, required: Registry password/token

## Response `200`

OK

- ResultCredentialV2Response
  - `message` string: message
  - `code` integer: code
  - `data` CredentialV2Response: Container Registry Credential Response (v2)
    - `id` integer: Credential ID
    - `name` string: Credential name

## Other responses

- `400`: Invalid request
- `500`: Internal Server Error

---

[API](https://skmtc.dev/yottalabs/apis/docs-yottalabs-ai.md) - [All operations](https://skmtc.dev/yottalabs/apis/docs-yottalabs-ai/llms.txt) - [OpenAPI document](https://skmtc.dev/yottalabs/apis/docs-yottalabs-ai/revisions/998cc08df103?raw)
