A credential definition is an issuer template. It tells wallets what kind of credential you issue and which claim paths can appear in it. Definitions move in one direction:
StatusAllowed actionsCan issue?
draftread, update, publish, archiveNo
publishedread, archiveYes
archivedreadNo
Published definitions are immutable. Create a new version when wallet-visible fields need to change.
Credential-definition lifecycle methods (createDraft, update, publish, archive, and lifecycle list filters) ship in @authbound/server 0.3.0 and later. Use create() when you want a published definition immediately, or the draft workflow when staging is intentional.

Dashboard builder

The dashboard builder starts from a template or custom definition, then walks through Details, Fields, Appearance, and Review. Check the wallet and API previews, save a draft while editing, and publish when ready. Leave the VCT empty to use your project’s issuer URL. A published definition works with both test and live keys and is read-only: duplicate it to make a changed copy, or archive it to stop issuing it. Issuance is enabled per organization. If you don’t see Credentials in your dashboard, contact us.

Create and publish immediately

POST /v1/issuer/credential-definitions create sends explicit published intent. A published definition must include claims and pass publish-readiness validation.
await authbound.issuer.credentialDefinitions.create({
  credentialDefinitionId: "pension_credential_v1",
  vct: "urn:vc:authbound:pension:1.0",
  format: "dc+sd-jwt",
  title: "Pension Credential",
  aliases: ["pension"],
  claims: [
    { path: ["Person", "given_name"], mandatory: true, displayName: "Given Name" },
    { path: ["Person", "family_name"], mandatory: true, displayName: "Family Name" },
    { path: ["Pension", "startDate"], mandatory: true, displayName: "Start Date" },
  ],
  idempotencyKey: "credential-definition:pension:v1",
});
Direct REST callers send "lifecycleStatus": "published". If the field is omitted, the backend creates a draft.

Work in a draft

Use a draft when the definition is not ready for issuance.
const draft = await authbound.issuer.credentialDefinitions.createDraft({
  credentialDefinitionId: "pension_credential_v2",
  vct: "urn:vc:authbound:pension:2.0",
  format: "dc+sd-jwt",
  title: "Pension Credential v2",
  metadata: { owner: "benefits" },
  idempotencyKey: "credential-definition:pension:v2",
});

await authbound.issuer.credentialDefinitions.update(draft.credentialDefinitionId, {
  claims: [
    { path: ["Pension", "startDate"], mandatory: true, displayName: "Start Date" },
  ],
});

const published = await authbound.issuer.credentialDefinitions.publish(
  draft.credentialDefinitionId,
  {
    idempotencyKey: "credential-definition:pension:v2:publish",
  }
);
An unready publish returns credential_definition_not_publishable with bounded details.issues entries. Reusing a publish idempotency key for a different definition returns HTTP 409.

List definitions

GET /v1/issuer/credential-definitions
const drafts = await authbound.issuer.credentialDefinitions.list({
  lifecycleStatus: "draft",
});
REST callers use ?lifecycle_status=draft, published, or archived. Omitting the filter returns the active view, which can include owned drafts. Global definitions are visible only while active and published; archived results are project-owned.

Retrieve and update a draft

const definition = await authbound.issuer.credentialDefinitions.get(
  "pension_credential_v2"
);

await authbound.issuer.credentialDefinitions.update(definition.credentialDefinitionId, {
  title: "Updated Pension Credential",
  aliases: ["pension", "retirement-benefit"],
});
Update accepts drafts only. Published and archived definitions return HTTP 409 with published_credential_definition_immutable or archived_credential_definition_immutable. IDs from another project or environment return the same 404 response as an absent ID. Self-hosted installations differ: update() writes a new published version and returns a CredentialDefinition (SDK 0.5.0 or later). See Self-hosted installations.

Archive a definition

POST /v1/issuer/credential-definitions/{credentialDefinitionId}/archive
await authbound.issuer.credentialDefinitions.archive(
  "pension_credential_v1"
);
Archiving stops new issuance of a definition. Existing issuance records remain auditable. The definition keeps verifying until its verification is retired, so credentials already issued stay usable.

Wallet-visible fields and management metadata

Wallet-visible fields include title, aliases, rendering, and claim display names. Definition metadata is authenticated management metadata; wallets do not discover it, and it is not embedded in issued credentials. Keep all these fields free of secrets and unnecessary personal data. Put user-specific data in issuance claims. Definition metadata accepts JSON values with runtime limits: eight levels, 1,024 total nodes, 128 entries per object or array, and 2,048 characters per string. Prototype-related keys are rejected. Authbound’s structural issuer metadata is never returned through the public metadata field.

Self-hosted installations

If you run Authbound in your own infrastructure, a definition is published when you create it. There are no drafts, and every definition issues dc+sd-jwt. Send display instead of title, and give each claim a type and its own display names. With @authbound/server 0.5.0 or later, create() with display does the same and publishes immediately. Don’t combine display with title or rendering, and don’t pass display to createDraft():
curl https://api.example.com/v1/issuer/credential-definitions \
  -H "X-Authbound-Key: sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "credentialDefinitionId": "membership",
    "display": [
      { "locale": "en", "name": "Membership", "backgroundColor": "#12355B", "textColor": "#FFFFFF" },
      { "locale": "fi", "name": "Jäsenyys" }
    ],
    "claims": [
      { "path": ["member_name"], "mandatory": true, "display": [{ "locale": "en", "name": "Name" }] },
      { "path": ["tier"], "type": "integer" }
    ],
    "validity": { "durationSeconds": 31536000 }
  }'
FieldWhat it does
vctOptional. Without it, the definition gets a URL under your installation’s issuer: {issuer origin}/issuers/{project_id}/types/{credentialDefinitionId}.
displayOne entry per locale, up to 16. Wallets show the name, description, logo, colors, background image and SVG templates.
claimsUp to 64. A path has up to three segments of letters, digits and underscores, each up to 64 characters. The first segment starts with a letter; later segments may start with a digit. type is string (the default), integer, boolean, date, datetime, object, array or image. Every claim is selectively disclosable; mandatory means your offer must include it.
validityA fixed durationSeconds, or notBeforeClaim, expiresClaim and maxSeconds to take the lifetime from two mandatory datetime claims. Without validity, the lifetime is one year. A validity you send has no defaults inside it, so it needs durationSeconds or the claim fields.
uniquenessUp to 4 mandatory claim paths. Only one active credential per combination of their values.
aliasesUp to 15 more vct values the definition is verified under.
metadataYour own JSON, up to 8 KiB and eight levels deep, with no null values. Wallets and credentials never see it.
A vct or alias can’t start with urn:vc:authbound:, urn:eudi:, urn:eu.europa.ec., eu.europa.ec. or org.iso., and it can’t contain a backslash. A URL on your issuer’s host is reserved for each definition’s own default vct. A vct or alias also can’t be one that any other definition uses, including your project’s other definitions. Each of these returns 400 with param set to vct or aliases. To version a definition, give it a new vct and keep the old one as an alias. This works for a default vct too. All image claims of a definition share 20,480 bytes. An image claim without maxBytes takes all of them, so a definition with two image claims needs maxBytes on each. The issuer keeps display, claims, validity and uniqueness together as one JSON document of at most 32 KiB. Each field can stay within its own limits and still pass that bound, for example many locales that each carry long image and SVG template URLs. A definition past it returns 400 with param set to definition. PATCH writes a new version of the definition. Fields you leave out keep their value, and uniqueness and metadata can’t be cleared. A validity you send replaces the whole object: boundedBySignerCertificate goes back to false unless you send it again. Archived definitions stay in the list with lifecycleStatus: "archived". The list returns up to limit definitions (20 by default, at most 100), most recently changed first. When more follow, the response carries nextCursor; send it as cursor to get the next page. Responses also carry title and each claim’s displayName, taken from the English display name, or the first one when there’s no English entry. In @authbound/server, list({ limit, cursor }) pages these definitions and returns nextCursor. A self-hosted list ignores lifecycleStatus, so filter data in your app. Authbound’s hosted service refuses limit and cursor.