Create credential definition and schema from parameters

A credential definition is created and saved on your cloud agent.

Service Clients (SDKs)

This endpoint can be accessed using one of our service clients as follows.

For more information on how to use our service clients, see our Service Clients (SDKs) guide.

List<String> attributes = new List<String>() {"Attribute A", "Attribute B"};
CredentialDefinitionContract credentialDefinition = await _credentialsClient.CreateCredentialDefinitionAsync(new CredentialDefinitionFromSchemaParameters {
  Name = "Schema Name",
  Version = "1.0", // Must follow Semantic Versioning scheme (https://semver.org),
  Attributes = attributes,
  SupportRevocation = false,
  Tag = "tag" // Tag to identify the schema
});
let attributes = ["Attribute A", "Attribute B"];
let credentialDefinition = await credentialsClient.createCredentialDefinition({
  name: "Schema Name",
  version: "1.0", // Must follow Semantic Versioning scheme (https://semver.org),
  attributes: attributes,
  supportRevocation: false, // Enable revocation at a later date
  tag: "tag" // Tag to identify the schema
});
attributes = ["Attribute A", "Attribute B"]
credential_definition = credentials_client.create_credential_definition({
  "name": "Schema Name",
  "version": "1.0",  # Must follow Semantic Versioning scheme (https: #semver.org),
  "attributes": attributes,
  "supportRevocation": False,  # Enable revocation at a later date
  "tag": "tag"  # Tag to identify the schema
})
body = Credentials::Models::CredentialDefinitionFromSchemaParameters.new
body.name = 'Schema Name'
body.version = '1.0'  # Must follow Semantic Versioning scheme (https: #semver.org)
body.attributes = ['Attribute A', 'Attribute B']
body.support_revocation = false # Enable revocation at a later date
body.tag = 'tag' # Tag to identify the schema
credential_definition = credentials_client.create_credential_definition(body)
Language
Authentication
Header
Click Try It! to start a request and see the response here!