> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crossmint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Issue Credential

> Issue a credential and deliver it to a wallet or email address.

**API scope required** `credentials.create`


<Snippet file="alpha-api-note.mdx" />


## OpenAPI

````yaml post /v1-alpha1/credentials/templates/{templateId}/vcs
openapi: 3.0.1
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
servers:
  - url: https://staging.crossmint.com/api
    description: Staging environment (testnets)
  - url: https://www.crossmint.com/api
    description: Production environment (mainnets)
security:
  - apiKey: []
paths:
  /v1-alpha1/credentials/templates/{templateId}/vcs:
    post:
      tags:
        - Verifiable Credentials
      summary: Issue Credential
      description: |
        Issue a credential and deliver it to a wallet or email address.

        **API scope required** `credentials.create`
      operationId: issue-vc
      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 Verifiable Credential NFT
                      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.
components:
  schemas:
    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]'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        Key obtained from the Crossmint developer console, reflecting the API
        scope granted.

````