Publish Credential
curl --request POST \
--url https://api.thehyperstack.com/v1/credential/{document_id}/publish \
--header 'Authorization: <authorization>'import requests
url = "https://api.thehyperstack.com/v1/credential/{document_id}/publish"
headers = {"Authorization": "<authorization>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<authorization>'}};
fetch('https://api.thehyperstack.com/v1/credential/{document_id}/publish', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.thehyperstack.com/v1/credential/{document_id}/publish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.thehyperstack.com/v1/credential/{document_id}/publish"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.thehyperstack.com/v1/credential/{document_id}/publish")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.thehyperstack.com/v1/credential/{document_id}/publish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Credential published successfully"
}
{
"success": false,
"error": "Credential is not in draft status",
"error_code": "invalid_status"
}
{
"success": false,
"error": "Document does not exists in your account"
}
{
"detail": "Invalid token or organization not found"
}
Credentials
Publish Credential
POST
/
v1
/
credential
/
{document_id}
/
publish
Publish Credential
curl --request POST \
--url https://api.thehyperstack.com/v1/credential/{document_id}/publish \
--header 'Authorization: <authorization>'import requests
url = "https://api.thehyperstack.com/v1/credential/{document_id}/publish"
headers = {"Authorization": "<authorization>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<authorization>'}};
fetch('https://api.thehyperstack.com/v1/credential/{document_id}/publish', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.thehyperstack.com/v1/credential/{document_id}/publish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.thehyperstack.com/v1/credential/{document_id}/publish"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.thehyperstack.com/v1/credential/{document_id}/publish")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.thehyperstack.com/v1/credential/{document_id}/publish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Credential published successfully"
}
{
"success": false,
"error": "Credential is not in draft status",
"error_code": "invalid_status"
}
{
"success": false,
"error": "Document does not exists in your account"
}
{
"detail": "Invalid token or organization not found"
}
Description
Publishes a draft credential made with Generate Credential. Publishing runs in the background and takes a few seconds. When it is done, the recipient gets an email (unless the group’s notifications are off), and Hyperstack sends acredential.issued webhook if you subscribed to one. Publishing may use a credit. A recipient already covered by a credit uses none.
Headers
Your API key:
Bearer YOUR_API_KEY. Create a key in the Studio under Settings → Developers.Path Parameters
Success Response Fields
Always
"Credential published successfully". To see when the credential is live, call View Credential and look for the status active.Responses
{
"success": true,
"message": "Credential published successfully"
}
{
"success": false,
"error": "Credential is not in draft status",
"error_code": "invalid_status"
}
{
"success": false,
"error": "Document does not exists in your account"
}
{
"detail": "Invalid token or organization not found"
}
curl -X POST "https://api.thehyperstack.com/v1/credential/6f1c2a8e-3b4d-4e5f-9a7b-1c2d3e4f5a6b/publish" \
-H "Authorization: Bearer YOUR_API_KEY"
Last modified on October 20, 2026
Was this page helpful?

