Create credential definition
Creates a credential definition: what the organisation issues, and how. Each entry of credentialConfigurations is one credential configuration (one format and one vct, doctype or type, with its claims, validity, revocation and holder binding). The issuer publishes each configuration in the Credential Issuer Metadata at once, with a credentialConfigurationId that it makes. The top level has the settings of the whole definition: the label, the trust in wallets and the issuance options.
- Signing key: send
cryptographicKeyFormatandcryptographicKeyIdentifierin each configuration, because each configuration has its owncredentialCategoryand its key must fit it. The issuer refuses a key at the top level. The key must be an active key of the organisation with a certificate chain. The answer gives the key of the first configuration at the top level: it signs the codes and tokens of the issuer for this definition. The issuer compares the certificate of each key with thecredentialCategoryof its configuration and shows the result insigningKeyCheck. It does not refuse a key that does not fit. - Card images: without
display.logo.urianddisplay.backgroundImage.uri, the definition and each configuration get the logo and cover image of the organisation. Upload your own with Update credential definition logo image and Update credential definition cover image. - Claims: give them in each configuration (
claims, orcredentialDefinitionforjwt_vc_json), or as acredentialDefinitionUri. List credential definition templates has ready claims for common credentials. - PID: a configuration whose type is a PID (
vctin theurn:eudi:pid:namespace, ordoctypeeu.europa.ec.eudi.pid.1) lists every mandatory attribute of PID Rulebook v1.7 and marks it mandatory, in the format of its type; the issuer refuses any other PID definition with 400.
The answer (HTTP 200) is the new credential definition with definitionVersion 1. Then issue it with Issue credential.
Authorizations
AuthorizationstringheaderrequiredYour API key with the prefix
ApiKey:ApiKey <your-api-key>. Get an API key.Scope:
credential-definitions:create
Body
The credential definition. label, version and credentialConfigurations are required. The issuer refuses a member that it does not know (HTTP 400).
labelstringrequiredYour name for the credential definition, 3 to 100 characters. Wallets do not show it. The platform reserves the labels
Payment User Credential,Payment Card Credential,Payment Account Credential,PID IssuanceandPhoto ID Issuance(in any case).3 to 100 characters.
Example:
"Issue Portable Document A1"credentialConfigurations object[]requiredThe credential configurations, at least one.
version,requiresTrustedWalletProviderandacceptedWalletProvidersare top-level members: in an entry they give400(unknown field). A configuration member (for examplecredentialFormatorclaims) belongs in an entry: at the top level the issuer checks its type and does not use it.At least 1 item.
versionenum<string>requiredThe OpenID4VCI version of the issuance:
version_01(OpenID4VCI 1.0). Required: a request without it (version: required) or with another value (version: invalid value <value>) gets HTTP 400. It never changes after the create.Available options:
version_01Example:
"version_01"requiresTrusted Wallet Provider booleantrue: the wallet must send a valid wallet unit attestation, else the issuer refuses the request withinvalid_clientat the pushed authorization request, the interactive authorization, the token request, the refresh and the wallet-initiated path. A trust source ofacceptedWalletProvidersmust have the signer of the wallet unit attestation and of each key attestation of a wallet provider aswallet_provider, else the issuer refuses the token or credential request withinvalid_client(Client attestation refused: the wallet provider of the attestation is not trusted for this credential).false: no trust check runs: the recorded value isnot_required. A wallet unit attestation that a wallet sends has only its validity checked, and an invalid one is recorded and does not refuse. Defaultfalse.acceptedWallet Providers string (uuid)[]The trust sources that the wallet provider must come from (their
id, from List trust sources), each used forwallet_provider. Required whenrequiresTrustedWalletProvideristrue(trust.accepted_list_required). The value stays when the switch isfalse. Default[].requiresInteractive Authorisation booleantrue: the issuance uses the Interactive Authorization Endpoint (credential issuer identifierv1.0-iar). Needed for a dynamic credential request (presentationDefinitionIdof the issue call). Defaultfalse.externalOpenid Provider Id string | nullAn external OpenID provider of the organisation that authenticates the holder in the Authorization Code Flow. Another value gives HTTP 400. Leave it out, or send
null, for no provider.allowsWallet Initiated Issuance booleantrue: a wallet can start an issuance without a credential offer, with a pushed authorisation request that names a scope or a credential configuration id. The issuer then makes the issuance history. Defaultfalse.allowsCredential Offer Reuse booleantrue: one credential offer can start one issuance for each wallet. A pushed authorisation request with theissuer_stateof an offer that is already in use starts a new issuance history, until theissuer_stateexpires.false: one credential offer serves one wallet. Defaultfalse.displayobjectThe display of the credential definition. Without
logo.uriandbackgroundImage.uri, the issuer puts the logo and cover image of the organisation (or of the sandbox organisation). To upload your own images, use the logo and cover image calls of the credential definition after the create.
Response
The new credential definition. The status is 200, not 201.
credentialDefinition objectThe new credential definition, with its configurations and their signing key checks.