{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/certifier-io/json-schema/certifier-io-create-credential-schema.json",
  "title": "CreateCredential",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/certifier-io-openapi.json#/components/schemas/CreateCredential",
  "type": "object",
  "properties": {
    "groupId": {
      "type": "string",
      "description": "The group's (credential template's) ID you want to issue the credential to. Check the Group (Credential Template) object."
    },
    "recipient": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the credential's recipient"
        },
        "email": {
          "type": "string",
          "format": "email",
          "description": "The email of the credential's recipient"
        }
      },
      "required": [
        "name"
      ],
      "description": "The recipient of the credential"
    },
    "issueDate": {
      "type": [
        "string",
        "null"
      ],
      "description": "The issuer-claimed issue date. Omit it or set it to null to resolve it to the UTC date at issuance (YYYY-MM-DD)."
    },
    "expiryDate": {
      "type": [
        "string",
        "null"
      ],
      "description": "The issuer-claimed expiration date. Omit it or set it to null to derive the credential template's expiration period at issuance; it stays null when no period is configured (YYYY-MM-DD)."
    },
    "customAttributes": {
      "type": "object",
      "additionalProperties": {
        "nullable": true
      },
      "description": "The key-value object of your custom attributes, where key is your attribute's tag and value is the text value you want to store"
    }
  },
  "required": [
    "groupId",
    "recipient"
  ]
}