---
title: "Set User Credential"
method: POST
path: "/api/credentials/{cred_name}"
tags: ["Credentials API"]
---

# Set User Credential

`POST /api/credentials/{cred_name}`

## Request

- The document declares no server URL.
- Auth: none declared

Post/Update user credentials

## Path parameters

- `cred_name` string, required

## Headers

- `x-osmo-user` string, nullable

## Request body

- CredentialOptions: Credential options
  - `registry_credential` UserRegistryCredential: Authentication information for a Docker registry.
    - `registry` string: The Docker registry URL
    - `username` string: The username for the Docker registry
    - `auth` string, required: The authentication token for the Docker registry
  - `data_credential` UserDataCredential: Authentication information for a data service.
    - `endpoint` string, required: The OSMO storage URI for the data service (e.g., s3://bucket). For S3-compatible services with HTTP endpoints, set 'override_url' separately rather than pasting the full HTTPS URL here.
    - `region` string, nullable: The region for the data service
    - `override_url` string, nullable: HTTP service URL for S3-compatible providers (e.g., http://minio:9000, https://s3-compat.example.com). Leave unset for native AWS S3, GCS, Azure, etc.
    - `addressing_style` 'virtual' | 'path' | 'auto', nullable: S3 request addressing style for S3-compatible providers. Use 'virtual' for providers such as CoreWeave CAIOS that reject path-style requests, or 'path' for localstack/MinIO-style endpoints.
    - `access_key_id` string, required: The authentication key for a data backend
    - `access_key` string, required: The authentication secret for a data backend
  - `generic_credential` UserCredential: Generic authentication information.
    - `credential` object, required: The credential dictionary that contains authentication information

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

## Changes

- **2026-08-03** `b9d312a13f5d`: 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
- **2026-05-11** `4a5778cf4e28`: 1 info
  - added the new optional request property `data_credential/anyOf[subschema #1: UserDataCredential]/addressing_style`
- **2026-04-08** `a8157dc3279d`: 3 warning, 5 info
  - removed `#/components/schemas/UserCredential` from the `generic_credential` request property `allOf` list
  - removed `#/components/schemas/UserDataCredential` from the `data_credential` request property `allOf` list
  - removed `#/components/schemas/UserRegistryCredential` from the `registry_credential` request property `allOf` list
  - `header` request parameter `x-osmo-user` list-of-types was widened by adding types `null`
  - …4 more
- **2026-02-27** `3b4b243276b5`: 1 info
  - added the new optional request property `data_credential/allOf[subschema #1: UserDataCredential]/override_url`

[Operation history](https://skmtc.dev/nvidia/apis/nvidia-corporation-osmo-api/changes/api/credentials/:cred_name/post.md)

---

[API](https://skmtc.dev/nvidia/apis/nvidia-corporation-osmo-api.md) - [All operations](https://skmtc.dev/nvidia/apis/nvidia-corporation-osmo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nvidia/apis/nvidia-corporation-osmo-api/revisions/845585a71dbb?raw)
