---
title: "POST /didcomm/credentials/propose-credential"
method: POST
path: "/didcomm/credentials/propose-credential"
tags: ["DIDComm Credentials"]
---

# POST /didcomm/credentials/propose-credential

`POST /didcomm/credentials/propose-credential`

Initiate a new credential exchange as holder by sending a propose credential message
to the connection with a specified connection id.

## Headers

- `x-tenant-id` string

## Request body

- ProposeCredentialOptions
  - `protocolVersion` 'v1' | 'v2', required
  - `credentialFormats` object, required
    - `indy` union
      - AnonCredsProposeCredentialFormat — This defines the module payload for calling CredentialsApi.createProposal or CredentialsApi.negotiateOffer
        - `schemaIssuerId` string
        - `schemaId` string
        - `schemaName` string
        - `schemaVersion` string
        - `credentialDefinitionId` string
        - `issuerId` string
        - `attributes` CredentialPreviewAttributeOptions[]
          - `name` string, required
          - `mimeType` string
          - `value` string, required
        - `linkedAttachments` LinkedAttachment[]
          - `attributeName` string, required — The name that will be used to generate the linked credential
          - `attachment` Attachment, required — Represents DIDComm attachment https://github.com/hyperledger/aries-rfcs/blob/master/concepts/0017-attachments/README.md
            - `id` string, required
            - `description` string — An optional human-readable description of the content.
            - `filename` string — A hint about the name that might be used if this attachment is persisted as a file. It is not required, and need not be unique. If this field is present and mime-type is not, the extension on the filename may be used to infer a MIME type.
            - `mimeType` string — Describes the MIME type of the attached content. Optional but recommended.
            - `lastmodTime` string, date-time — A hint about when the content in this attachment was last modified.
            - `byteCount` number, double — Optional, and mostly relevant when content is included by reference instead of by value. Lets the receiver guess how expensive it will be, in time, bandwidth, and storage, to fully fetch the attachment.
            - `data` AttachmentData, required — A JSON object that gives access to the actual content of the attachment
              - …
        - `schemaIssuerDid` string
        - `issuerDid` string
      - LegacyIndyProposeCredentialFormat — From T, pick a set of properties whose keys are in the union K
        - `schemaId` string
        - `schemaName` string
        - `schemaVersion` string
        - `credentialDefinitionId` string
        - `attributes` CredentialPreviewAttributeOptions[]
          - `name` string, required
          - `mimeType` string
          - `value` string, required
        - `linkedAttachments` LinkedAttachment[]
          - `attributeName` string, required — The name that will be used to generate the linked credential
          - `attachment` Attachment, required — Represents DIDComm attachment https://github.com/hyperledger/aries-rfcs/blob/master/concepts/0017-attachments/README.md
            - `id` string, required
            - `description` string — An optional human-readable description of the content.
            - `filename` string — A hint about the name that might be used if this attachment is persisted as a file. It is not required, and need not be unique. If this field is present and mime-type is not, the extension on the filename may be used to infer a MIME type.
            - `mimeType` string — Describes the MIME type of the attached content. Optional but recommended.
            - `lastmodTime` string, date-time — A hint about when the content in this attachment was last modified.
            - `byteCount` number, double — Optional, and mostly relevant when content is included by reference instead of by value. Lets the receiver guess how expensive it will be, in time, bandwidth, and storage, to fully fetch the attachment.
            - `data` AttachmentData, required — A JSON object that gives access to the actual content of the attachment
              - …
        - `schemaIssuerDid` string
        - `issuerDid` string
    - `anoncreds` union
      - AnonCredsProposeCredentialFormat — This defines the module payload for calling CredentialsApi.createProposal or CredentialsApi.negotiateOffer
        - `schemaIssuerId` string
        - `schemaId` string
        - `schemaName` string
        - `schemaVersion` string
        - `credentialDefinitionId` string
        - `issuerId` string
        - `attributes` CredentialPreviewAttributeOptions[]
          - `name` string, required
          - `mimeType` string
          - `value` string, required
        - `linkedAttachments` LinkedAttachment[]
          - `attributeName` string, required — The name that will be used to generate the linked credential
          - `attachment` Attachment, required — Represents DIDComm attachment https://github.com/hyperledger/aries-rfcs/blob/master/concepts/0017-attachments/README.md
            - `id` string, required
            - `description` string — An optional human-readable description of the content.
            - `filename` string — A hint about the name that might be used if this attachment is persisted as a file. It is not required, and need not be unique. If this field is present and mime-type is not, the extension on the filename may be used to infer a MIME type.
            - `mimeType` string — Describes the MIME type of the attached content. Optional but recommended.
            - `lastmodTime` string, date-time — A hint about when the content in this attachment was last modified.
            - `byteCount` number, double — Optional, and mostly relevant when content is included by reference instead of by value. Lets the receiver guess how expensive it will be, in time, bandwidth, and storage, to fully fetch the attachment.
            - `data` AttachmentData, required — A JSON object that gives access to the actual content of the attachment
              - …
        - `schemaIssuerDid` string
        - `issuerDid` string
      - LegacyIndyProposeCredentialFormat — From T, pick a set of properties whose keys are in the union K
        - `schemaId` string
        - `schemaName` string
        - `schemaVersion` string
        - `credentialDefinitionId` string
        - `attributes` CredentialPreviewAttributeOptions[]
          - `name` string, required
          - `mimeType` string
          - `value` string, required
        - `linkedAttachments` LinkedAttachment[]
          - `attributeName` string, required — The name that will be used to generate the linked credential
          - `attachment` Attachment, required — Represents DIDComm attachment https://github.com/hyperledger/aries-rfcs/blob/master/concepts/0017-attachments/README.md
            - `id` string, required
            - `description` string — An optional human-readable description of the content.
            - `filename` string — A hint about the name that might be used if this attachment is persisted as a file. It is not required, and need not be unique. If this field is present and mime-type is not, the extension on the filename may be used to infer a MIME type.
            - `mimeType` string — Describes the MIME type of the attached content. Optional but recommended.
            - `lastmodTime` string, date-time — A hint about when the content in this attachment was last modified.
            - `byteCount` number, double — Optional, and mostly relevant when content is included by reference instead of by value. Lets the receiver guess how expensive it will be, in time, bandwidth, and storage, to fully fetch the attachment.
            - `data` AttachmentData, required — A JSON object that gives access to the actual content of the attachment
              - …
        - `schemaIssuerDid` string
        - `issuerDid` string
  - `autoAcceptCredential` 'always' | 'contentApproved' | 'never' — Typing of the state for auto acceptance
  - `comment` string
  - `connectionId` string, required

## Response `200`

CredentialExchangeRecord

- unknown

---

[API](https://skmtc.net/openwallet-foundation/apis/credo-rest-api.md) · [All operations](https://skmtc.net/openwallet-foundation/apis/credo-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openwallet-foundation/credo-rest-api/revisions/33596742b733/schema)
