Create badge definition
curl --request POST \
--url https://api.hixbe.com/certify/badges \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Xerobi-Version: <xerobi-version>' \
--data '
{
"name": "Certified Expert",
"image_url": "https://example.com/badges/expert-badge.png",
"criteria": "Successfully complete advanced certification exam with 90% or higher score"
}
'import requests
url = "https://api.hixbe.com/certify/badges"
payload = {
"name": "Certified Expert",
"image_url": "https://example.com/badges/expert-badge.png",
"criteria": "Successfully complete advanced certification exam with 90% or higher score"
}
headers = {
"Xerobi-Version": "<xerobi-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Xerobi-Version': '<xerobi-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Certified Expert',
image_url: 'https://example.com/badges/expert-badge.png',
criteria: 'Successfully complete advanced certification exam with 90% or higher score'
})
};
fetch('https://api.hixbe.com/certify/badges', 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.hixbe.com/certify/badges",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Certified Expert',
'image_url' => 'https://example.com/badges/expert-badge.png',
'criteria' => 'Successfully complete advanced certification exam with 90% or higher score'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Xerobi-Version: <xerobi-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hixbe.com/certify/badges"
payload := strings.NewReader("{\n \"name\": \"Certified Expert\",\n \"image_url\": \"https://example.com/badges/expert-badge.png\",\n \"criteria\": \"Successfully complete advanced certification exam with 90% or higher score\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Xerobi-Version", "<xerobi-version>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.hixbe.com/certify/badges")
.header("Xerobi-Version", "<xerobi-version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Certified Expert\",\n \"image_url\": \"https://example.com/badges/expert-badge.png\",\n \"criteria\": \"Successfully complete advanced certification exam with 90% or higher score\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hixbe.com/certify/badges")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Xerobi-Version"] = '<xerobi-version>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Certified Expert\",\n \"image_url\": \"https://example.com/badges/expert-badge.png\",\n \"criteria\": \"Successfully complete advanced certification exam with 90% or higher score\"\n}"
response = http.request(request)
puts response.read_body{
"id": "badge_1234567890abcdef",
"name": "Certified Expert"
}{
"error": "invalid_request",
"message": "The credential ID provided is invalid",
"code": "INVALID_CREDENTIAL_ID"
}{
"error": "invalid_request",
"message": "The credential ID provided is invalid",
"code": "INVALID_CREDENTIAL_ID"
}{
"error": "invalid_request",
"message": "The credential ID provided is invalid",
"code": "INVALID_CREDENTIAL_ID"
}{
"error": "invalid_request",
"message": "The credential ID provided is invalid",
"code": "INVALID_CREDENTIAL_ID"
}Create Badge
POST
/
badges
Create badge definition
curl --request POST \
--url https://api.hixbe.com/certify/badges \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Xerobi-Version: <xerobi-version>' \
--data '
{
"name": "Certified Expert",
"image_url": "https://example.com/badges/expert-badge.png",
"criteria": "Successfully complete advanced certification exam with 90% or higher score"
}
'import requests
url = "https://api.hixbe.com/certify/badges"
payload = {
"name": "Certified Expert",
"image_url": "https://example.com/badges/expert-badge.png",
"criteria": "Successfully complete advanced certification exam with 90% or higher score"
}
headers = {
"Xerobi-Version": "<xerobi-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Xerobi-Version': '<xerobi-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Certified Expert',
image_url: 'https://example.com/badges/expert-badge.png',
criteria: 'Successfully complete advanced certification exam with 90% or higher score'
})
};
fetch('https://api.hixbe.com/certify/badges', 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.hixbe.com/certify/badges",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Certified Expert',
'image_url' => 'https://example.com/badges/expert-badge.png',
'criteria' => 'Successfully complete advanced certification exam with 90% or higher score'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Xerobi-Version: <xerobi-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hixbe.com/certify/badges"
payload := strings.NewReader("{\n \"name\": \"Certified Expert\",\n \"image_url\": \"https://example.com/badges/expert-badge.png\",\n \"criteria\": \"Successfully complete advanced certification exam with 90% or higher score\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Xerobi-Version", "<xerobi-version>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.hixbe.com/certify/badges")
.header("Xerobi-Version", "<xerobi-version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Certified Expert\",\n \"image_url\": \"https://example.com/badges/expert-badge.png\",\n \"criteria\": \"Successfully complete advanced certification exam with 90% or higher score\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hixbe.com/certify/badges")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Xerobi-Version"] = '<xerobi-version>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Certified Expert\",\n \"image_url\": \"https://example.com/badges/expert-badge.png\",\n \"criteria\": \"Successfully complete advanced certification exam with 90% or higher score\"\n}"
response = http.request(request)
puts response.read_body{
"id": "badge_1234567890abcdef",
"name": "Certified Expert"
}{
"error": "invalid_request",
"message": "The credential ID provided is invalid",
"code": "INVALID_CREDENTIAL_ID"
}{
"error": "invalid_request",
"message": "The credential ID provided is invalid",
"code": "INVALID_CREDENTIAL_ID"
}{
"error": "invalid_request",
"message": "The credential ID provided is invalid",
"code": "INVALID_CREDENTIAL_ID"
}{
"error": "invalid_request",
"message": "The credential ID provided is invalid",
"code": "INVALID_CREDENTIAL_ID"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
API version in YYYY-MM-DD format
Example:
"2026-01-01"
Body
application/json
Request payload for creating a new badge definition
Display name for the badge
Example:
"Certified Expert"
URL to the badge image
Example:
"https://example.com/badges/expert-badge.png"
Description of how to earn this badge
Example:
"Successfully complete advanced certification exam with 90% or higher score"