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

# POST /didcomm/credentials/offer-credential

`POST /didcomm/credentials/offer-credential`

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

## Headers

- `x-tenant-id` string

## Request body

- OfferCredentialOptions
  - `protocolVersion` 'v1' | 'v2', required
  - `credentialFormats` CredentialFormatPayloadCredentialFormatsCreateOffer, required — Get the payload for a specific method from a list of CredentialFormat interfaces and a method
    - `indy` AnonCredsOfferCredentialFormat — This defines the module payload for calling CredentialsApi.offerCredential or CredentialsApi.negotiateProposal
      - `credentialDefinitionId` string, required
      - `revocationRegistryDefinitionId` string
      - `revocationRegistryIndex` number, double
      - `attributes` CredentialPreviewAttributeOptions[], required
        - `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
            - `base64` string — Base64-encoded data, when representing arbitrary content inline instead of via links. Optional.
            - `json` union
              - …
            - `links` string[] — A list of zero or more locations at which the content may be fetched. Optional.
            - `jws` union — A JSON Web Signature over the content of the attachment. Optional.
              - …
            - `sha256` string — The hash of the content. Optional.
    - `anoncreds` AnonCredsOfferCredentialFormat — This defines the module payload for calling CredentialsApi.offerCredential or CredentialsApi.negotiateProposal
      - `credentialDefinitionId` string, required
      - `revocationRegistryDefinitionId` string
      - `revocationRegistryIndex` number, double
      - `attributes` CredentialPreviewAttributeOptions[], required
        - `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
            - `base64` string — Base64-encoded data, when representing arbitrary content inline instead of via links. Optional.
            - `json` union
              - …
            - `links` string[] — A list of zero or more locations at which the content may be fetched. Optional.
            - `jws` union — A JSON Web Signature over the content of the attachment. Optional.
              - …
            - `sha256` string — The hash of the content. Optional.
  - `autoAcceptCredential` 'always' | 'contentApproved' | 'never' — Typing of the state for auto acceptance
  - `comment` string
  - `connectionId` string, required

## Response `200`

Ok

- 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)
