Credentials

Create a credential

Use this endpoint to create a new credential. The credential will be created with status draft.

As the next step, use the Issue Credential endpoint to issue a draft credential, making it active and accessible in the digital wallet.

If you are looking for an all-in-one solution that simultaneously creates, issues, and sends a credential, check the Create, Issue and Send a Credential endpoint.

post/v1/credentials

Headers

Certifier-Versionstring required

API version header. Required for all requests.

Example:2022-10-26

API version header. Required for all requests.

Request body

groupIdstring required

The group's (credential template's) ID you want to issue the credential to. Check the Group (Credential Template) object.

issueDatestring

The date of your credential's issuance (by default is set to today, only YYYY-MM-DD format is allowed)

expiryDatestring

The date of your credential's expiration (by default uses the settings configured on the group (credential template), only YYYY-MM-DD format is allowed)

customAttributesobject

The key-value object of your custom attributes, where key is your attribute's tag and value is the text value you want to store

Example request

{
  "groupId": "01g90279gp5sbmfek7wymcsvec",
  "recipient": {
    "name": "John Doe",
    "email": "john.doe@example.com"
  },
  "issueDate": "2022-01-01",
  "expiryDate": "2023-01-01",
  "customAttributes": {
    "custom.mentor": "Jane Doe"
  }
}

Response

Credential created successfully

idstring required

The unique credential's identifier

publicIdstring uuid required

The external unique credential's identifier (used in the digital wallet to generate a URL, e.g. https://credsverse.com/credentials/{publicId})

groupIdstring required

The unique identifier of the group (credential template).

status'draft' | 'scheduled' | 'issued' | 'expired' required

The status of the credential

issueDatestring required

The date of your credential's issuance. Formatted as an ISO 8601 date string (YYYY-MM-DD)

expiryDatestring nullable required

The date of your credential's expiration. Formatted as an ISO 8601 date string (YYYY-MM-DD)

attributesobject required

The key-value object of the credential's attributes. Currently this can only be the recipient.name, configured on a per-credential basis

customAttributesobject required

The key-value object of your custom attributes, where key is your attribute's tag and value is the text value you want to store

createdAtstring date-time required

The date and time when this credential was created. Formatted as an ISO 8601 date and time string

updatedAtstring date-time required

The date and time when this credential was updated. Formatted as an ISO 8601 date and time string

Example response

{
  "id": "01hz2f0c9ryvzajg20jqh9taab",
  "publicId": "124a8110-1af5-4747-9308-e9d06bd1852a",
  "groupId": "01g90279gp5sbmfek7wymcsvec",
  "status": "draft",
  "recipient": {
    "id": "01jmerb62apgachxwx6db76c7s",
    "name": "John Doe",
    "email": "john.doe@example.com"
  },
  "issueDate": "2022-01-01",
  "expiryDate": "2023-01-01",
  "attributes": {
    "recipient.name": "John Doe"
  },
  "customAttributes": {
    "custom.mentor": "Jane Doe"
  },
  "createdAt": "2022-01-01T00:00:00.000Z",
  "updatedAt": "2022-01-01T00:00:00.000Z"
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.