---
title: "Create a credential offer"
method: POST
path: "/v1/credential-offers"
tags: ["OpenID4VCI Protocol"]
---

# Create a credential offer

`POST /v1/credential-offers`

Create an OpenID4VCI credential offer using the pre-authorized_code flow. Authenticated with the tenant API key (Bearer). The issuer picks a credential template (scoped to the caller's tenant), embeds the claim values, and — by default — generates a 6-digit transaction code (PIN). Returns the offer identifier, the wallet deep-link URI, the issuer identifier, the pre-authorized code, the tx_code (if any), and the `grants` object the wallet uses to drive the token exchange. The offer expires 10 minutes after creation and is single-use.

## Request body

- object
  - `template_id` string, uuid, required — UUID of the credential template to issue from. Must belong to the caller's tenant and not be soft-deleted, else 404. Determines the schema (`vct`, attributes, selective-disclosure flags).
  - `claims` object — Claim name/value map to embed in the credential, keyed by the schema's attribute names. Defaults to `{}` if omitted. Values are stored on the offer and bound into the SD-JWT VC at issuance.
  - `tx_code` boolean — Whether to require a transaction code (PIN) at token exchange. Defaults to `true`. When `true`, a random 6-digit numeric tx_code is generated and returned (deliver it to the holder out-of-band). When `false`, no tx_code is required and the response `tx_code` is an empty string.

## Response `200`

No response body

## Other responses

- `201` — Credential offer created.
- `404` — No template with `template_id` exists for the caller's tenant (or it is soft-deleted).

## Changes

- **2026-06-30** `1ee4908e9af4` — 1 breaking, 1 info
  - request body became required
  - added the non-success response with the status `404`

[Change history](https://skmtc.dev/didit-protocol/apis/didit-credentials-api/changes/v1/credential-offers/post.md)

---

[API](https://skmtc.dev/didit-protocol/apis/didit-credentials-api.md) · [All operations](https://skmtc.dev/didit-protocol/apis/didit-credentials-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/didit-protocol/didit-credentials-api/revisions/2eeb13158ffa/schema)
