Credential Event
curl --request POST \
--url https://api.example.com/_webhooks/credential \
--header 'Content-Type: application/json' \
--data '
{
"eventType": "credential",
"requestId": "<string>",
"issuerDid": "<string>",
"user": {
"contact": "<string>",
"id": "<string>",
"internalId": "<string>"
},
"api_version": "<string>",
"credential": {
"id": "urn:via:credential:550e8400-e29b-41d4-a716-446655440000",
"resourceType": "DOCUMENT",
"status": "DRAFT",
"w3cCredential": {
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://via.humanos.dev/ns/v1"
],
"id": "urn:via:credential:550e8400-e29b-41d4-a716-446655440000",
"type": [
"VerifiableCredential",
"VIAMandate"
],
"issuer": "did:web:humanos.tech",
"validFrom": "2025-01-01T00:00:00Z",
"validUntil": null,
"credentialSubject": {
"id": "did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000",
"mandate": {
"grantor": "did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7",
"scope": "humanos.credential.request",
"context": {
"authorizedDIDs": [
"did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000",
"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7"
]
}
}
},
"evidences": [
{
"id": "urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34",
"digestSRI": "sha256-abc123",
"location": "https://api.humanos.dev/credential/evidence/urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34"
}
],
"proofs": [
{
"type": "DataIntegrityProof",
"cryptosuite": "eddsa-jcs-2022",
"verificationMethod": "did:web:example.com#key-1",
"created": "2026-05-02T10:15:30.000Z",
"proofPurpose": "assertionMethod",
"proofValue": "z2pcVdSdoMTrkYP9rVdz...",
"action": "ISSUE",
"actionProof": "sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def456..."
},
{
"type": "DataIntegrityProof",
"cryptosuite": "eddsa-jcs-2022",
"verificationMethod": "did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7#key-1",
"created": "2026-05-02T10:15:30.000Z",
"proofPurpose": "assertionMethod",
"proofValue": "z2pcVdSdoMTrkTCXzp...",
"action": "ACCEPT",
"actionProof": "sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def457..."
},
{
"type": "DataIntegrityProof",
"cryptosuite": "eddsa-jcs-2022",
"verificationMethod": "did:web:humanos.tech#key-1",
"created": "2026-05-02T10:15:30.000Z",
"proofPurpose": "assertionMethod",
"proofValue": "z2pcVdSdoMTrkTRrXdz...",
"action": "STAMP",
"actionProof": "sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def458..."
}
]
},
"decisions": [
{
"id": "did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7",
"contact": "grantor@example.com",
"accepted": true,
"decidedAt": "2025-06-01T12:00:00.000Z"
}
],
"name": "Credential Name",
"description": "Document to be requested on onboarding",
"internalId": "internal-12345",
"tags": [
"onboarding",
"kyc"
]
},
"decision": {
"date": "2023-11-07T05:31:56Z"
},
"internalId": "<string>"
}
'import requests
url = "https://api.example.com/_webhooks/credential"
payload = {
"eventType": "credential",
"requestId": "<string>",
"issuerDid": "<string>",
"user": {
"contact": "<string>",
"id": "<string>",
"internalId": "<string>"
},
"api_version": "<string>",
"credential": {
"id": "urn:via:credential:550e8400-e29b-41d4-a716-446655440000",
"resourceType": "DOCUMENT",
"status": "DRAFT",
"w3cCredential": {
"@context": ["https://www.w3.org/ns/credentials/v2", "https://via.humanos.dev/ns/v1"],
"id": "urn:via:credential:550e8400-e29b-41d4-a716-446655440000",
"type": ["VerifiableCredential", "VIAMandate"],
"issuer": "did:web:humanos.tech",
"validFrom": "2025-01-01T00:00:00Z",
"validUntil": None,
"credentialSubject": {
"id": "did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000",
"mandate": {
"grantor": "did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7",
"scope": "humanos.credential.request",
"context": { "authorizedDIDs": ["did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000", "did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7"] }
}
},
"evidences": [
{
"id": "urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34",
"digestSRI": "sha256-abc123",
"location": "https://api.humanos.dev/credential/evidence/urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34"
}
],
"proofs": [
{
"type": "DataIntegrityProof",
"cryptosuite": "eddsa-jcs-2022",
"verificationMethod": "did:web:example.com#key-1",
"created": "2026-05-02T10:15:30.000Z",
"proofPurpose": "assertionMethod",
"proofValue": "z2pcVdSdoMTrkYP9rVdz...",
"action": "ISSUE",
"actionProof": "sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def456..."
},
{
"type": "DataIntegrityProof",
"cryptosuite": "eddsa-jcs-2022",
"verificationMethod": "did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7#key-1",
"created": "2026-05-02T10:15:30.000Z",
"proofPurpose": "assertionMethod",
"proofValue": "z2pcVdSdoMTrkTCXzp...",
"action": "ACCEPT",
"actionProof": "sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def457..."
},
{
"type": "DataIntegrityProof",
"cryptosuite": "eddsa-jcs-2022",
"verificationMethod": "did:web:humanos.tech#key-1",
"created": "2026-05-02T10:15:30.000Z",
"proofPurpose": "assertionMethod",
"proofValue": "z2pcVdSdoMTrkTRrXdz...",
"action": "STAMP",
"actionProof": "sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def458..."
}
]
},
"decisions": [
{
"id": "did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7",
"contact": "grantor@example.com",
"accepted": True,
"decidedAt": "2025-06-01T12:00:00.000Z"
}
],
"name": "Credential Name",
"description": "Document to be requested on onboarding",
"internalId": "internal-12345",
"tags": ["onboarding", "kyc"]
},
"decision": { "date": "2023-11-07T05:31:56Z" },
"internalId": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
eventType: 'credential',
requestId: '<string>',
issuerDid: '<string>',
user: {contact: '<string>', id: '<string>', internalId: '<string>'},
api_version: '<string>',
credential: {
id: 'urn:via:credential:550e8400-e29b-41d4-a716-446655440000',
resourceType: 'DOCUMENT',
status: 'DRAFT',
w3cCredential: {
'@context': ['https://www.w3.org/ns/credentials/v2', 'https://via.humanos.dev/ns/v1'],
id: 'urn:via:credential:550e8400-e29b-41d4-a716-446655440000',
type: ['VerifiableCredential', 'VIAMandate'],
issuer: 'did:web:humanos.tech',
validFrom: '2025-01-01T00:00:00Z',
validUntil: null,
credentialSubject: {
id: 'did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000',
mandate: {
grantor: 'did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7',
scope: 'humanos.credential.request',
context: {
authorizedDIDs: [
'did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000',
'did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7'
]
}
}
},
evidences: [
{
id: 'urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34',
digestSRI: 'sha256-abc123',
location: 'https://api.humanos.dev/credential/evidence/urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34'
}
],
proofs: [
{
type: 'DataIntegrityProof',
cryptosuite: 'eddsa-jcs-2022',
verificationMethod: 'did:web:example.com#key-1',
created: '2026-05-02T10:15:30.000Z',
proofPurpose: 'assertionMethod',
proofValue: 'z2pcVdSdoMTrkYP9rVdz...',
action: 'ISSUE',
actionProof: 'sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def456...'
},
{
type: 'DataIntegrityProof',
cryptosuite: 'eddsa-jcs-2022',
verificationMethod: 'did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7#key-1',
created: '2026-05-02T10:15:30.000Z',
proofPurpose: 'assertionMethod',
proofValue: 'z2pcVdSdoMTrkTCXzp...',
action: 'ACCEPT',
actionProof: 'sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def457...'
},
{
type: 'DataIntegrityProof',
cryptosuite: 'eddsa-jcs-2022',
verificationMethod: 'did:web:humanos.tech#key-1',
created: '2026-05-02T10:15:30.000Z',
proofPurpose: 'assertionMethod',
proofValue: 'z2pcVdSdoMTrkTRrXdz...',
action: 'STAMP',
actionProof: 'sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def458...'
}
]
},
decisions: [
{
id: 'did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7',
contact: 'grantor@example.com',
accepted: true,
decidedAt: '2025-06-01T12:00:00.000Z'
}
],
name: 'Credential Name',
description: 'Document to be requested on onboarding',
internalId: 'internal-12345',
tags: ['onboarding', 'kyc']
},
decision: {date: '2023-11-07T05:31:56Z'},
internalId: '<string>'
})
};
fetch('https://api.example.com/_webhooks/credential', 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.example.com/_webhooks/credential",
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([
'eventType' => 'credential',
'requestId' => '<string>',
'issuerDid' => '<string>',
'user' => [
'contact' => '<string>',
'id' => '<string>',
'internalId' => '<string>'
],
'api_version' => '<string>',
'credential' => [
'id' => 'urn:via:credential:550e8400-e29b-41d4-a716-446655440000',
'resourceType' => 'DOCUMENT',
'status' => 'DRAFT',
'w3cCredential' => [
'@context' => [
'https://www.w3.org/ns/credentials/v2',
'https://via.humanos.dev/ns/v1'
],
'id' => 'urn:via:credential:550e8400-e29b-41d4-a716-446655440000',
'type' => [
'VerifiableCredential',
'VIAMandate'
],
'issuer' => 'did:web:humanos.tech',
'validFrom' => '2025-01-01T00:00:00Z',
'validUntil' => null,
'credentialSubject' => [
'id' => 'did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000',
'mandate' => [
'grantor' => 'did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7',
'scope' => 'humanos.credential.request',
'context' => [
'authorizedDIDs' => [
'did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000',
'did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7'
]
]
]
],
'evidences' => [
[
'id' => 'urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34',
'digestSRI' => 'sha256-abc123',
'location' => 'https://api.humanos.dev/credential/evidence/urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34'
]
],
'proofs' => [
[
'type' => 'DataIntegrityProof',
'cryptosuite' => 'eddsa-jcs-2022',
'verificationMethod' => 'did:web:example.com#key-1',
'created' => '2026-05-02T10:15:30.000Z',
'proofPurpose' => 'assertionMethod',
'proofValue' => 'z2pcVdSdoMTrkYP9rVdz...',
'action' => 'ISSUE',
'actionProof' => 'sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def456...'
],
[
'type' => 'DataIntegrityProof',
'cryptosuite' => 'eddsa-jcs-2022',
'verificationMethod' => 'did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7#key-1',
'created' => '2026-05-02T10:15:30.000Z',
'proofPurpose' => 'assertionMethod',
'proofValue' => 'z2pcVdSdoMTrkTCXzp...',
'action' => 'ACCEPT',
'actionProof' => 'sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def457...'
],
[
'type' => 'DataIntegrityProof',
'cryptosuite' => 'eddsa-jcs-2022',
'verificationMethod' => 'did:web:humanos.tech#key-1',
'created' => '2026-05-02T10:15:30.000Z',
'proofPurpose' => 'assertionMethod',
'proofValue' => 'z2pcVdSdoMTrkTRrXdz...',
'action' => 'STAMP',
'actionProof' => 'sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def458...'
]
]
],
'decisions' => [
[
'id' => 'did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7',
'contact' => 'grantor@example.com',
'accepted' => true,
'decidedAt' => '2025-06-01T12:00:00.000Z'
]
],
'name' => 'Credential Name',
'description' => 'Document to be requested on onboarding',
'internalId' => 'internal-12345',
'tags' => [
'onboarding',
'kyc'
]
],
'decision' => [
'date' => '2023-11-07T05:31:56Z'
],
'internalId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.example.com/_webhooks/credential"
payload := strings.NewReader("{\n \"eventType\": \"credential\",\n \"requestId\": \"<string>\",\n \"issuerDid\": \"<string>\",\n \"user\": {\n \"contact\": \"<string>\",\n \"id\": \"<string>\",\n \"internalId\": \"<string>\"\n },\n \"api_version\": \"<string>\",\n \"credential\": {\n \"id\": \"urn:via:credential:550e8400-e29b-41d4-a716-446655440000\",\n \"resourceType\": \"DOCUMENT\",\n \"status\": \"DRAFT\",\n \"w3cCredential\": {\n \"@context\": [\n \"https://www.w3.org/ns/credentials/v2\",\n \"https://via.humanos.dev/ns/v1\"\n ],\n \"id\": \"urn:via:credential:550e8400-e29b-41d4-a716-446655440000\",\n \"type\": [\n \"VerifiableCredential\",\n \"VIAMandate\"\n ],\n \"issuer\": \"did:web:humanos.tech\",\n \"validFrom\": \"2025-01-01T00:00:00Z\",\n \"validUntil\": null,\n \"credentialSubject\": {\n \"id\": \"did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000\",\n \"mandate\": {\n \"grantor\": \"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"scope\": \"humanos.credential.request\",\n \"context\": {\n \"authorizedDIDs\": [\n \"did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000\",\n \"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7\"\n ]\n }\n }\n },\n \"evidences\": [\n {\n \"id\": \"urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34\",\n \"digestSRI\": \"sha256-abc123\",\n \"location\": \"https://api.humanos.dev/credential/evidence/urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34\"\n }\n ],\n \"proofs\": [\n {\n \"type\": \"DataIntegrityProof\",\n \"cryptosuite\": \"eddsa-jcs-2022\",\n \"verificationMethod\": \"did:web:example.com#key-1\",\n \"created\": \"2026-05-02T10:15:30.000Z\",\n \"proofPurpose\": \"assertionMethod\",\n \"proofValue\": \"z2pcVdSdoMTrkYP9rVdz...\",\n \"action\": \"ISSUE\",\n \"actionProof\": \"sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def456...\"\n },\n {\n \"type\": \"DataIntegrityProof\",\n \"cryptosuite\": \"eddsa-jcs-2022\",\n \"verificationMethod\": \"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7#key-1\",\n \"created\": \"2026-05-02T10:15:30.000Z\",\n \"proofPurpose\": \"assertionMethod\",\n \"proofValue\": \"z2pcVdSdoMTrkTCXzp...\",\n \"action\": \"ACCEPT\",\n \"actionProof\": \"sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def457...\"\n },\n {\n \"type\": \"DataIntegrityProof\",\n \"cryptosuite\": \"eddsa-jcs-2022\",\n \"verificationMethod\": \"did:web:humanos.tech#key-1\",\n \"created\": \"2026-05-02T10:15:30.000Z\",\n \"proofPurpose\": \"assertionMethod\",\n \"proofValue\": \"z2pcVdSdoMTrkTRrXdz...\",\n \"action\": \"STAMP\",\n \"actionProof\": \"sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def458...\"\n }\n ]\n },\n \"decisions\": [\n {\n \"id\": \"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"contact\": \"grantor@example.com\",\n \"accepted\": true,\n \"decidedAt\": \"2025-06-01T12:00:00.000Z\"\n }\n ],\n \"name\": \"Credential Name\",\n \"description\": \"Document to be requested on onboarding\",\n \"internalId\": \"internal-12345\",\n \"tags\": [\n \"onboarding\",\n \"kyc\"\n ]\n },\n \"decision\": {\n \"date\": \"2023-11-07T05:31:56Z\"\n },\n \"internalId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/_webhooks/credential")
.header("Content-Type", "application/json")
.body("{\n \"eventType\": \"credential\",\n \"requestId\": \"<string>\",\n \"issuerDid\": \"<string>\",\n \"user\": {\n \"contact\": \"<string>\",\n \"id\": \"<string>\",\n \"internalId\": \"<string>\"\n },\n \"api_version\": \"<string>\",\n \"credential\": {\n \"id\": \"urn:via:credential:550e8400-e29b-41d4-a716-446655440000\",\n \"resourceType\": \"DOCUMENT\",\n \"status\": \"DRAFT\",\n \"w3cCredential\": {\n \"@context\": [\n \"https://www.w3.org/ns/credentials/v2\",\n \"https://via.humanos.dev/ns/v1\"\n ],\n \"id\": \"urn:via:credential:550e8400-e29b-41d4-a716-446655440000\",\n \"type\": [\n \"VerifiableCredential\",\n \"VIAMandate\"\n ],\n \"issuer\": \"did:web:humanos.tech\",\n \"validFrom\": \"2025-01-01T00:00:00Z\",\n \"validUntil\": null,\n \"credentialSubject\": {\n \"id\": \"did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000\",\n \"mandate\": {\n \"grantor\": \"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"scope\": \"humanos.credential.request\",\n \"context\": {\n \"authorizedDIDs\": [\n \"did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000\",\n \"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7\"\n ]\n }\n }\n },\n \"evidences\": [\n {\n \"id\": \"urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34\",\n \"digestSRI\": \"sha256-abc123\",\n \"location\": \"https://api.humanos.dev/credential/evidence/urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34\"\n }\n ],\n \"proofs\": [\n {\n \"type\": \"DataIntegrityProof\",\n \"cryptosuite\": \"eddsa-jcs-2022\",\n \"verificationMethod\": \"did:web:example.com#key-1\",\n \"created\": \"2026-05-02T10:15:30.000Z\",\n \"proofPurpose\": \"assertionMethod\",\n \"proofValue\": \"z2pcVdSdoMTrkYP9rVdz...\",\n \"action\": \"ISSUE\",\n \"actionProof\": \"sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def456...\"\n },\n {\n \"type\": \"DataIntegrityProof\",\n \"cryptosuite\": \"eddsa-jcs-2022\",\n \"verificationMethod\": \"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7#key-1\",\n \"created\": \"2026-05-02T10:15:30.000Z\",\n \"proofPurpose\": \"assertionMethod\",\n \"proofValue\": \"z2pcVdSdoMTrkTCXzp...\",\n \"action\": \"ACCEPT\",\n \"actionProof\": \"sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def457...\"\n },\n {\n \"type\": \"DataIntegrityProof\",\n \"cryptosuite\": \"eddsa-jcs-2022\",\n \"verificationMethod\": \"did:web:humanos.tech#key-1\",\n \"created\": \"2026-05-02T10:15:30.000Z\",\n \"proofPurpose\": \"assertionMethod\",\n \"proofValue\": \"z2pcVdSdoMTrkTRrXdz...\",\n \"action\": \"STAMP\",\n \"actionProof\": \"sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def458...\"\n }\n ]\n },\n \"decisions\": [\n {\n \"id\": \"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"contact\": \"grantor@example.com\",\n \"accepted\": true,\n \"decidedAt\": \"2025-06-01T12:00:00.000Z\"\n }\n ],\n \"name\": \"Credential Name\",\n \"description\": \"Document to be requested on onboarding\",\n \"internalId\": \"internal-12345\",\n \"tags\": [\n \"onboarding\",\n \"kyc\"\n ]\n },\n \"decision\": {\n \"date\": \"2023-11-07T05:31:56Z\"\n },\n \"internalId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/_webhooks/credential")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"eventType\": \"credential\",\n \"requestId\": \"<string>\",\n \"issuerDid\": \"<string>\",\n \"user\": {\n \"contact\": \"<string>\",\n \"id\": \"<string>\",\n \"internalId\": \"<string>\"\n },\n \"api_version\": \"<string>\",\n \"credential\": {\n \"id\": \"urn:via:credential:550e8400-e29b-41d4-a716-446655440000\",\n \"resourceType\": \"DOCUMENT\",\n \"status\": \"DRAFT\",\n \"w3cCredential\": {\n \"@context\": [\n \"https://www.w3.org/ns/credentials/v2\",\n \"https://via.humanos.dev/ns/v1\"\n ],\n \"id\": \"urn:via:credential:550e8400-e29b-41d4-a716-446655440000\",\n \"type\": [\n \"VerifiableCredential\",\n \"VIAMandate\"\n ],\n \"issuer\": \"did:web:humanos.tech\",\n \"validFrom\": \"2025-01-01T00:00:00Z\",\n \"validUntil\": null,\n \"credentialSubject\": {\n \"id\": \"did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000\",\n \"mandate\": {\n \"grantor\": \"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"scope\": \"humanos.credential.request\",\n \"context\": {\n \"authorizedDIDs\": [\n \"did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000\",\n \"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7\"\n ]\n }\n }\n },\n \"evidences\": [\n {\n \"id\": \"urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34\",\n \"digestSRI\": \"sha256-abc123\",\n \"location\": \"https://api.humanos.dev/credential/evidence/urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34\"\n }\n ],\n \"proofs\": [\n {\n \"type\": \"DataIntegrityProof\",\n \"cryptosuite\": \"eddsa-jcs-2022\",\n \"verificationMethod\": \"did:web:example.com#key-1\",\n \"created\": \"2026-05-02T10:15:30.000Z\",\n \"proofPurpose\": \"assertionMethod\",\n \"proofValue\": \"z2pcVdSdoMTrkYP9rVdz...\",\n \"action\": \"ISSUE\",\n \"actionProof\": \"sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def456...\"\n },\n {\n \"type\": \"DataIntegrityProof\",\n \"cryptosuite\": \"eddsa-jcs-2022\",\n \"verificationMethod\": \"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7#key-1\",\n \"created\": \"2026-05-02T10:15:30.000Z\",\n \"proofPurpose\": \"assertionMethod\",\n \"proofValue\": \"z2pcVdSdoMTrkTCXzp...\",\n \"action\": \"ACCEPT\",\n \"actionProof\": \"sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def457...\"\n },\n {\n \"type\": \"DataIntegrityProof\",\n \"cryptosuite\": \"eddsa-jcs-2022\",\n \"verificationMethod\": \"did:web:humanos.tech#key-1\",\n \"created\": \"2026-05-02T10:15:30.000Z\",\n \"proofPurpose\": \"assertionMethod\",\n \"proofValue\": \"z2pcVdSdoMTrkTRrXdz...\",\n \"action\": \"STAMP\",\n \"actionProof\": \"sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def458...\"\n }\n ]\n },\n \"decisions\": [\n {\n \"id\": \"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"contact\": \"grantor@example.com\",\n \"accepted\": true,\n \"decidedAt\": \"2025-06-01T12:00:00.000Z\"\n }\n ],\n \"name\": \"Credential Name\",\n \"description\": \"Document to be requested on onboarding\",\n \"internalId\": \"internal-12345\",\n \"tags\": [\n \"onboarding\",\n \"kyc\"\n ]\n },\n \"decision\": {\n \"date\": \"2023-11-07T05:31:56Z\"\n },\n \"internalId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyWebhooks
Credential Event
Fired when a credential request is accepted or rejected by the subject.
Inbound webhook callback — Humanos POSTs this payload to your registered webhook URL. This is not an endpoint you call; it is documented as a path so SDK code generators emit a typed payload model.
POST
/
_webhooks
/
credential
Credential Event
curl --request POST \
--url https://api.example.com/_webhooks/credential \
--header 'Content-Type: application/json' \
--data '
{
"eventType": "credential",
"requestId": "<string>",
"issuerDid": "<string>",
"user": {
"contact": "<string>",
"id": "<string>",
"internalId": "<string>"
},
"api_version": "<string>",
"credential": {
"id": "urn:via:credential:550e8400-e29b-41d4-a716-446655440000",
"resourceType": "DOCUMENT",
"status": "DRAFT",
"w3cCredential": {
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://via.humanos.dev/ns/v1"
],
"id": "urn:via:credential:550e8400-e29b-41d4-a716-446655440000",
"type": [
"VerifiableCredential",
"VIAMandate"
],
"issuer": "did:web:humanos.tech",
"validFrom": "2025-01-01T00:00:00Z",
"validUntil": null,
"credentialSubject": {
"id": "did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000",
"mandate": {
"grantor": "did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7",
"scope": "humanos.credential.request",
"context": {
"authorizedDIDs": [
"did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000",
"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7"
]
}
}
},
"evidences": [
{
"id": "urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34",
"digestSRI": "sha256-abc123",
"location": "https://api.humanos.dev/credential/evidence/urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34"
}
],
"proofs": [
{
"type": "DataIntegrityProof",
"cryptosuite": "eddsa-jcs-2022",
"verificationMethod": "did:web:example.com#key-1",
"created": "2026-05-02T10:15:30.000Z",
"proofPurpose": "assertionMethod",
"proofValue": "z2pcVdSdoMTrkYP9rVdz...",
"action": "ISSUE",
"actionProof": "sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def456..."
},
{
"type": "DataIntegrityProof",
"cryptosuite": "eddsa-jcs-2022",
"verificationMethod": "did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7#key-1",
"created": "2026-05-02T10:15:30.000Z",
"proofPurpose": "assertionMethod",
"proofValue": "z2pcVdSdoMTrkTCXzp...",
"action": "ACCEPT",
"actionProof": "sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def457..."
},
{
"type": "DataIntegrityProof",
"cryptosuite": "eddsa-jcs-2022",
"verificationMethod": "did:web:humanos.tech#key-1",
"created": "2026-05-02T10:15:30.000Z",
"proofPurpose": "assertionMethod",
"proofValue": "z2pcVdSdoMTrkTRrXdz...",
"action": "STAMP",
"actionProof": "sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def458..."
}
]
},
"decisions": [
{
"id": "did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7",
"contact": "grantor@example.com",
"accepted": true,
"decidedAt": "2025-06-01T12:00:00.000Z"
}
],
"name": "Credential Name",
"description": "Document to be requested on onboarding",
"internalId": "internal-12345",
"tags": [
"onboarding",
"kyc"
]
},
"decision": {
"date": "2023-11-07T05:31:56Z"
},
"internalId": "<string>"
}
'import requests
url = "https://api.example.com/_webhooks/credential"
payload = {
"eventType": "credential",
"requestId": "<string>",
"issuerDid": "<string>",
"user": {
"contact": "<string>",
"id": "<string>",
"internalId": "<string>"
},
"api_version": "<string>",
"credential": {
"id": "urn:via:credential:550e8400-e29b-41d4-a716-446655440000",
"resourceType": "DOCUMENT",
"status": "DRAFT",
"w3cCredential": {
"@context": ["https://www.w3.org/ns/credentials/v2", "https://via.humanos.dev/ns/v1"],
"id": "urn:via:credential:550e8400-e29b-41d4-a716-446655440000",
"type": ["VerifiableCredential", "VIAMandate"],
"issuer": "did:web:humanos.tech",
"validFrom": "2025-01-01T00:00:00Z",
"validUntil": None,
"credentialSubject": {
"id": "did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000",
"mandate": {
"grantor": "did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7",
"scope": "humanos.credential.request",
"context": { "authorizedDIDs": ["did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000", "did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7"] }
}
},
"evidences": [
{
"id": "urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34",
"digestSRI": "sha256-abc123",
"location": "https://api.humanos.dev/credential/evidence/urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34"
}
],
"proofs": [
{
"type": "DataIntegrityProof",
"cryptosuite": "eddsa-jcs-2022",
"verificationMethod": "did:web:example.com#key-1",
"created": "2026-05-02T10:15:30.000Z",
"proofPurpose": "assertionMethod",
"proofValue": "z2pcVdSdoMTrkYP9rVdz...",
"action": "ISSUE",
"actionProof": "sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def456..."
},
{
"type": "DataIntegrityProof",
"cryptosuite": "eddsa-jcs-2022",
"verificationMethod": "did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7#key-1",
"created": "2026-05-02T10:15:30.000Z",
"proofPurpose": "assertionMethod",
"proofValue": "z2pcVdSdoMTrkTCXzp...",
"action": "ACCEPT",
"actionProof": "sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def457..."
},
{
"type": "DataIntegrityProof",
"cryptosuite": "eddsa-jcs-2022",
"verificationMethod": "did:web:humanos.tech#key-1",
"created": "2026-05-02T10:15:30.000Z",
"proofPurpose": "assertionMethod",
"proofValue": "z2pcVdSdoMTrkTRrXdz...",
"action": "STAMP",
"actionProof": "sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def458..."
}
]
},
"decisions": [
{
"id": "did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7",
"contact": "grantor@example.com",
"accepted": True,
"decidedAt": "2025-06-01T12:00:00.000Z"
}
],
"name": "Credential Name",
"description": "Document to be requested on onboarding",
"internalId": "internal-12345",
"tags": ["onboarding", "kyc"]
},
"decision": { "date": "2023-11-07T05:31:56Z" },
"internalId": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
eventType: 'credential',
requestId: '<string>',
issuerDid: '<string>',
user: {contact: '<string>', id: '<string>', internalId: '<string>'},
api_version: '<string>',
credential: {
id: 'urn:via:credential:550e8400-e29b-41d4-a716-446655440000',
resourceType: 'DOCUMENT',
status: 'DRAFT',
w3cCredential: {
'@context': ['https://www.w3.org/ns/credentials/v2', 'https://via.humanos.dev/ns/v1'],
id: 'urn:via:credential:550e8400-e29b-41d4-a716-446655440000',
type: ['VerifiableCredential', 'VIAMandate'],
issuer: 'did:web:humanos.tech',
validFrom: '2025-01-01T00:00:00Z',
validUntil: null,
credentialSubject: {
id: 'did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000',
mandate: {
grantor: 'did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7',
scope: 'humanos.credential.request',
context: {
authorizedDIDs: [
'did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000',
'did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7'
]
}
}
},
evidences: [
{
id: 'urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34',
digestSRI: 'sha256-abc123',
location: 'https://api.humanos.dev/credential/evidence/urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34'
}
],
proofs: [
{
type: 'DataIntegrityProof',
cryptosuite: 'eddsa-jcs-2022',
verificationMethod: 'did:web:example.com#key-1',
created: '2026-05-02T10:15:30.000Z',
proofPurpose: 'assertionMethod',
proofValue: 'z2pcVdSdoMTrkYP9rVdz...',
action: 'ISSUE',
actionProof: 'sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def456...'
},
{
type: 'DataIntegrityProof',
cryptosuite: 'eddsa-jcs-2022',
verificationMethod: 'did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7#key-1',
created: '2026-05-02T10:15:30.000Z',
proofPurpose: 'assertionMethod',
proofValue: 'z2pcVdSdoMTrkTCXzp...',
action: 'ACCEPT',
actionProof: 'sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def457...'
},
{
type: 'DataIntegrityProof',
cryptosuite: 'eddsa-jcs-2022',
verificationMethod: 'did:web:humanos.tech#key-1',
created: '2026-05-02T10:15:30.000Z',
proofPurpose: 'assertionMethod',
proofValue: 'z2pcVdSdoMTrkTRrXdz...',
action: 'STAMP',
actionProof: 'sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def458...'
}
]
},
decisions: [
{
id: 'did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7',
contact: 'grantor@example.com',
accepted: true,
decidedAt: '2025-06-01T12:00:00.000Z'
}
],
name: 'Credential Name',
description: 'Document to be requested on onboarding',
internalId: 'internal-12345',
tags: ['onboarding', 'kyc']
},
decision: {date: '2023-11-07T05:31:56Z'},
internalId: '<string>'
})
};
fetch('https://api.example.com/_webhooks/credential', 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.example.com/_webhooks/credential",
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([
'eventType' => 'credential',
'requestId' => '<string>',
'issuerDid' => '<string>',
'user' => [
'contact' => '<string>',
'id' => '<string>',
'internalId' => '<string>'
],
'api_version' => '<string>',
'credential' => [
'id' => 'urn:via:credential:550e8400-e29b-41d4-a716-446655440000',
'resourceType' => 'DOCUMENT',
'status' => 'DRAFT',
'w3cCredential' => [
'@context' => [
'https://www.w3.org/ns/credentials/v2',
'https://via.humanos.dev/ns/v1'
],
'id' => 'urn:via:credential:550e8400-e29b-41d4-a716-446655440000',
'type' => [
'VerifiableCredential',
'VIAMandate'
],
'issuer' => 'did:web:humanos.tech',
'validFrom' => '2025-01-01T00:00:00Z',
'validUntil' => null,
'credentialSubject' => [
'id' => 'did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000',
'mandate' => [
'grantor' => 'did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7',
'scope' => 'humanos.credential.request',
'context' => [
'authorizedDIDs' => [
'did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000',
'did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7'
]
]
]
],
'evidences' => [
[
'id' => 'urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34',
'digestSRI' => 'sha256-abc123',
'location' => 'https://api.humanos.dev/credential/evidence/urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34'
]
],
'proofs' => [
[
'type' => 'DataIntegrityProof',
'cryptosuite' => 'eddsa-jcs-2022',
'verificationMethod' => 'did:web:example.com#key-1',
'created' => '2026-05-02T10:15:30.000Z',
'proofPurpose' => 'assertionMethod',
'proofValue' => 'z2pcVdSdoMTrkYP9rVdz...',
'action' => 'ISSUE',
'actionProof' => 'sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def456...'
],
[
'type' => 'DataIntegrityProof',
'cryptosuite' => 'eddsa-jcs-2022',
'verificationMethod' => 'did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7#key-1',
'created' => '2026-05-02T10:15:30.000Z',
'proofPurpose' => 'assertionMethod',
'proofValue' => 'z2pcVdSdoMTrkTCXzp...',
'action' => 'ACCEPT',
'actionProof' => 'sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def457...'
],
[
'type' => 'DataIntegrityProof',
'cryptosuite' => 'eddsa-jcs-2022',
'verificationMethod' => 'did:web:humanos.tech#key-1',
'created' => '2026-05-02T10:15:30.000Z',
'proofPurpose' => 'assertionMethod',
'proofValue' => 'z2pcVdSdoMTrkTRrXdz...',
'action' => 'STAMP',
'actionProof' => 'sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def458...'
]
]
],
'decisions' => [
[
'id' => 'did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7',
'contact' => 'grantor@example.com',
'accepted' => true,
'decidedAt' => '2025-06-01T12:00:00.000Z'
]
],
'name' => 'Credential Name',
'description' => 'Document to be requested on onboarding',
'internalId' => 'internal-12345',
'tags' => [
'onboarding',
'kyc'
]
],
'decision' => [
'date' => '2023-11-07T05:31:56Z'
],
'internalId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.example.com/_webhooks/credential"
payload := strings.NewReader("{\n \"eventType\": \"credential\",\n \"requestId\": \"<string>\",\n \"issuerDid\": \"<string>\",\n \"user\": {\n \"contact\": \"<string>\",\n \"id\": \"<string>\",\n \"internalId\": \"<string>\"\n },\n \"api_version\": \"<string>\",\n \"credential\": {\n \"id\": \"urn:via:credential:550e8400-e29b-41d4-a716-446655440000\",\n \"resourceType\": \"DOCUMENT\",\n \"status\": \"DRAFT\",\n \"w3cCredential\": {\n \"@context\": [\n \"https://www.w3.org/ns/credentials/v2\",\n \"https://via.humanos.dev/ns/v1\"\n ],\n \"id\": \"urn:via:credential:550e8400-e29b-41d4-a716-446655440000\",\n \"type\": [\n \"VerifiableCredential\",\n \"VIAMandate\"\n ],\n \"issuer\": \"did:web:humanos.tech\",\n \"validFrom\": \"2025-01-01T00:00:00Z\",\n \"validUntil\": null,\n \"credentialSubject\": {\n \"id\": \"did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000\",\n \"mandate\": {\n \"grantor\": \"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"scope\": \"humanos.credential.request\",\n \"context\": {\n \"authorizedDIDs\": [\n \"did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000\",\n \"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7\"\n ]\n }\n }\n },\n \"evidences\": [\n {\n \"id\": \"urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34\",\n \"digestSRI\": \"sha256-abc123\",\n \"location\": \"https://api.humanos.dev/credential/evidence/urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34\"\n }\n ],\n \"proofs\": [\n {\n \"type\": \"DataIntegrityProof\",\n \"cryptosuite\": \"eddsa-jcs-2022\",\n \"verificationMethod\": \"did:web:example.com#key-1\",\n \"created\": \"2026-05-02T10:15:30.000Z\",\n \"proofPurpose\": \"assertionMethod\",\n \"proofValue\": \"z2pcVdSdoMTrkYP9rVdz...\",\n \"action\": \"ISSUE\",\n \"actionProof\": \"sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def456...\"\n },\n {\n \"type\": \"DataIntegrityProof\",\n \"cryptosuite\": \"eddsa-jcs-2022\",\n \"verificationMethod\": \"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7#key-1\",\n \"created\": \"2026-05-02T10:15:30.000Z\",\n \"proofPurpose\": \"assertionMethod\",\n \"proofValue\": \"z2pcVdSdoMTrkTCXzp...\",\n \"action\": \"ACCEPT\",\n \"actionProof\": \"sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def457...\"\n },\n {\n \"type\": \"DataIntegrityProof\",\n \"cryptosuite\": \"eddsa-jcs-2022\",\n \"verificationMethod\": \"did:web:humanos.tech#key-1\",\n \"created\": \"2026-05-02T10:15:30.000Z\",\n \"proofPurpose\": \"assertionMethod\",\n \"proofValue\": \"z2pcVdSdoMTrkTRrXdz...\",\n \"action\": \"STAMP\",\n \"actionProof\": \"sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def458...\"\n }\n ]\n },\n \"decisions\": [\n {\n \"id\": \"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"contact\": \"grantor@example.com\",\n \"accepted\": true,\n \"decidedAt\": \"2025-06-01T12:00:00.000Z\"\n }\n ],\n \"name\": \"Credential Name\",\n \"description\": \"Document to be requested on onboarding\",\n \"internalId\": \"internal-12345\",\n \"tags\": [\n \"onboarding\",\n \"kyc\"\n ]\n },\n \"decision\": {\n \"date\": \"2023-11-07T05:31:56Z\"\n },\n \"internalId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/_webhooks/credential")
.header("Content-Type", "application/json")
.body("{\n \"eventType\": \"credential\",\n \"requestId\": \"<string>\",\n \"issuerDid\": \"<string>\",\n \"user\": {\n \"contact\": \"<string>\",\n \"id\": \"<string>\",\n \"internalId\": \"<string>\"\n },\n \"api_version\": \"<string>\",\n \"credential\": {\n \"id\": \"urn:via:credential:550e8400-e29b-41d4-a716-446655440000\",\n \"resourceType\": \"DOCUMENT\",\n \"status\": \"DRAFT\",\n \"w3cCredential\": {\n \"@context\": [\n \"https://www.w3.org/ns/credentials/v2\",\n \"https://via.humanos.dev/ns/v1\"\n ],\n \"id\": \"urn:via:credential:550e8400-e29b-41d4-a716-446655440000\",\n \"type\": [\n \"VerifiableCredential\",\n \"VIAMandate\"\n ],\n \"issuer\": \"did:web:humanos.tech\",\n \"validFrom\": \"2025-01-01T00:00:00Z\",\n \"validUntil\": null,\n \"credentialSubject\": {\n \"id\": \"did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000\",\n \"mandate\": {\n \"grantor\": \"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"scope\": \"humanos.credential.request\",\n \"context\": {\n \"authorizedDIDs\": [\n \"did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000\",\n \"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7\"\n ]\n }\n }\n },\n \"evidences\": [\n {\n \"id\": \"urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34\",\n \"digestSRI\": \"sha256-abc123\",\n \"location\": \"https://api.humanos.dev/credential/evidence/urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34\"\n }\n ],\n \"proofs\": [\n {\n \"type\": \"DataIntegrityProof\",\n \"cryptosuite\": \"eddsa-jcs-2022\",\n \"verificationMethod\": \"did:web:example.com#key-1\",\n \"created\": \"2026-05-02T10:15:30.000Z\",\n \"proofPurpose\": \"assertionMethod\",\n \"proofValue\": \"z2pcVdSdoMTrkYP9rVdz...\",\n \"action\": \"ISSUE\",\n \"actionProof\": \"sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def456...\"\n },\n {\n \"type\": \"DataIntegrityProof\",\n \"cryptosuite\": \"eddsa-jcs-2022\",\n \"verificationMethod\": \"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7#key-1\",\n \"created\": \"2026-05-02T10:15:30.000Z\",\n \"proofPurpose\": \"assertionMethod\",\n \"proofValue\": \"z2pcVdSdoMTrkTCXzp...\",\n \"action\": \"ACCEPT\",\n \"actionProof\": \"sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def457...\"\n },\n {\n \"type\": \"DataIntegrityProof\",\n \"cryptosuite\": \"eddsa-jcs-2022\",\n \"verificationMethod\": \"did:web:humanos.tech#key-1\",\n \"created\": \"2026-05-02T10:15:30.000Z\",\n \"proofPurpose\": \"assertionMethod\",\n \"proofValue\": \"z2pcVdSdoMTrkTRrXdz...\",\n \"action\": \"STAMP\",\n \"actionProof\": \"sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def458...\"\n }\n ]\n },\n \"decisions\": [\n {\n \"id\": \"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"contact\": \"grantor@example.com\",\n \"accepted\": true,\n \"decidedAt\": \"2025-06-01T12:00:00.000Z\"\n }\n ],\n \"name\": \"Credential Name\",\n \"description\": \"Document to be requested on onboarding\",\n \"internalId\": \"internal-12345\",\n \"tags\": [\n \"onboarding\",\n \"kyc\"\n ]\n },\n \"decision\": {\n \"date\": \"2023-11-07T05:31:56Z\"\n },\n \"internalId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/_webhooks/credential")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"eventType\": \"credential\",\n \"requestId\": \"<string>\",\n \"issuerDid\": \"<string>\",\n \"user\": {\n \"contact\": \"<string>\",\n \"id\": \"<string>\",\n \"internalId\": \"<string>\"\n },\n \"api_version\": \"<string>\",\n \"credential\": {\n \"id\": \"urn:via:credential:550e8400-e29b-41d4-a716-446655440000\",\n \"resourceType\": \"DOCUMENT\",\n \"status\": \"DRAFT\",\n \"w3cCredential\": {\n \"@context\": [\n \"https://www.w3.org/ns/credentials/v2\",\n \"https://via.humanos.dev/ns/v1\"\n ],\n \"id\": \"urn:via:credential:550e8400-e29b-41d4-a716-446655440000\",\n \"type\": [\n \"VerifiableCredential\",\n \"VIAMandate\"\n ],\n \"issuer\": \"did:web:humanos.tech\",\n \"validFrom\": \"2025-01-01T00:00:00Z\",\n \"validUntil\": null,\n \"credentialSubject\": {\n \"id\": \"did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000\",\n \"mandate\": {\n \"grantor\": \"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"scope\": \"humanos.credential.request\",\n \"context\": {\n \"authorizedDIDs\": [\n \"did:web:humanos.tech:org:550e8400-e29b-41d4-a716-446655440000\",\n \"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7\"\n ]\n }\n }\n },\n \"evidences\": [\n {\n \"id\": \"urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34\",\n \"digestSRI\": \"sha256-abc123\",\n \"location\": \"https://api.humanos.dev/credential/evidence/urn:via:evidence:9b2e4f1a-3c7d-4e8a-bf12-2a6c5d8e0f34\"\n }\n ],\n \"proofs\": [\n {\n \"type\": \"DataIntegrityProof\",\n \"cryptosuite\": \"eddsa-jcs-2022\",\n \"verificationMethod\": \"did:web:example.com#key-1\",\n \"created\": \"2026-05-02T10:15:30.000Z\",\n \"proofPurpose\": \"assertionMethod\",\n \"proofValue\": \"z2pcVdSdoMTrkYP9rVdz...\",\n \"action\": \"ISSUE\",\n \"actionProof\": \"sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def456...\"\n },\n {\n \"type\": \"DataIntegrityProof\",\n \"cryptosuite\": \"eddsa-jcs-2022\",\n \"verificationMethod\": \"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7#key-1\",\n \"created\": \"2026-05-02T10:15:30.000Z\",\n \"proofPurpose\": \"assertionMethod\",\n \"proofValue\": \"z2pcVdSdoMTrkTCXzp...\",\n \"action\": \"ACCEPT\",\n \"actionProof\": \"sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def457...\"\n },\n {\n \"type\": \"DataIntegrityProof\",\n \"cryptosuite\": \"eddsa-jcs-2022\",\n \"verificationMethod\": \"did:web:humanos.tech#key-1\",\n \"created\": \"2026-05-02T10:15:30.000Z\",\n \"proofPurpose\": \"assertionMethod\",\n \"proofValue\": \"z2pcVdSdoMTrkTRrXdz...\",\n \"action\": \"STAMP\",\n \"actionProof\": \"sha256-9b2e4f1a3c7d4e8abf122a6c5d8e0f34abc123def458...\"\n }\n ]\n },\n \"decisions\": [\n {\n \"id\": \"did:web:humanos.tech:user:7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"contact\": \"grantor@example.com\",\n \"accepted\": true,\n \"decidedAt\": \"2025-06-01T12:00:00.000Z\"\n }\n ],\n \"name\": \"Credential Name\",\n \"description\": \"Document to be requested on onboarding\",\n \"internalId\": \"internal-12345\",\n \"tags\": [\n \"onboarding\",\n \"kyc\"\n ]\n },\n \"decision\": {\n \"date\": \"2023-11-07T05:31:56Z\"\n },\n \"internalId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyHeaders
Pin request, response, and webhook shapes to a specific dated API version (YYYY-MM-DD). Omit to use the version pinned to your API key (set when the key is created; new keys default to the latest version). New integrations should target the latest version.
Pattern:
^\d{4}-\d{2}-\d{2}$Example:
"2026-07-06"
Body
application/json
Response
200
Webhook received successfully
⌘I