---
title: "Create Credential Offer"
method: POST
path: "/api/{serviceId}/vci/offer/create"
tags: ["Verifiable Credential Issuer"]
---

# Create Credential Offer

`POST /api/{serviceId}/vci/offer/create`

Create a verifiable credential offer

## Path parameters

- `serviceId` string, required

## Request body

- VciOfferCreateRequest
  - `authorizationCodeGrantIncluded` boolean — The flag indicating whether the `authorization_code` object is included in the `grants` object.
  - `issuerStateIncluded` boolean — The flag indicating whether the `issuer_state` property is included in the `authorization_code` object in the `grants` object.
  - `preAuthorizedCodeGrantIncluded` boolean — The flag to include the `urn:ietf:params:oauth:grant-type:pre-authorized_code` object in the `grants` object.
  - `subject` string — The subject associated with the credential offer.
  - `duration` integer — The duration of the credential offer.
  - `context` string — The general-purpose arbitrary string.
  - `properties` Property[] — Extra properties to associate with the credential offer.
    - `key` string — The key part.
    - `value` string — The value part.
    - `hidden` boolean — The flag to indicate whether this property hidden from or visible to client applications. If `true`, this property is hidden from client applications. Otherwise, this property is visible to client applications.
  - `jwtAtClaims` string — Additional claims that are added to the payload part of the JWT access token.
  - `authTime` integer — The time at which the user authentication was performed during the course of issuing the credential offer.
  - `acr` string — The Authentication Context Class Reference of the user authentication performed during the course of issuing the credential offer.
  - `credentialConfigurationIds` string[] — The value of the `credential_configuration_ids` array. ``` { "credential_issuer": "...", "credential_configuration_ids": [ ... ], "grants": { ... } } ``` This property is mandatory.
  - `txCode` string — The transaction code that should be associated with the credential offer. If this parameter is not empty and the `preAuthorizedCodeGrantIncluded` parameter is `true`, the `urn:ietf:params:oauth:grant-type:pre-authorized_code` object will include the `tx_code` object. The length of the value of this parameter will be used as the value of the `length` property in the `tx_code` object. ``` { "credential_issuer": "...", "credential_configuration_ids": [ ... ], "grants": { "urn:ietf:params:oauth:grant-type:pre-authorized_code": { "pre-authorized_code": "...", "tx_code": { "length": length } } } } ```
  - `txCodeInputMode` string — The input mode of the transaction code. The value of this property will be used as the value of the `input_mode` property in the `tx_code` object. ``` { "credential_issuer": "...", "credential_configuration_ids": [ ... ], "grants": { "urn:ietf:params:oauth:grant-type:pre-authorized_code": { "pre-authorized_code": "...", "tx_code": { "length": length, "input_mode": "..." } } } } ```
  - `txCodeDescription` string — The description of the transaction code. The value of this property will be used as the value of the `description` property in the `tx_code` object. ``` { "credential_issuer": "...", "credential_configuration_ids": [ ... ], "grants": { "urn:ietf:params:oauth:grant-type:pre-authorized_code": { "pre-authorized_code": "...", "tx_code": { "length": length, "description": "..." } } } } ```

## Response `200`

- VciOfferCreateResponse
  - `resultCode` string — The code which represents the result of the API call.
  - `resultMessage` string — A short message which explains the result of the API call.
  - `action` 'CREATED' | 'FORBIDDEN' | 'CALLER_ERROR' | 'AUTHLETE_ERROR' — The result of the `/vci/offer/create` API call.
  - `info` CredentialOfferInfo
    - `identifier` string — The identifier of the credential offer.
    - `credentialOffer` string — The credential offer in the JSON format.
    - `credentialIssuer` string — The identifier of the credential issuer.
    - `authorizationCodeGrantIncluded` boolean — The flag indicating whether the `authorization_code` object is included in the `grants` object.
    - `issuerStateIncluded` boolean — The flag indicating whether the `issuer_state` property is included in the `authorization_code` object in the `grants` object.
    - `issuerState` string — The value of the `issuer_state` property in the `authorization_code` object in the `grants` object.
    - `preAuthorizedCodeGrantIncluded` boolean — The flag indicating whether the `urn:ietf:params:oauth:grant-type:pre-authorized_code` object is included in the `grants` object.
    - `preAuthorizedCode` string — The value of the `pre-authorized_code` property in the `urn:ietf:params:oauth:grant-type:pre-authorized_code` object in the `grants` object.
    - `subject` string — The subject associated with the credential offer.
    - `expiresAt` integer — The time at which the credential offer will expire.
    - `context` string — The general-purpose arbitrary string.
    - `properties` Property[] — Extra properties to associate with the credential offer.
      - `key` string — The key part.
      - `value` string — The value part.
      - `hidden` boolean — The flag to indicate whether this property hidden from or visible to client applications. If `true`, this property is hidden from client applications. Otherwise, this property is visible to client applications.
    - `jwtAtClaims` string — Additional claims that are added to the payload part of the JWT access token.
    - `authTime` integer — The time at which the user authentication was performed during the course of issuing the credential offer.
    - `acr` string — The Authentication Context Class Reference of the user authentication performed during the course of issuing the credential offer.
    - `credentialConfigurationIds` string[] — The value of the `credential_configuration_ids` property of the credential offer. ``` { "credential_issuer": "...", "credential_configuration_ids": [ ... ], "grants": { ... } } ```
    - `txCode` string — The transaction code.
    - `txCodeInputMode` string — The input mode of the transaction code.
    - `txCodeDescription` string — The description of the transaction code.

## Other responses

- `400`
- `401`
- `403`
- `500`

---

[API](https://skmtc.dev/authlete/apis/authlete-api.md) · [All operations](https://skmtc.dev/authlete/apis/authlete-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/authlete/authlete-api/revisions/8a534bc68775/schema)
