POST
/
unstable
/
credentials
/
types
curl --request POST \
  --url https://staging.crossmint.com/api/unstable/credentials/types \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "Class": [
    {
      "name": "name",
      "type": "string"
    },
    {
      "name": "teacher",
      "type": "string"
    }
  ],
  "Course": [
    {
      "name": "name",
      "type": "string"
    },
    {
      "name": "grades",
      "type": "uint64[]"
    },
    {
      "name": "class",
      "type": "Class"
    }
  ],
  "credentialSubjectSchema": [
    {
      "name": "username",
      "type": "string"
    },
    {
      "name": "courses_completed",
      "type": "uint64"
    },
    {
      "name": "courses",
      "type": "Course[]"
    }
  ]
}'
{
  "id": "64f0c05641a512c86786fd3b"
}

This is an alpha API and subject to change.

Authorizations

X-API-KEY
string
headerrequired

Obtained in the Crossmint developer console

Body

application/json
credentialSubjectSchema
object[]
required
nestedTypeSchema
object[]

Response

200 - application/json
id
string

The type id