Skip to main content
PUT
/
v1-alpha1
/
credentials
/
types
/
{typeName}
Create Credential Type with Name
curl --request PUT \
  --url https://staging.crossmint.com/api/v1-alpha1/credentials/types/{typeName} \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Course completion",
  "description": "Describes the course completed and the assigned grade",
  "type": "object",
  "properties": {
    "credentialSubject": {
      "type": "object",
      "properties": {
        "course": {
          "type": "string"
        },
        "grade": {
          "type": "string"
        },
        "id": {
          "type": "string"
        }
      },
      "required": [
        "course",
        "grade"
      ],
      "additionalProperties": false
    }
  }
}
'
{
"id": "crossmint:bfb292e7-2700-4924-9213-478f3d71f2d8:CourseCompletionCertificate",
"typeSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Course completion",
"description": "Describes the course completed and the assigned grade",
"type": "object",
"properties": {
"credentialSubject": {
"type": "object",
"properties": {
"course": {
"type": "string"
},
"grade": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"course",
"grade"
],
"additionalProperties": false
}
},
"$id": "https://staging.crossmint.com/api/v1-alpha1/credentials/types/crossmint:bfb292e7-2700-4924-9213-478f3d71f2d8:CourseCompletionCertificate"
}
}
This is an alpha API and subject to change.

Authorizations

X-API-KEY
string
header
required

Key obtained from the Crossmint developer console, reflecting the API scope granted.

Path Parameters

typeName
string
required

The name of the type.

Body

application/json
$schema
string
Example:

"https://json-schema.org/draft/2020-12/schema"

title
string
Example:

"Course completion"

description
string
Example:

"Describes the course completed and the assigned grade"

type
string
Example:

"object"

properties
object

Response

Success.

id
string
Example:

"crossmint:bfb292e7-2700-4924-9213-478f3d71f2d8:CourseCompletionCertificate"

typeSchema
object