---
title: "Create Credential"
method: POST
path: "/v2/identities/{identifier}/credentials"
tags: ["Credentials"]
---

# Create Credential

`POST /v2/identities/{identifier}/credentials`

Creates a credential for the provided identity.

## Path parameters

- `identifier` string, required

## Request body

- CreateCredentialRequest
  - `credentialSchema` string, required
  - `claimID` string
  - `type` string, required
  - `credentialSubject` object, required
  - `expiration` integer
  - `version` integer
  - `revNonce` integer
  - `subjectPosition` string
  - `merklizedRootPosition` string
  - `refreshService` RefreshService
    - `id` string, required
    - `type` 'Iden3RefreshService2023', required
  - `displayMethod` DisplayMethod
    - `id` string, required
    - `type` 'Iden3BasicDisplayMethodV1', required
  - `proofs` string[]
  - `credentialStatusType` 'Iden3commRevocationStatusV1.0' | 'Iden3ReverseSparseMerkleTreeProof' | 'Iden3OnchainSparseMerkleTreeProof2023'

## Response `201`

Credential Created

- CreateCredentialResponse
  - `id` string, required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `422` — Unprocessable Content
- `500` — Internal Server error

## Changes

- **2024-12-18** `fe16b051b34c` — 1 breaking, 1 info
  - removed the enum value `Iden3BasicDisplayMethodv2` of the request property `displayMethod/type`
  - added the new `Iden3BasicDisplayMethodV1` enum value to the request property `displayMethod/type`
- **2024-12-18** `c211b9b15a5d` — 1 breaking, 1 info
  - removed the enum value `Iden3BasicDisplayMethodV1` of the request property `displayMethod/type`
  - added the new `Iden3BasicDisplayMethodv2` enum value to the request property `displayMethod/type`
- **2024-12-17** `96ff718e8ae9` — 1 breaking, 1 info
  - removed the enum value `Iden3BasicDisplayMethodv2` of the request property `displayMethod/type`
  - added the new `Iden3BasicDisplayMethodV1` enum value to the request property `displayMethod/type`
- **2024-12-02** `a71b9e9bd838` — 1 breaking, 1 warning, 1 info
  - removed the enum value `Iden3BasicDisplayMethodV1` of the request property `displayMethod/type`
  - removed the request property `encryptionKey`
  - added the new `Iden3BasicDisplayMethodv2` enum value to the request property `displayMethod/type`

[Change history](https://skmtc.dev/0xpolygonid/apis/privado-id-issuer/changes/v2/identities/:identifier/credentials/post.md)

---

[API](https://skmtc.dev/0xpolygonid/apis/privado-id-issuer.md) · [All operations](https://skmtc.dev/0xpolygonid/apis/privado-id-issuer/llms.txt) · [OpenAPI document](https://skmtc.dev/0xpolygonid/apis/privado-id-issuer/revisions/68efa0ba742d?raw)
