---
title: "Add a credential for this AS"
method: POST
path: "/oauth2/servers/{asId}/credentials"
tags: ["AuthorizationServers"]
---

# Add a credential for this AS

`POST /oauth2/servers/{asId}/credentials`

## Path parameters

- `asId` string, uuid, required

## Request body

- CredentialCreateRequest
  - `credentialType` CredentialType, required — unresolved $ref
  - `label` string
  - `clientId` string
  - `clientSecret` string, password — Plaintext client secret. Write-only: it is stored through the configured secret provider and never persisted in plaintext or returned in any response.
  - `keyAlias` string
  - `validFrom` string, date-time
  - `validUntil` string, date-time, nullable

## Response `201`

Credential added.

- SoftwareCredential — unresolved $ref

## Changes

- **2026-06-17** `64dca514085f` — 1 info
  - the request optional property `clientSecret` became write-only

[Change history](https://skmtc.dev/sphereon-opensource/apis/software-instance-manager-api/changes/oauth2/servers/:asId/credentials/post.md)

---

[API](https://skmtc.dev/sphereon-opensource/apis/software-instance-manager-api.md) · [All operations](https://skmtc.dev/sphereon-opensource/apis/software-instance-manager-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sphereon-opensource/software-instance-manager-api/revisions/ccb5e0065014/schema)
