Issue a credential
curl --request POST \
--url https://api.example.com/v1/credentials \
--header 'Content-Type: application/json' \
--data '
{
"credential_type": "business",
"self_attestation_complete": "<unknown>",
"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>"
},
"claims": {
"beneficial_owners": [
{
"full_name": "<string>",
"ownership_percent": 50,
"person_id": "<string>",
"role": "<string>"
}
],
"tax_id_verified": true,
"jurisdiction": "<string>",
"vat_number": "<string>",
"incorporation_date": "<string>",
"lei_code": "<string>",
"regulatory_licenses": [
{
"type": "<string>",
"license_number": "<string>",
"status": "<string>",
"jurisdiction": "<string>",
"issued_at": "<string>",
"lapsed_at": "<string>",
"regulator_url": "<string>"
}
],
"bank_account_verified": true,
"bank_account_country": "<string>",
"bank_sort_code_hash": "<string>",
"screening_provider": "<string>",
"last_reviewed_at": "2023-11-07T05:31:56Z",
"next_review_due": "2023-11-07T05:31:56Z"
},
"evidence_refs": [],
"ttl": "P1Y"
}
'import requests
url = "https://api.example.com/v1/credentials"
payload = {
"credential_type": "business",
"self_attestation_complete": "<unknown>",
"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>"
},
"claims": {
"beneficial_owners": [
{
"full_name": "<string>",
"ownership_percent": 50,
"person_id": "<string>",
"role": "<string>"
}
],
"tax_id_verified": True,
"jurisdiction": "<string>",
"vat_number": "<string>",
"incorporation_date": "<string>",
"lei_code": "<string>",
"regulatory_licenses": [
{
"type": "<string>",
"license_number": "<string>",
"status": "<string>",
"jurisdiction": "<string>",
"issued_at": "<string>",
"lapsed_at": "<string>",
"regulator_url": "<string>"
}
],
"bank_account_verified": True,
"bank_account_country": "<string>",
"bank_sort_code_hash": "<string>",
"screening_provider": "<string>",
"last_reviewed_at": "2023-11-07T05:31:56Z",
"next_review_due": "2023-11-07T05:31:56Z"
},
"evidence_refs": [],
"ttl": "P1Y"
}
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_type: 'business',
self_attestation_complete: '<unknown>',
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>'
},
claims: {
beneficial_owners: [
{
full_name: '<string>',
ownership_percent: 50,
person_id: '<string>',
role: '<string>'
}
],
tax_id_verified: true,
jurisdiction: '<string>',
vat_number: '<string>',
incorporation_date: '<string>',
lei_code: '<string>',
regulatory_licenses: [
{
type: '<string>',
license_number: '<string>',
status: '<string>',
jurisdiction: '<string>',
issued_at: '<string>',
lapsed_at: '<string>',
regulator_url: '<string>'
}
],
bank_account_verified: true,
bank_account_country: '<string>',
bank_sort_code_hash: '<string>',
screening_provider: '<string>',
last_reviewed_at: '2023-11-07T05:31:56Z',
next_review_due: '2023-11-07T05:31:56Z'
},
evidence_refs: [],
ttl: 'P1Y'
})
};
fetch('https://api.example.com/v1/credentials', 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",
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_type' => 'business',
'self_attestation_complete' => '<unknown>',
'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>'
],
'claims' => [
'beneficial_owners' => [
[
'full_name' => '<string>',
'ownership_percent' => 50,
'person_id' => '<string>',
'role' => '<string>'
]
],
'tax_id_verified' => true,
'jurisdiction' => '<string>',
'vat_number' => '<string>',
'incorporation_date' => '<string>',
'lei_code' => '<string>',
'regulatory_licenses' => [
[
'type' => '<string>',
'license_number' => '<string>',
'status' => '<string>',
'jurisdiction' => '<string>',
'issued_at' => '<string>',
'lapsed_at' => '<string>',
'regulator_url' => '<string>'
]
],
'bank_account_verified' => true,
'bank_account_country' => '<string>',
'bank_sort_code_hash' => '<string>',
'screening_provider' => '<string>',
'last_reviewed_at' => '2023-11-07T05:31:56Z',
'next_review_due' => '2023-11-07T05:31:56Z'
],
'evidence_refs' => [
],
'ttl' => 'P1Y'
]),
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"
payload := strings.NewReader("{\n \"credential_type\": \"business\",\n \"self_attestation_complete\": \"<unknown>\",\n \"subject\": {\n \"type\": \"organisation\",\n \"id\": \"<string>\",\n \"registration_number\": \"<string>\",\n \"jurisdiction\": \"<string>\",\n \"legal_form\": \"<string>\",\n \"registered_name\": \"<string>\",\n \"trading_name\": \"<string>\",\n \"founded_year\": 123,\n \"website\": \"<string>\",\n \"sector\": \"<string>\"\n },\n \"claims\": {\n \"beneficial_owners\": [\n {\n \"full_name\": \"<string>\",\n \"ownership_percent\": 50,\n \"person_id\": \"<string>\",\n \"role\": \"<string>\"\n }\n ],\n \"tax_id_verified\": true,\n \"jurisdiction\": \"<string>\",\n \"vat_number\": \"<string>\",\n \"incorporation_date\": \"<string>\",\n \"lei_code\": \"<string>\",\n \"regulatory_licenses\": [\n {\n \"type\": \"<string>\",\n \"license_number\": \"<string>\",\n \"status\": \"<string>\",\n \"jurisdiction\": \"<string>\",\n \"issued_at\": \"<string>\",\n \"lapsed_at\": \"<string>\",\n \"regulator_url\": \"<string>\"\n }\n ],\n \"bank_account_verified\": true,\n \"bank_account_country\": \"<string>\",\n \"bank_sort_code_hash\": \"<string>\",\n \"screening_provider\": \"<string>\",\n \"last_reviewed_at\": \"2023-11-07T05:31:56Z\",\n \"next_review_due\": \"2023-11-07T05:31:56Z\"\n },\n \"evidence_refs\": [],\n \"ttl\": \"P1Y\"\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")
.header("Content-Type", "application/json")
.body("{\n \"credential_type\": \"business\",\n \"self_attestation_complete\": \"<unknown>\",\n \"subject\": {\n \"type\": \"organisation\",\n \"id\": \"<string>\",\n \"registration_number\": \"<string>\",\n \"jurisdiction\": \"<string>\",\n \"legal_form\": \"<string>\",\n \"registered_name\": \"<string>\",\n \"trading_name\": \"<string>\",\n \"founded_year\": 123,\n \"website\": \"<string>\",\n \"sector\": \"<string>\"\n },\n \"claims\": {\n \"beneficial_owners\": [\n {\n \"full_name\": \"<string>\",\n \"ownership_percent\": 50,\n \"person_id\": \"<string>\",\n \"role\": \"<string>\"\n }\n ],\n \"tax_id_verified\": true,\n \"jurisdiction\": \"<string>\",\n \"vat_number\": \"<string>\",\n \"incorporation_date\": \"<string>\",\n \"lei_code\": \"<string>\",\n \"regulatory_licenses\": [\n {\n \"type\": \"<string>\",\n \"license_number\": \"<string>\",\n \"status\": \"<string>\",\n \"jurisdiction\": \"<string>\",\n \"issued_at\": \"<string>\",\n \"lapsed_at\": \"<string>\",\n \"regulator_url\": \"<string>\"\n }\n ],\n \"bank_account_verified\": true,\n \"bank_account_country\": \"<string>\",\n \"bank_sort_code_hash\": \"<string>\",\n \"screening_provider\": \"<string>\",\n \"last_reviewed_at\": \"2023-11-07T05:31:56Z\",\n \"next_review_due\": \"2023-11-07T05:31:56Z\"\n },\n \"evidence_refs\": [],\n \"ttl\": \"P1Y\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/credentials")
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_type\": \"business\",\n \"self_attestation_complete\": \"<unknown>\",\n \"subject\": {\n \"type\": \"organisation\",\n \"id\": \"<string>\",\n \"registration_number\": \"<string>\",\n \"jurisdiction\": \"<string>\",\n \"legal_form\": \"<string>\",\n \"registered_name\": \"<string>\",\n \"trading_name\": \"<string>\",\n \"founded_year\": 123,\n \"website\": \"<string>\",\n \"sector\": \"<string>\"\n },\n \"claims\": {\n \"beneficial_owners\": [\n {\n \"full_name\": \"<string>\",\n \"ownership_percent\": 50,\n \"person_id\": \"<string>\",\n \"role\": \"<string>\"\n }\n ],\n \"tax_id_verified\": true,\n \"jurisdiction\": \"<string>\",\n \"vat_number\": \"<string>\",\n \"incorporation_date\": \"<string>\",\n \"lei_code\": \"<string>\",\n \"regulatory_licenses\": [\n {\n \"type\": \"<string>\",\n \"license_number\": \"<string>\",\n \"status\": \"<string>\",\n \"jurisdiction\": \"<string>\",\n \"issued_at\": \"<string>\",\n \"lapsed_at\": \"<string>\",\n \"regulator_url\": \"<string>\"\n }\n ],\n \"bank_account_verified\": true,\n \"bank_account_country\": \"<string>\",\n \"bank_sort_code_hash\": \"<string>\",\n \"screening_provider\": \"<string>\",\n \"last_reviewed_at\": \"2023-11-07T05:31:56Z\",\n \"next_review_due\": \"2023-11-07T05:31:56Z\"\n },\n \"evidence_refs\": [],\n \"ttl\": \"P1Y\"\n}"
response = http.request(request)
puts response.read_body{
"credential_type": "business",
"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>"
},
"claims": {
"registered_address": {
"line1": "<string>",
"city": "<string>",
"country": "<string>",
"line2": "<string>",
"state_or_region": "<string>",
"postal_code": "<string>"
},
"beneficial_owners": [
{
"full_name": "<string>",
"ownership_percent": 50,
"person_id": "<string>",
"role": "<string>"
}
],
"tax_id_verified": true,
"jurisdiction": "<string>",
"vat_number": "<string>",
"incorporation_date": "<string>",
"lei_code": "<string>",
"regulatory_licenses": [
{
"type": "<string>",
"license_number": "<string>",
"status": "<string>",
"jurisdiction": "<string>",
"issued_at": "<string>",
"lapsed_at": "<string>",
"regulator_url": "<string>"
}
],
"bank_account_verified": true,
"bank_account_country": "<string>",
"bank_sort_code_hash": "<string>",
"screening_provider": "<string>",
"last_reviewed_at": "2023-11-07T05:31:56Z",
"next_review_due": "2023-11-07T05:31:56Z"
},
"id": "<string>",
"credential_id": "<string>",
"issuer_did": "<string>",
"status_list_index": 1,
"alg": "ES256",
"kid": "<string>",
"signed_payload": "<string>",
"evidence_refs": [
"<string>"
],
"issued_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"vct": "<string>",
"revoked_at": "2023-11-07T05:31:56Z",
"revocation_reason": "<string>",
"created_via": "api",
"developer_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>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"issue": "<string>",
"field": "<string>",
"hint": "<string>"
}
],
"request_id": "<string>"
}
}Credentials API
Issue a Credential
Issue a new credential of one of four types — business, user,
agent_authorization, or outcome_attestation — discriminated by the
credential_type field in the request body.
Returns a fully signed JWT-VC in signed_payload alongside the persisted
credential resource. The JWT follows the W3C Verifiable Credentials 2.0
profile, is signed with ES256, and includes a Status List 2021 entry so it
can be verified and revocation-checked by any compliant verifier.
POST
/
v1
/
credentials
Issue a credential
curl --request POST \
--url https://api.example.com/v1/credentials \
--header 'Content-Type: application/json' \
--data '
{
"credential_type": "business",
"self_attestation_complete": "<unknown>",
"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>"
},
"claims": {
"beneficial_owners": [
{
"full_name": "<string>",
"ownership_percent": 50,
"person_id": "<string>",
"role": "<string>"
}
],
"tax_id_verified": true,
"jurisdiction": "<string>",
"vat_number": "<string>",
"incorporation_date": "<string>",
"lei_code": "<string>",
"regulatory_licenses": [
{
"type": "<string>",
"license_number": "<string>",
"status": "<string>",
"jurisdiction": "<string>",
"issued_at": "<string>",
"lapsed_at": "<string>",
"regulator_url": "<string>"
}
],
"bank_account_verified": true,
"bank_account_country": "<string>",
"bank_sort_code_hash": "<string>",
"screening_provider": "<string>",
"last_reviewed_at": "2023-11-07T05:31:56Z",
"next_review_due": "2023-11-07T05:31:56Z"
},
"evidence_refs": [],
"ttl": "P1Y"
}
'import requests
url = "https://api.example.com/v1/credentials"
payload = {
"credential_type": "business",
"self_attestation_complete": "<unknown>",
"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>"
},
"claims": {
"beneficial_owners": [
{
"full_name": "<string>",
"ownership_percent": 50,
"person_id": "<string>",
"role": "<string>"
}
],
"tax_id_verified": True,
"jurisdiction": "<string>",
"vat_number": "<string>",
"incorporation_date": "<string>",
"lei_code": "<string>",
"regulatory_licenses": [
{
"type": "<string>",
"license_number": "<string>",
"status": "<string>",
"jurisdiction": "<string>",
"issued_at": "<string>",
"lapsed_at": "<string>",
"regulator_url": "<string>"
}
],
"bank_account_verified": True,
"bank_account_country": "<string>",
"bank_sort_code_hash": "<string>",
"screening_provider": "<string>",
"last_reviewed_at": "2023-11-07T05:31:56Z",
"next_review_due": "2023-11-07T05:31:56Z"
},
"evidence_refs": [],
"ttl": "P1Y"
}
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_type: 'business',
self_attestation_complete: '<unknown>',
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>'
},
claims: {
beneficial_owners: [
{
full_name: '<string>',
ownership_percent: 50,
person_id: '<string>',
role: '<string>'
}
],
tax_id_verified: true,
jurisdiction: '<string>',
vat_number: '<string>',
incorporation_date: '<string>',
lei_code: '<string>',
regulatory_licenses: [
{
type: '<string>',
license_number: '<string>',
status: '<string>',
jurisdiction: '<string>',
issued_at: '<string>',
lapsed_at: '<string>',
regulator_url: '<string>'
}
],
bank_account_verified: true,
bank_account_country: '<string>',
bank_sort_code_hash: '<string>',
screening_provider: '<string>',
last_reviewed_at: '2023-11-07T05:31:56Z',
next_review_due: '2023-11-07T05:31:56Z'
},
evidence_refs: [],
ttl: 'P1Y'
})
};
fetch('https://api.example.com/v1/credentials', 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",
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_type' => 'business',
'self_attestation_complete' => '<unknown>',
'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>'
],
'claims' => [
'beneficial_owners' => [
[
'full_name' => '<string>',
'ownership_percent' => 50,
'person_id' => '<string>',
'role' => '<string>'
]
],
'tax_id_verified' => true,
'jurisdiction' => '<string>',
'vat_number' => '<string>',
'incorporation_date' => '<string>',
'lei_code' => '<string>',
'regulatory_licenses' => [
[
'type' => '<string>',
'license_number' => '<string>',
'status' => '<string>',
'jurisdiction' => '<string>',
'issued_at' => '<string>',
'lapsed_at' => '<string>',
'regulator_url' => '<string>'
]
],
'bank_account_verified' => true,
'bank_account_country' => '<string>',
'bank_sort_code_hash' => '<string>',
'screening_provider' => '<string>',
'last_reviewed_at' => '2023-11-07T05:31:56Z',
'next_review_due' => '2023-11-07T05:31:56Z'
],
'evidence_refs' => [
],
'ttl' => 'P1Y'
]),
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"
payload := strings.NewReader("{\n \"credential_type\": \"business\",\n \"self_attestation_complete\": \"<unknown>\",\n \"subject\": {\n \"type\": \"organisation\",\n \"id\": \"<string>\",\n \"registration_number\": \"<string>\",\n \"jurisdiction\": \"<string>\",\n \"legal_form\": \"<string>\",\n \"registered_name\": \"<string>\",\n \"trading_name\": \"<string>\",\n \"founded_year\": 123,\n \"website\": \"<string>\",\n \"sector\": \"<string>\"\n },\n \"claims\": {\n \"beneficial_owners\": [\n {\n \"full_name\": \"<string>\",\n \"ownership_percent\": 50,\n \"person_id\": \"<string>\",\n \"role\": \"<string>\"\n }\n ],\n \"tax_id_verified\": true,\n \"jurisdiction\": \"<string>\",\n \"vat_number\": \"<string>\",\n \"incorporation_date\": \"<string>\",\n \"lei_code\": \"<string>\",\n \"regulatory_licenses\": [\n {\n \"type\": \"<string>\",\n \"license_number\": \"<string>\",\n \"status\": \"<string>\",\n \"jurisdiction\": \"<string>\",\n \"issued_at\": \"<string>\",\n \"lapsed_at\": \"<string>\",\n \"regulator_url\": \"<string>\"\n }\n ],\n \"bank_account_verified\": true,\n \"bank_account_country\": \"<string>\",\n \"bank_sort_code_hash\": \"<string>\",\n \"screening_provider\": \"<string>\",\n \"last_reviewed_at\": \"2023-11-07T05:31:56Z\",\n \"next_review_due\": \"2023-11-07T05:31:56Z\"\n },\n \"evidence_refs\": [],\n \"ttl\": \"P1Y\"\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")
.header("Content-Type", "application/json")
.body("{\n \"credential_type\": \"business\",\n \"self_attestation_complete\": \"<unknown>\",\n \"subject\": {\n \"type\": \"organisation\",\n \"id\": \"<string>\",\n \"registration_number\": \"<string>\",\n \"jurisdiction\": \"<string>\",\n \"legal_form\": \"<string>\",\n \"registered_name\": \"<string>\",\n \"trading_name\": \"<string>\",\n \"founded_year\": 123,\n \"website\": \"<string>\",\n \"sector\": \"<string>\"\n },\n \"claims\": {\n \"beneficial_owners\": [\n {\n \"full_name\": \"<string>\",\n \"ownership_percent\": 50,\n \"person_id\": \"<string>\",\n \"role\": \"<string>\"\n }\n ],\n \"tax_id_verified\": true,\n \"jurisdiction\": \"<string>\",\n \"vat_number\": \"<string>\",\n \"incorporation_date\": \"<string>\",\n \"lei_code\": \"<string>\",\n \"regulatory_licenses\": [\n {\n \"type\": \"<string>\",\n \"license_number\": \"<string>\",\n \"status\": \"<string>\",\n \"jurisdiction\": \"<string>\",\n \"issued_at\": \"<string>\",\n \"lapsed_at\": \"<string>\",\n \"regulator_url\": \"<string>\"\n }\n ],\n \"bank_account_verified\": true,\n \"bank_account_country\": \"<string>\",\n \"bank_sort_code_hash\": \"<string>\",\n \"screening_provider\": \"<string>\",\n \"last_reviewed_at\": \"2023-11-07T05:31:56Z\",\n \"next_review_due\": \"2023-11-07T05:31:56Z\"\n },\n \"evidence_refs\": [],\n \"ttl\": \"P1Y\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/credentials")
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_type\": \"business\",\n \"self_attestation_complete\": \"<unknown>\",\n \"subject\": {\n \"type\": \"organisation\",\n \"id\": \"<string>\",\n \"registration_number\": \"<string>\",\n \"jurisdiction\": \"<string>\",\n \"legal_form\": \"<string>\",\n \"registered_name\": \"<string>\",\n \"trading_name\": \"<string>\",\n \"founded_year\": 123,\n \"website\": \"<string>\",\n \"sector\": \"<string>\"\n },\n \"claims\": {\n \"beneficial_owners\": [\n {\n \"full_name\": \"<string>\",\n \"ownership_percent\": 50,\n \"person_id\": \"<string>\",\n \"role\": \"<string>\"\n }\n ],\n \"tax_id_verified\": true,\n \"jurisdiction\": \"<string>\",\n \"vat_number\": \"<string>\",\n \"incorporation_date\": \"<string>\",\n \"lei_code\": \"<string>\",\n \"regulatory_licenses\": [\n {\n \"type\": \"<string>\",\n \"license_number\": \"<string>\",\n \"status\": \"<string>\",\n \"jurisdiction\": \"<string>\",\n \"issued_at\": \"<string>\",\n \"lapsed_at\": \"<string>\",\n \"regulator_url\": \"<string>\"\n }\n ],\n \"bank_account_verified\": true,\n \"bank_account_country\": \"<string>\",\n \"bank_sort_code_hash\": \"<string>\",\n \"screening_provider\": \"<string>\",\n \"last_reviewed_at\": \"2023-11-07T05:31:56Z\",\n \"next_review_due\": \"2023-11-07T05:31:56Z\"\n },\n \"evidence_refs\": [],\n \"ttl\": \"P1Y\"\n}"
response = http.request(request)
puts response.read_body{
"credential_type": "business",
"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>"
},
"claims": {
"registered_address": {
"line1": "<string>",
"city": "<string>",
"country": "<string>",
"line2": "<string>",
"state_or_region": "<string>",
"postal_code": "<string>"
},
"beneficial_owners": [
{
"full_name": "<string>",
"ownership_percent": 50,
"person_id": "<string>",
"role": "<string>"
}
],
"tax_id_verified": true,
"jurisdiction": "<string>",
"vat_number": "<string>",
"incorporation_date": "<string>",
"lei_code": "<string>",
"regulatory_licenses": [
{
"type": "<string>",
"license_number": "<string>",
"status": "<string>",
"jurisdiction": "<string>",
"issued_at": "<string>",
"lapsed_at": "<string>",
"regulator_url": "<string>"
}
],
"bank_account_verified": true,
"bank_account_country": "<string>",
"bank_sort_code_hash": "<string>",
"screening_provider": "<string>",
"last_reviewed_at": "2023-11-07T05:31:56Z",
"next_review_due": "2023-11-07T05:31:56Z"
},
"id": "<string>",
"credential_id": "<string>",
"issuer_did": "<string>",
"status_list_index": 1,
"alg": "ES256",
"kid": "<string>",
"signed_payload": "<string>",
"evidence_refs": [
"<string>"
],
"issued_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"vct": "<string>",
"revoked_at": "2023-11-07T05:31:56Z",
"revocation_reason": "<string>",
"created_via": "api",
"developer_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>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"issue": "<string>",
"field": "<string>",
"hint": "<string>"
}
],
"request_id": "<string>"
}
}Body
application/json
- Option 1
- Option 2
- Option 3
- Option 4
Available options:
business Show child attributes
Show child attributes
Show child attributes
Show child attributes
Maximum array length:
50Required string length:
1 - 512Pattern:
^P[\dYMWDTHMS]+$/iResponse
Credential issued
- Option 1
- Option 2
- Option 3
- Option 4
Available options:
business - Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
active, revoked, expired, suspended Required range:
x >= 0Available options:
jwt_vc, sd_jwt_vc Available options:
ES256 Maximum array length:
50Required string length:
1 - 512Available options:
batch_mint, workflow_block, api, cli, mcp Was this page helpful?
⌘I