Description
This endpoint allows you to issue a new credential to a recipient within a specific credential group. The credential is immediately published.
Legacy endpoint: POST /v1/credential/issue is also supported for backward compatibility.
Bearer YOUR_API_TOKEN — obtainable from Hyperstack Dashboard → Settings → API Access
Body Parameters
Information about the recipient of the credential.
Full name of the recipient.
Email address of the recipient.
The unique key of the credential group in which this credential will be issued.
Key-value pairs of custom attributes to embed in the credential. Keys must match the custom fields (prefixed with custom_) configured for your account.
Success Response Fields
Indicates whether the credential was successfully issued.
The unique ID of the newly created credential.
URL to view the newly created credential.
Publication status of the credential. Will be "published" for this endpoint.
Object containing name and email of the recipient.
Object containing title, key, and code of the credential group.
ISO 8601 timestamp of when the credential was issued.
ISO 8601 expiry timestamp. null if the credential does not expire.
Custom attribute values stored with the credential.
Visibility of the credential — "public" or "private".
Responses
200 Success
400 Bad Request
402 Payment Required
404 Not Found
409 Conflict
401 Unauthorized
{
"success" : true ,
"status" : "published" ,
"document_id" : "j4nDvaxF6ehodPXI84p4X1yhQe7lrYgx" ,
"document_url" : "https://hyperstack.id/credential/j4nDvaxF6ehodPXI84p4X1yhQe7lrYgx" ,
"recipient" : { "name" : "John Doe" , "email" : "[email protected] " },
"group" : { "title" : "Cloud Certification" , "key" : "GcI6H5b66a3v" , "code" : "CC-2024" },
"issued_on" : "2024-03-15T10:30:00Z" ,
"valid_until" : null ,
"metadata" : { "custom_location" : "Mars" },
"privacy" : "public"
}
curl -X POST "https://api.thehyperstack.com/v1/credentials/new" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"recipient": {
"name": "John Doe",
"email": "[email protected] "
},
"group_key": "GcI6H5b66a3v",
"custom_attributes": {
"custom_date": "2035",
"custom_location": "Mars"
}
}'