{
    "openapi": "3.0.1",
    "servers": [
        {
            "url": "https://staging.crossmint.com/api",
            "description": "Staging environment (testnets)"
        },
        {
            "url": "https://www.crossmint.com/api",
            "description": "Production environment (mainnets)"
        }
    ],
    "security": [
        {
            "apiKey": []
        }
    ],
    "info": {
        "description": "N/A",
        "version": "1.0.0",
        "title": "Verifiable Credentials",
        "contact": {
            "name": "Crossmint Verifiable Credentials APIs",
            "url": "https://www.crossmint.com",
            "email": "support@crossmint.com"
        }
    },
    "paths": {
        "/v1-alpha1/credentials/verification/verify": {
            "post": {
                "summary": "Verify Credential",
                "description": "Verify that a verifiable credential is valid.\n\n**API scope required** `credentials.read`\n",
                "operationId": "verify-credential",
                "tags": ["Verifiable Credentials"],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                    "credential": {
                                        "description": "The JSON representing a credential.",
                                        "type": "object"
                                    }
                                },
                                "required": ["credential"]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "isValid": {
                                            "type": "boolean",
                                            "example": "true/false"
                                        },
                                        "error": {
                                            "type": "string",
                                            "nullable": true,
                                            "example": "null / \"error message\""
                                        }
                                    }
                                },
                                "examples": {
                                    "valid": {
                                        "description": "Valid credential",
                                        "value": {
                                            "isValid": true,
                                            "error": null
                                        }
                                    },
                                    "invalid revoked": {
                                        "description": "Revoked credential",
                                        "value": {
                                            "isValid": false,
                                            "error": "Credential Revoked"
                                        }
                                    },
                                    "invalid expired": {
                                        "description": "Credential expired",
                                        "value": {
                                            "isValid": false,
                                            "error": "Credential expired at <date>"
                                        }
                                    },
                                    "invalid proof": {
                                        "description": "Invalid proof",
                                        "value": {
                                            "isValid": false,
                                            "error": "Invalid proof"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request"
                    }
                }
            }
        },
        "/v1-alpha1/credentials/templates/": {
            "post": {
                "summary": "Create Credential template",
                "description": "Create a template, similar to an NFT collection, for issuing verifiable credentials.\n\n**API scope required** `credentials:template.create`\n",
                "operationId": "vc-create-template",
                "tags": ["Verifiable Credentials"],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                    "metadata": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "required": ["name", "image", "description"],
                                        "properties": {
                                            "name": {
                                                "type": "string",
                                                "description": "The name of your collection (Max length: 32).",
                                                "example": "Verifiable Credential",
                                                "maxLength": 32
                                            },
                                            "imageUrl": {
                                                "type": "string",
                                                "description": "Direct link to your Verifiable Credential Template image.",
                                                "example": "https://www.crossmint.com/assets/crossmint/logo.png"
                                            },
                                            "description": {
                                                "type": "string",
                                                "description": "A brief description of credential (Max length: 64).",
                                                "example": "The owner of this credential is authorized.",
                                                "maxLength": 64
                                            }
                                        }
                                    },
                                    "chain": {
                                        "description": "The chain to mint the nft on. All crossmint supported EVM chains are compatible.",
                                        "type": "string",
                                        "enum": ["polygon", "optimism", "base", "etc..."]
                                    },
                                    "credentials": {
                                        "description": "Credentials parameters",
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                            "type": {
                                                "type": "string",
                                                "description": "The type of credentials inside the collection.",
                                                "example": "crossmint:5fe6040e-07a1-48bb-97a3-b588a7e927d2:CourseCompletionCertificate"
                                            },
                                            "storage": {
                                                "type": "string",
                                                "description": "Where to store the credential",
                                                "enum": [
                                                    "crossmint",
                                                    "crossmint-private",
                                                    "decentralized-ipfs",
                                                    "delegated"
                                                ]
                                            },
                                            "delegatedStorageEndpoint": {
                                                "type": "string",
                                                "description": "Only if storage is 'delegated', the endpoint to retrieve the credential from",
                                                "example": "unknown"
                                            },
                                            "encryption": {
                                                "type": "string",
                                                "description": "Whether to encrypt the credential, ensuring data privacy. Only the subject and issuer have the authentication to decrypt the credential.",
                                                "enum": ["crossmint-recoverable", "decentralized-lit", "none"]
                                            },
                                            "delegatedSignature": {
                                                "type": "object",
                                                "additionalProperties": false,
                                                "description": "Issuer information, fill only if using `delegated` storage.",
                                                "properties": {
                                                    "did": {
                                                        "type": "string",
                                                        "description": "The issuer's did",
                                                        "example": "did:polygon:0x123456789"
                                                    },
                                                    "endpoint": {
                                                        "type": "string",
                                                        "description": "The issuer's endpoint to sign credentials",
                                                        "example": "https://issuer.com/sign"
                                                    },
                                                    "token": {
                                                        "type": "string",
                                                        "description": "Token used for auth on the issuer endpoint",
                                                        "example": "abcd"
                                                    }
                                                },
                                                "required": ["did", "endpoint", "token"]
                                            }
                                        },
                                        "required": ["type", "storage", "encryption"]
                                    }
                                },
                                "required": ["metadata", "chain", "credentials"]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success. Refer to the standard create collection response for more details.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "Success. Refer to the standard nft create collection response for more details."
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "error": {
                                "examples": {
                                    "InvalidCustomType": {
                                        "description": "Invalid Custom type"
                                    },
                                    "ChainNotSupported": {
                                        "description": "Chain not supported"
                                    },
                                    "SFTsNotSupported": {
                                        "description": "SFTs not supported"
                                    },
                                    "CredentialsNotSupported": {
                                        "description": "Credentials not supported on this project"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1-alpha1/credentials/templates/{collectionId}/nfts/{id}/credentials": {
            "get": {
                "summary": "Get Credential by NFT ID",
                "description": "Get a verifiable credential by the ID associated with the minted NFT.\n\nThis ID will have the format: `<UUID>`. For example: `d7eb777b-e9b4-4f34-ab5f-ce199111166a`\n\n**API scope required** `credentials.read`. This endpoint will not work with a client side API key.\n",
                "operationId": "get-vc",
                "tags": ["Verifiable Credentials"],
                "parameters": [
                    {
                        "name": "collectionId",
                        "in": "path",
                        "description": "The credential's template id.",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "description": "UUID of the NFT returned in the NFT creation response. Format is: `<UUID>`.\n",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "description": "The credential object"
                                },
                                "example": {
                                    "$ref": "#/components/examples/Credential"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "error": "Credential not issued yet, wait for the mint to complete."
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "NFT not found"
                    }
                }
            }
        },
        "/v1-alpha1/credentials/{id}": {
            "get": {
                "summary": "Get Credential by Credential ID",
                "description": "Get a verifiable credential by the ID associated with it. \n\nThis ID will have the format: `urn:uuid:<UUID>`. For example: `urn:uuid:64f9877d-a19a-4205-8d61-f8c2abed5766`\n\n**API scope required** `credentials.read`. This enpoint will work also with a client side API key.\n",
                "operationId": "get-vc-by-id",
                "tags": ["Verifiable Credentials"],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Unique ID of the credential as returned in the Verifiable Credential NFT creation response. Format is: `urn:uuid:<UUID>`\n",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "description": "The credential object"
                                },
                                "example": {
                                    "$ref": "#/components/examples/Credential"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "error": {
                                "examples": {
                                    "NotIssuedYet": {
                                        "description": "Credential not issued yet, wait for the mint to complete."
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Credential not found"
                    }
                }
            },
            "delete": {
                "summary": "Revoke Credential",
                "description": "Revoke a verifiable credential by the credential ID. \nThis involves burning the associated nft.\n\nThis ID will have the format: `urn:uuid:<UUID>`. For example: `urn:uuid:64f9877d-a19a-4205-8d61-f8c2abed5766`\n\n**API scope required** `credentials.create`.\n",
                "operationId": "revoke-credential",
                "tags": ["Verifiable Credentials"],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Unique ID of the credential as returned in the NFT creation response. Format is: `urn:uuid:<UUID>`\n",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BurnNFTResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden"
                    },
                    "404": {
                        "description": "Credential not found"
                    },
                    "503": {
                        "description": "Please try again in a few minutes. If the issue still persists, contact Crossmint support."
                    }
                }
            }
        },
        "/v1-alpha1/nfts/{nftLocator}/credentials": {
            "get": {
                "summary": "Get Credential by NFT Locator",
                "description": "Get a verifiable credential by the NFT locator. \n\nThis locator will have the format: `<chain>:<contract_address>:<tokenId>`. \nFor example: `polygon:0x1234abcde...:1`\n\n**API scope required** `credentials.read`. This enpoint will work also with a client side API key.\n",
                "operationId": "get-vc-by-locator",
                "tags": ["Verifiable Credentials"],
                "parameters": [
                    {
                        "name": "nftLocator",
                        "in": "path",
                        "description": "NFT on chain locator, in the format of `<chain>:<contract_address>:<tokenId>`",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "description": "The credential object"
                                },
                                "example": {
                                    "$ref": "#/components/examples/Credential"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "error": {
                                "examples": {
                                    "NotIssuedYet": {
                                        "description": "Credential not issued yet, wait for the mint to complete."
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Nft not found"
                    }
                }
            }
        },
        "/v1-alpha1/wallets/{walletLocator}/credential_nfts": {
            "get": {
                "summary": "Get Credential NFTs",
                "description": "Get only the NFTs in a wallet associated with credentials.\n\nThis walletLocator will have the format: `<chain>:<wallet_address>`.\nFor example: `polygon:0x1234abcde...`\n\n**API scope required** `credentials.read`.\n",
                "operationId": "get-vc-by-locator",
                "tags": ["Verifiable Credentials"],
                "parameters": [
                    {
                        "name": "walletLocator",
                        "in": "path",
                        "description": "Wallet on chain locator, in the format of `<chain>:<wallet_address>`",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page index",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "default": "1"
                        }
                    },
                    {
                        "name": "perPage",
                        "in": "query",
                        "description": "Number of items to display per page",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "default": "10"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "description": "List of NFTs associated with credentials"
                                },
                                "example": {
                                    "$ref": "#/components/examples/CredentialNFTs"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "error": {
                                "examples": {
                                    "NotIssuedYet": {
                                        "description": "Credential not issued yet, wait for the mint to complete."
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Nft not found"
                    }
                }
            }
        },
        "/v1-alpha1/credentials/templates/{templateId}/vcs": {
            "post": {
                "summary": "Issue Credential",
                "description": "Issue a credential and deliver it to a wallet or email address.\n\n**API scope required** `credentials.create`\n",
                "operationId": "issue-vc",
                "tags": ["Verifiable Credentials"],
                "parameters": [
                    {
                        "name": "templateId",
                        "in": "path",
                        "description": "The credential template's id that the newly issued credential is related to.",
                        "required": true,
                        "example": "default",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                    "recipient": {
                                        "type": "string",
                                        "example": "polygon:0x1234abcde... or email:<email_address>:polygon",
                                        "description": "Recipient address in the format of `<chain>:<address>` or  `email:<email_address>:<chain>`."
                                    },
                                    "sendNotification": {
                                        "$ref": "#/components/schemas/SendNotification"
                                    },
                                    "locale": {
                                        "$ref": "#/components/schemas/Locale"
                                    },
                                    "metadata": {
                                        "type": "object",
                                        "description": "Descriptive information inherited, by default, from the credential's template.",
                                        "additionalProperties": false,
                                        "required": ["name"],
                                        "properties": {
                                            "name": {
                                                "type": "string",
                                                "description": "The name of your Verifiable Credential NFT (Max length: 32).",
                                                "example": "Crossmint Example Credential",
                                                "maxLength": 32
                                            },
                                            "image": {
                                                "type": "string",
                                                "description": "Direct link to your Verifiable Credential NFT image.",
                                                "example": "https://www.crossmint.com/assets/crossmint/logo.png"
                                            },
                                            "description": {
                                                "type": "string",
                                                "description": "A brief description of the Verifiable Credential NFT (Max length: 64).",
                                                "example": "My Verifiable Credential NFT created via the mint API!",
                                                "maxLength": 64
                                            },
                                            "attributes": {
                                                "type": "array",
                                                "description": "Add attributes to your Verifiable Credential NFT",
                                                "items": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "required": ["trait_type", "value"],
                                                    "properties": {
                                                        "display_type": {
                                                            "type": "string",
                                                            "description": "Display name of your attribute",
                                                            "enum": ["boost_number", "boost_percentage", "number"]
                                                        },
                                                        "trait_type": {
                                                            "type": "string",
                                                            "description": "The name of the trait"
                                                        },
                                                        "value": {
                                                            "type": "string",
                                                            "description": "The value of the trait"
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    },
                                    "credential": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                            "subject": {
                                                "type": "object",
                                                "description": "Object matching the collection type's schema populated with values relevant to the credential's recipient.",
                                                "example": {
                                                    "subjectName": "foo",
                                                    "subjectAge": 20,
                                                    "claim": "bar"
                                                }
                                            },
                                            "expiresAt": {
                                                "type": "string",
                                                "description": "The expiration date should be set in ISO 8601 format or as “none” to indicate no expiration. For example, an ISO 8601 date could be \"2030-12-31\"",
                                                "default": "2023-08-31T16:34:33.854Z"
                                            }
                                        },
                                        "required": ["subject", "expiresAt"]
                                    }
                                },
                                "required": ["recipient", "credential"]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "title": "Credential creation Response",
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "description": "Uniquely identifies the transaction in the system."
                                        },
                                        "onChain": {
                                            "type": "object",
                                            "description": "Information on the credential's current status on the blockchain, specifying its status on the specified network and related smart contract address.",
                                            "properties": {
                                                "status": {
                                                    "type": "string",
                                                    "description": "Current state of the credential on the blockchain (e.g., \"pending\")."
                                                },
                                                "chain": {
                                                    "type": "string",
                                                    "description": "Blockchain network where the credential is recorded (e.g., \"polygon\")"
                                                },
                                                "contractAddress": {
                                                    "type": "string",
                                                    "description": "Smart contract address on the specified blockchain (e.g., \"0x123456789\")."
                                                }
                                            }
                                        },
                                        "credentialId": {
                                            "type": "string",
                                            "description": "Key identifier for the credential itself, distinct from the transaction or record as a whole.",
                                            "example": "urn:uuid:credentialId"
                                        },
                                        "actionId": {
                                            "type": "string",
                                            "description": "Represents the action or transaction ID. In this context, it is the same as the primary id, indicating reference to the same overarching transaction or operation."
                                        }
                                    }
                                },
                                "examples": {
                                    "Pending": {
                                        "description": "EVM pending",
                                        "value": {
                                            "id": "1938b38c-3037-45dc-8033-333b7ebaee7",
                                            "onChain": {
                                                "status": "pending",
                                                "chain": "polygon",
                                                "contractAddress": "0x123456789"
                                            },
                                            "credentialId": "urn:uuid:40ada19e-3b4a-4de0-8d61-e0e7aedbfa0",
                                            "actionId": "1938b38c-3037-45dc-8033-333b7ebaee7"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "error": {
                                "examples": {
                                    "InvalidArguments": {
                                        "description": "Invalid arguments, please make sure you're following the api specification."
                                    },
                                    "CollectionUsupported": {
                                        "description": "Collection does not support credentials"
                                    },
                                    "ProjectUnsupported": {
                                        "description": "Project does not support credentials"
                                    },
                                    "InvalidSchema": {
                                        "description": "The provided subject schema does not match the collection type"
                                    },
                                    "InvalidDate": {
                                        "description": "Invalid expiration date format or date in the past"
                                    }
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden error, please ensure the credentials are correct."
                    },
                    "503": {
                        "description": "Please try again in a few minutes. If the issue still persists, please contact Crossmint support."
                    }
                }
            }
        },
        "/v1-alpha1/credentials/types": {
            "post": {
                "summary": "Create Credential Type",
                "description": "Create or import a credential type with a random UUID. This is how you define a custom credential schema.\n\n**API scope required** `credentials.create`\n",
                "operationId": "create-type",
                "tags": ["Verifiable Credentials"],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "anyOf": [
                                    {
                                        "title": "Create Type",
                                        "type": "object",
                                        "required": ["Create Type"],
                                        "properties": {
                                            "$schema": {
                                                "type": "string",
                                                "example": "https://json-schema.org/draft/2020-12/schema"
                                            },
                                            "title": {
                                                "type": "string",
                                                "example": "Course completion"
                                            },
                                            "description": {
                                                "type": "string",
                                                "example": "Describes the course completed and the assigned grade"
                                            },
                                            "type": {
                                                "type": "string",
                                                "example": "object"
                                            },
                                            "properties": {
                                                "type": "object",
                                                "properties": {
                                                    "credentialSubject": {
                                                        "type": "object",
                                                        "example": {
                                                            "type": "object",
                                                            "properties": {
                                                                "course": {
                                                                    "type": "string"
                                                                },
                                                                "grade": {
                                                                    "type": "string"
                                                                },
                                                                "id": {
                                                                    "type": "string"
                                                                }
                                                            },
                                                            "required": ["course", "grade"],
                                                            "additionalProperties": false
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    },
                                    {
                                        "title": "Import Type",
                                        "type": "object",
                                        "required": ["Import Type"],
                                        "properties": {
                                            "$id": {
                                                "type": "string",
                                                "description": "URL for importing an existing type.\"",
                                                "example": "https://raw.githubusercontent.com/decentralized-identity/credential-schemas/main/schemas/ExampleEntity/ExampleNameSchema.json"
                                            }
                                        }
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CreatedType"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "error": {
                                "examples": {
                                    "Recursion": {
                                        "description": "The type schema is recursive"
                                    },
                                    "UnusedDeclaration": {
                                        "description": "The type schema has unused declarations"
                                    },
                                    "UndefinedType": {
                                        "description": "The type schema references an undefined type"
                                    },
                                    "BaseTypeOverridden": {
                                        "description": "The type schema overrides a base type"
                                    },
                                    "MissingCredentialSubjectSchema": {
                                        "description": "The type schema is missing a credential subject schema"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1-alpha1/credentials/types/{typeName}": {
            "put": {
                "summary": "Create Credential Type with Name",
                "description": "Create or import a type with a given name. This is how you define a custom credential schema.\n\n**API scope required** `credentials.create`\n",
                "operationId": "create-type-idempotent",
                "parameters": [
                    {
                        "name": "typeName",
                        "in": "path",
                        "description": "The name of the type.",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "tags": ["Verifiable Credentials"],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "anyOf": [
                                    {
                                        "title": "Create Type",
                                        "type": "object",
                                        "required": ["Create Type"],
                                        "properties": {
                                            "$schema": {
                                                "type": "string",
                                                "example": "https://json-schema.org/draft/2020-12/schema"
                                            },
                                            "title": {
                                                "type": "string",
                                                "example": "Course completion"
                                            },
                                            "description": {
                                                "type": "string",
                                                "example": "Describes the course completed and the assigned grade"
                                            },
                                            "type": {
                                                "type": "string",
                                                "example": "object"
                                            },
                                            "properties": {
                                                "type": "object",
                                                "properties": {
                                                    "credentialSubject": {
                                                        "type": "object",
                                                        "example": {
                                                            "type": "object",
                                                            "properties": {
                                                                "course": {
                                                                    "type": "string"
                                                                },
                                                                "grade": {
                                                                    "type": "string"
                                                                },
                                                                "id": {
                                                                    "type": "string"
                                                                }
                                                            },
                                                            "required": ["course", "grade"],
                                                            "additionalProperties": false
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    },
                                    {
                                        "title": "Import Type",
                                        "type": "object",
                                        "required": ["Import Type"],
                                        "properties": {
                                            "$id": {
                                                "type": "string",
                                                "description": "URL for importing an existing type.\"",
                                                "example": "https://raw.githubusercontent.com/decentralized-identity/credential-schemas/main/schemas/ExampleEntity/ExampleNameSchema.json"
                                            }
                                        }
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CreatedType"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "error": {
                                "examples": {
                                    "Recursion": {
                                        "description": "The type schema is recursive"
                                    },
                                    "UnusedDeclaration": {
                                        "description": "The type schema has unused declarations"
                                    },
                                    "UndefinedType": {
                                        "description": "The type schema references an undefined type"
                                    },
                                    "BaseTypeOverridden": {
                                        "description": "The type schema overrides a base type"
                                    },
                                    "MissingCredentialSubjectSchema": {
                                        "description": "The type schema is missing a credential subject schema"
                                    },
                                    "AlreadyDefined": {
                                        "description": "A type with the given name already exists."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "summary": "Get a Credential Type",
                "description": "Get the schema of a given type by name (or id)\n        \n**API scope required** `credentials.read`\n",
                "operationId": "get-type",
                "tags": ["Verifiable Credentials"],
                "parameters": [
                    {
                        "name": "typeName",
                        "in": "path",
                        "description": "The name of the type or the type's id.",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CreatedType"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Type not found"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "apiKey": {
                "type": "apiKey",
                "in": "header",
                "name": "X-API-KEY",
                "description": "Key obtained from the Crossmint developer console, reflecting the API scope granted."
            }
        },
        "schemas": {
            "BurnNFTResponse": {
                "type": "object",
                "properties": {
                    "actionId": {
                        "type": "string",
                        "description": "Can be used to check the status via the [action status API](/api-reference/common/get-action-status)\n",
                        "example": "201520fc-e0eb-4698-a2f3-c6b50cc7c894"
                    },
                    "action": {
                        "type": "string",
                        "description": "The action performed, in this case `nfts.delete`",
                        "example": "nfts.delete"
                    },
                    "status": {
                        "type": "string",
                        "description": "Current status of the async operation. One of `pending` or `succeeded`",
                        "example": "pending OR succeeded"
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "chain": {
                                "type": "string",
                                "description": "Refer to the [supported chains](/introduction/supported-chains) page for more info",
                                "example": "polygon"
                            },
                            "txId": {
                                "type": "string",
                                "description": "The onchain transaction ID related to the request. \n\nThis is only present when status is `succeeded`\n",
                                "example": "succeeded status ONLY - 0x69cf6d971e6745f25f683db9c87663839be02bdaa4a70f0724f490d7335b0081"
                            },
                            "collection": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "The Crossmint identifier for the collection. Either a UUID or custom string depending on how you create the collection.",
                                        "example": "default-polygon"
                                    },
                                    "contractAddress": {
                                        "type": "string",
                                        "description": "The onchain contract address for the given collection.",
                                        "example": "0x67a602CBb306b3DBaaC7ECf55b72EED0E04Dc785"
                                    }
                                }
                            },
                            "token": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "The Crossmint identifier for the NFT. This will be a UUID.",
                                        "example": "799a6f68-e2ea-4126-8577-4298dfcf900c"
                                    },
                                    "tokenId": {
                                        "type": "string",
                                        "description": "The numeric tokenId of the NFT in the contract.",
                                        "example": "7"
                                    }
                                }
                            }
                        }
                    },
                    "startedAt": {
                        "type": "string",
                        "format": "date-time",
                        "description": "The time this operation was initiated in UTC.",
                        "example": "2024-01-10T23:01:45.000Z"
                    },
                    "completedAt": {
                        "type": "string",
                        "format": "date-time",
                        "description": "The time this operation completed in UTC.\n\nThis is only present when `status` is `succeeded`\n",
                        "example": "succeeded status ONLY - 2024-01-10T23:02:00.000Z"
                    },
                    "resource": {
                        "type": "string",
                        "description": "The URL path to obtain current status with [action status api](/api-reference/common/get-action-status)",
                        "example": "https://staging.crossmint.com/api/2022-06-09/collections/default-polygon/nfts/201520fc-e0eb-4698-a2f3-c6b50cc7c894"
                    }
                }
            },
            "SendNotification": {
                "type": "boolean",
                "description": "Notify recipient via email notification about successful mint [Default: true]. For legacy projects created before Sep 16, 2024, this is set to false by default."
            },
            "Locale": {
                "type": "string",
                "example": "en-US",
                "description": "Specify the locale for the email content [Default: en-US]"
            },
            "CreatedType": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "example": "crossmint:bfb292e7-2700-4924-9213-478f3d71f2d8:CourseCompletionCertificate"
                    },
                    "typeSchema": {
                        "type": "object",
                        "properties": {
                            "$schema": {
                                "type": "string",
                                "example": "https://json-schema.org/draft/2020-12/schema"
                            },
                            "title": {
                                "type": "string",
                                "example": "Course completion"
                            },
                            "description": {
                                "type": "string",
                                "example": "Describes the course completed and the assigned grade"
                            },
                            "type": {
                                "type": "string",
                                "example": "object"
                            },
                            "properties": {
                                "type": "object",
                                "properties": {
                                    "credentialSubject": {
                                        "type": "object",
                                        "example": {
                                            "type": "object",
                                            "properties": {
                                                "course": {
                                                    "type": "string"
                                                },
                                                "grade": {
                                                    "type": "string"
                                                },
                                                "id": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": ["course", "grade"],
                                            "additionalProperties": false
                                        }
                                    }
                                }
                            },
                            "$id": {
                                "type": "string",
                                "example": "https://staging.crossmint.com/api/v1-alpha1/credentials/types/crossmint:bfb292e7-2700-4924-9213-478f3d71f2d8:CourseCompletionCertificate"
                            }
                        }
                    }
                }
            }
        },
        "examples": {
            "Credential": {
                "value": {
                    "id": "<CREDENTIAL_ID>",
                    "credentialSubject": {
                        "id": "0xSUBJECT_ADDRESS",
                        "...additional fields": "..."
                    },
                    "nft": {
                        "tokenId": "<tokenId>",
                        "chain": "polygon",
                        "contractAddress": "<collection_contract_address>"
                    },
                    "expirationDate": "2234-12-12",
                    "@context": [
                        "https://www.w3.org/2018/credentials/v1",
                        "https://github.com/haardikk21/ethereum-eip712-signature-2021-spec/blob/main/index.html"
                    ],
                    "issuer": {
                        "id": "did:0xISSUER_ADDRESS"
                    },
                    "type": ["VerifiableCredential", "64f0c05641a512c86786fd3b"],
                    "issuanceDate": "2023-08-31T16:34:33.854Z",
                    "proof": {
                        "proofValue": "ProofValue",
                        "...additional required fields": "..."
                    }
                }
            },
            "CredentialNFTs": {
                "value": [
                    {
                        "chain": "<string>",
                        "contractAddress": "<string>",
                        "tokenId": "<string>",
                        "metadata": {
                            "attributes": [],
                            "collection": {},
                            "description": "<string>",
                            "image": "<string>",
                            "name": "<string>"
                        },
                        "locator": "<string>",
                        "tokenStandard": "<string>"
                    }
                ]
            }
        }
    }
}
