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

# Issue Credential

> Issues a credential and returns it in the response body.



## OpenAPI

````yaml /openapi.json post /credentials/issue
openapi: 3.0.0
info:
  title: Trust Stack API
  description: Programmatic access to the Trust Stack API.
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /credentials/issue:
    post:
      tags:
        - Credentials
      summary: Issue Credential
      description: Issues a credential and returns it in the response body.
      operationId: issueCredential
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IssueCredentialRequest'
      responses:
        '201':
          description: Credential successfully issued!
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssueCredentialResponse'
        '400':
          description: Invalid request
components:
  schemas:
    IssueCredentialRequest:
      type: object
      properties: {}
    IssueCredentialResponse:
      type: object
      properties:
        credential:
          description: Credential issued.
          allOf:
            - $ref: '#/components/schemas/Credential'
      required:
        - credential
    Credential:
      type: object
      properties:
        '@context':
          description: The JSON-LD context of the credential.
          example:
            - https://www.w3.org/2018/credentials/v1
            - https://www.w3.org/2018/credentials/examples/v1
          type: array
          items:
            type: string
        id:
          type: string
          description: The ID of the credential.
          example: http://example.gov/credentials/3732
        type:
          description: The JSON-LD type of the credential.
          example:
            - VerifiableCredential
            - UniversityDegreeCredential
          type: array
          items:
            type: string
        issuer:
          type: string
          description: The issuer of the credential.
          example: did:example:123
        issuanceDate:
          type: string
          description: The issuance date of the credential.
          example: '2020-03-16T22:37:26.544Z'
        expirationDate:
          type: string
          description: The expiration date of the credential.
          example: '2021-03-16T22:37:26.544Z'
        credentialSubject:
          type: object
          description: The subject of the credential.
          example:
            id: did:example:123
            degree:
              type: BachelorDegree
              name: Bachelor of Science and Arts
      description: A JSON-LD Verifiable Credential without a proof.
      required:
        - '@context'
        - id
        - type
        - issuer
        - issuanceDate
        - expirationDate
        - credentialSubject

````