curl --request POST \
--url https://api.example.com/v1/credentials/verify \
--header 'Content-Type: application/json' \
--data '
{
"credential": "<string>",
"context": {
"resource_type": "<string>",
"resource_id": "<string>",
"action": "<string>",
"transaction_amount": 1,
"transaction_currency": "<string>",
"merchant_category": "<string>",
"merchant_id": "<string>",
"time_of_day": "<string>",
"user_country": "<string>",
"audience": "<string>"
},
"by_credential_id": "<string>"
}
'import requests
url = "https://api.example.com/v1/credentials/verify"
payload = {
"credential": "<string>",
"context": {
"resource_type": "<string>",
"resource_id": "<string>",
"action": "<string>",
"transaction_amount": 1,
"transaction_currency": "<string>",
"merchant_category": "<string>",
"merchant_id": "<string>",
"time_of_day": "<string>",
"user_country": "<string>",
"audience": "<string>"
},
"by_credential_id": "<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({
credential: '<string>',
context: {
resource_type: '<string>',
resource_id: '<string>',
action: '<string>',
transaction_amount: 1,
transaction_currency: '<string>',
merchant_category: '<string>',
merchant_id: '<string>',
time_of_day: '<string>',
user_country: '<string>',
audience: '<string>'
},
by_credential_id: '<string>'
})
};
fetch('https://api.example.com/v1/credentials/verify', 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/v1/credentials/verify",
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([
'credential' => '<string>',
'context' => [
'resource_type' => '<string>',
'resource_id' => '<string>',
'action' => '<string>',
'transaction_amount' => 1,
'transaction_currency' => '<string>',
'merchant_category' => '<string>',
'merchant_id' => '<string>',
'time_of_day' => '<string>',
'user_country' => '<string>',
'audience' => '<string>'
],
'by_credential_id' => '<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/v1/credentials/verify"
payload := strings.NewReader("{\n \"credential\": \"<string>\",\n \"context\": {\n \"resource_type\": \"<string>\",\n \"resource_id\": \"<string>\",\n \"action\": \"<string>\",\n \"transaction_amount\": 1,\n \"transaction_currency\": \"<string>\",\n \"merchant_category\": \"<string>\",\n \"merchant_id\": \"<string>\",\n \"time_of_day\": \"<string>\",\n \"user_country\": \"<string>\",\n \"audience\": \"<string>\"\n },\n \"by_credential_id\": \"<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/v1/credentials/verify")
.header("Content-Type", "application/json")
.body("{\n \"credential\": \"<string>\",\n \"context\": {\n \"resource_type\": \"<string>\",\n \"resource_id\": \"<string>\",\n \"action\": \"<string>\",\n \"transaction_amount\": 1,\n \"transaction_currency\": \"<string>\",\n \"merchant_category\": \"<string>\",\n \"merchant_id\": \"<string>\",\n \"time_of_day\": \"<string>\",\n \"user_country\": \"<string>\",\n \"audience\": \"<string>\"\n },\n \"by_credential_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/credentials/verify")
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 \"credential\": \"<string>\",\n \"context\": {\n \"resource_type\": \"<string>\",\n \"resource_id\": \"<string>\",\n \"action\": \"<string>\",\n \"transaction_amount\": 1,\n \"transaction_currency\": \"<string>\",\n \"merchant_category\": \"<string>\",\n \"merchant_id\": \"<string>\",\n \"time_of_day\": \"<string>\",\n \"user_country\": \"<string>\",\n \"audience\": \"<string>\"\n },\n \"by_credential_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"valid": true,
"credential_id": "<string>",
"issuer_did": "<string>",
"subject": {
"type": "organisation",
"id": "<string>",
"registration_number": "<string>",
"jurisdiction": "<string>",
"legal_form": "<string>",
"registered_name": "<string>",
"trading_name": "<string>",
"founded_year": 123,
"website": "<string>",
"sector": "<string>"
},
"issued_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"verified_at": "2023-11-07T05:31:56Z",
"verification_id": "<string>",
"attestation_type": "<string>",
"policy_match": {
"matched": true,
"permission_index": 1,
"conditions_evaluated": [
{
"field": "<string>",
"op": "<string>"
}
],
"deny_reason": "<string>"
},
"evidence_refs": []
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"issue": "<string>",
"field": "<string>",
"hint": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"issue": "<string>",
"field": "<string>",
"hint": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"issue": "<string>",
"field": "<string>",
"hint": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"issue": "<string>",
"field": "<string>",
"hint": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"issue": "<string>",
"field": "<string>",
"hint": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"issue": "<string>",
"field": "<string>",
"hint": "<string>"
}
],
"request_id": "<string>"
}
}Verify a Credential
Verify a presented credential and return a structured outcome.
The verifier runs a deterministic pipeline against the JWT-VC: parse, resolve
the issuer’s signing key from the published JWKS, check the ES256 signature,
validate the standard claims (iat / exp / nbf, and audience if
provided), confirm the payload matches the credential-type schema, look up
the live revocation status, and — for agent credentials — evaluate the
authorization policy against the supplied request context.
Verification outcomes (revoked, expired, signature mismatch, policy denied,
etc.) return HTTP 200 with { valid: false, reason } so callers can branch
on outcome without try/catching transport errors. Only infrastructure
failures use the error envelope.
curl --request POST \
--url https://api.example.com/v1/credentials/verify \
--header 'Content-Type: application/json' \
--data '
{
"credential": "<string>",
"context": {
"resource_type": "<string>",
"resource_id": "<string>",
"action": "<string>",
"transaction_amount": 1,
"transaction_currency": "<string>",
"merchant_category": "<string>",
"merchant_id": "<string>",
"time_of_day": "<string>",
"user_country": "<string>",
"audience": "<string>"
},
"by_credential_id": "<string>"
}
'import requests
url = "https://api.example.com/v1/credentials/verify"
payload = {
"credential": "<string>",
"context": {
"resource_type": "<string>",
"resource_id": "<string>",
"action": "<string>",
"transaction_amount": 1,
"transaction_currency": "<string>",
"merchant_category": "<string>",
"merchant_id": "<string>",
"time_of_day": "<string>",
"user_country": "<string>",
"audience": "<string>"
},
"by_credential_id": "<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({
credential: '<string>',
context: {
resource_type: '<string>',
resource_id: '<string>',
action: '<string>',
transaction_amount: 1,
transaction_currency: '<string>',
merchant_category: '<string>',
merchant_id: '<string>',
time_of_day: '<string>',
user_country: '<string>',
audience: '<string>'
},
by_credential_id: '<string>'
})
};
fetch('https://api.example.com/v1/credentials/verify', 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/v1/credentials/verify",
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([
'credential' => '<string>',
'context' => [
'resource_type' => '<string>',
'resource_id' => '<string>',
'action' => '<string>',
'transaction_amount' => 1,
'transaction_currency' => '<string>',
'merchant_category' => '<string>',
'merchant_id' => '<string>',
'time_of_day' => '<string>',
'user_country' => '<string>',
'audience' => '<string>'
],
'by_credential_id' => '<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/v1/credentials/verify"
payload := strings.NewReader("{\n \"credential\": \"<string>\",\n \"context\": {\n \"resource_type\": \"<string>\",\n \"resource_id\": \"<string>\",\n \"action\": \"<string>\",\n \"transaction_amount\": 1,\n \"transaction_currency\": \"<string>\",\n \"merchant_category\": \"<string>\",\n \"merchant_id\": \"<string>\",\n \"time_of_day\": \"<string>\",\n \"user_country\": \"<string>\",\n \"audience\": \"<string>\"\n },\n \"by_credential_id\": \"<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/v1/credentials/verify")
.header("Content-Type", "application/json")
.body("{\n \"credential\": \"<string>\",\n \"context\": {\n \"resource_type\": \"<string>\",\n \"resource_id\": \"<string>\",\n \"action\": \"<string>\",\n \"transaction_amount\": 1,\n \"transaction_currency\": \"<string>\",\n \"merchant_category\": \"<string>\",\n \"merchant_id\": \"<string>\",\n \"time_of_day\": \"<string>\",\n \"user_country\": \"<string>\",\n \"audience\": \"<string>\"\n },\n \"by_credential_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/credentials/verify")
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 \"credential\": \"<string>\",\n \"context\": {\n \"resource_type\": \"<string>\",\n \"resource_id\": \"<string>\",\n \"action\": \"<string>\",\n \"transaction_amount\": 1,\n \"transaction_currency\": \"<string>\",\n \"merchant_category\": \"<string>\",\n \"merchant_id\": \"<string>\",\n \"time_of_day\": \"<string>\",\n \"user_country\": \"<string>\",\n \"audience\": \"<string>\"\n },\n \"by_credential_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"valid": true,
"credential_id": "<string>",
"issuer_did": "<string>",
"subject": {
"type": "organisation",
"id": "<string>",
"registration_number": "<string>",
"jurisdiction": "<string>",
"legal_form": "<string>",
"registered_name": "<string>",
"trading_name": "<string>",
"founded_year": 123,
"website": "<string>",
"sector": "<string>"
},
"issued_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"verified_at": "2023-11-07T05:31:56Z",
"verification_id": "<string>",
"attestation_type": "<string>",
"policy_match": {
"matched": true,
"permission_index": 1,
"conditions_evaluated": [
{
"field": "<string>",
"op": "<string>"
}
],
"deny_reason": "<string>"
},
"evidence_refs": []
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"issue": "<string>",
"field": "<string>",
"hint": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"issue": "<string>",
"field": "<string>",
"hint": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"issue": "<string>",
"field": "<string>",
"hint": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"issue": "<string>",
"field": "<string>",
"hint": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"issue": "<string>",
"field": "<string>",
"hint": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"issue": "<string>",
"field": "<string>",
"hint": "<string>"
}
],
"request_id": "<string>"
}
}Body
Response
Verification result — valid: true on success, valid: false with reason on domain-level failure
- Option 1
- Option 2
true business, user, agent_authorization, outcome_attestation - Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
Show child attributes
Show child attributes
active, revoked, expired, suspended self_attested, liveness_verified, idv_verified, enterprise_verified Show child attributes
Show child attributes
501 - 512Was this page helpful?