Credentials

Create a credential

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

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

Authorization

BearerAuth
AuthorizationBearer <token>

Provide your access token in the Authorization header with Bearer auth-scheme. You can view and manage your access tokens in the Certifier Dashboard.

In: header

Header Parameters

Certifier-Version*string

API version header. Required for all requests.

Request Body

application/json

groupId*string

The group's ID you want to issue the credential to. Check the Group object

recipient*

The recipient of the credential

issueDate?string

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

expiryDate?string

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

customAttributes?

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

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.certifier.io/v1/credentials" \  -H "Certifier-Version: 2022-10-26" \  -H "Content-Type: application/json" \  -d '{    "groupId": "01g90279gp5sbmfek7wymcsvec",    "recipient": {      "name": "John Doe"    }  }'
{
  "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"
}

{
  "error": {
    "code": "missing_version",
    "message": "The request is missing the required Certifier-Version header"
  }
}

{
  "error": {
    "code": "unauthorized",
    "message": "A valid authentication token was not provided with the request"
  }
}
{
  "error": {
    "code": "payment_required",
    "message": "The requested feature is only available to premium organizations"
  }
}
{
  "error": {
    "code": "not_found",
    "message": "The requested resource does not exist"
  }
}
{
  "error": {
    "code": "rate_limited",
    "message": "You have exceeded the rate limit"
  }
}
{
  "error": {
    "code": "internal_server_error",
    "message": "There was a problem on Certifier's end"
  }
}