Types
Create type
Create a type on Guardian, which can be used to define a schema for generic tokens.
POST
/
api
/
admin
/
types
Create type
curl --request POST \
--url https://{cluster_id}.on-hellgate.cloud/api/admin/types \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Simple SEPA Schema",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
"iban",
"bic"
],
"properties": {
"iban": {
"type": "string",
"description": "International Bank Account Number (IBAN)"
},
"bic": {
"type": "string",
"description": "Bank Identifier Code (BIC / SWIFT)"
}
},
"additionalProperties": false
}
}
'import requests
url = "https://{cluster_id}.on-hellgate.cloud/api/admin/types"
payload = {
"name": "Simple SEPA Schema",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["iban", "bic"],
"properties": {
"iban": {
"type": "string",
"description": "International Bank Account Number (IBAN)"
},
"bic": {
"type": "string",
"description": "Bank Identifier Code (BIC / SWIFT)"
}
},
"additionalProperties": False
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Simple SEPA Schema',
schema: {
$schema: 'https://json-schema.org/draft/2020-12/schema',
type: 'object',
required: ['iban', 'bic'],
properties: {
iban: {type: 'string', description: 'International Bank Account Number (IBAN)'},
bic: {type: 'string', description: 'Bank Identifier Code (BIC / SWIFT)'}
},
additionalProperties: false
}
})
};
fetch('https://{cluster_id}.on-hellgate.cloud/api/admin/types', 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://{cluster_id}.on-hellgate.cloud/api/admin/types",
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' => 'Simple SEPA Schema',
'schema' => [
'$schema' => 'https://json-schema.org/draft/2020-12/schema',
'type' => 'object',
'required' => [
'iban',
'bic'
],
'properties' => [
'iban' => [
'type' => 'string',
'description' => 'International Bank Account Number (IBAN)'
],
'bic' => [
'type' => 'string',
'description' => 'Bank Identifier Code (BIC / SWIFT)'
]
],
'additionalProperties' => false
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://{cluster_id}.on-hellgate.cloud/api/admin/types"
payload := strings.NewReader("{\n \"name\": \"Simple SEPA Schema\",\n \"schema\": {\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"type\": \"object\",\n \"required\": [\n \"iban\",\n \"bic\"\n ],\n \"properties\": {\n \"iban\": {\n \"type\": \"string\",\n \"description\": \"International Bank Account Number (IBAN)\"\n },\n \"bic\": {\n \"type\": \"string\",\n \"description\": \"Bank Identifier Code (BIC / SWIFT)\"\n }\n },\n \"additionalProperties\": false\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://{cluster_id}.on-hellgate.cloud/api/admin/types")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Simple SEPA Schema\",\n \"schema\": {\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"type\": \"object\",\n \"required\": [\n \"iban\",\n \"bic\"\n ],\n \"properties\": {\n \"iban\": {\n \"type\": \"string\",\n \"description\": \"International Bank Account Number (IBAN)\"\n },\n \"bic\": {\n \"type\": \"string\",\n \"description\": \"Bank Identifier Code (BIC / SWIFT)\"\n }\n },\n \"additionalProperties\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{cluster_id}.on-hellgate.cloud/api/admin/types")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Simple SEPA Schema\",\n \"schema\": {\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"type\": \"object\",\n \"required\": [\n \"iban\",\n \"bic\"\n ],\n \"properties\": {\n \"iban\": {\n \"type\": \"string\",\n \"description\": \"International Bank Account Number (IBAN)\"\n },\n \"bic\": {\n \"type\": \"string\",\n \"description\": \"Bank Identifier Code (BIC / SWIFT)\"\n }\n },\n \"additionalProperties\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "c3b51d3b-1b39-4789-8c9b-842e4bbff7db",
"created_at": "2026-01-19T15:32:45+01:00",
"name": "Simple SEPA Schema",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
"iban",
"bic"
],
"properties": {
"iban": {
"type": "string",
"description": "International Bank Account Number (IBAN)"
},
"bic": {
"type": "string",
"description": "Bank Identifier Code (BIC / SWIFT)"
}
},
"additionalProperties": false
}
}{
"code": 401,
"message": "No valid means of authentication was provided",
"classifier": "UNAUTHORIZED"
}{
"code": 403,
"message": "Not allowed to access this resource or feature",
"classifier": "FORBIDDEN"
}{
"code": 409,
"message": "Conflict",
"classifier": "CONFLICT"
}{
"code": 422,
"classifier": "VALIDATION_ERROR",
"message": "Validation error",
"validation_errors": [
{
"path": "json-path",
"message": "human readable error message"
}
]
}Authorizations
APIKeyAdminToken
Body
application/json
A display name for the type
JSON Schema definition according to https://json-schema.org/draft/2020-12/schema
Response
Success response
A display name for the type
JSON Schema definition according to https://json-schema.org/draft/2020-12/schema
⌘I
Create type
curl --request POST \
--url https://{cluster_id}.on-hellgate.cloud/api/admin/types \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Simple SEPA Schema",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
"iban",
"bic"
],
"properties": {
"iban": {
"type": "string",
"description": "International Bank Account Number (IBAN)"
},
"bic": {
"type": "string",
"description": "Bank Identifier Code (BIC / SWIFT)"
}
},
"additionalProperties": false
}
}
'import requests
url = "https://{cluster_id}.on-hellgate.cloud/api/admin/types"
payload = {
"name": "Simple SEPA Schema",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["iban", "bic"],
"properties": {
"iban": {
"type": "string",
"description": "International Bank Account Number (IBAN)"
},
"bic": {
"type": "string",
"description": "Bank Identifier Code (BIC / SWIFT)"
}
},
"additionalProperties": False
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Simple SEPA Schema',
schema: {
$schema: 'https://json-schema.org/draft/2020-12/schema',
type: 'object',
required: ['iban', 'bic'],
properties: {
iban: {type: 'string', description: 'International Bank Account Number (IBAN)'},
bic: {type: 'string', description: 'Bank Identifier Code (BIC / SWIFT)'}
},
additionalProperties: false
}
})
};
fetch('https://{cluster_id}.on-hellgate.cloud/api/admin/types', 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://{cluster_id}.on-hellgate.cloud/api/admin/types",
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' => 'Simple SEPA Schema',
'schema' => [
'$schema' => 'https://json-schema.org/draft/2020-12/schema',
'type' => 'object',
'required' => [
'iban',
'bic'
],
'properties' => [
'iban' => [
'type' => 'string',
'description' => 'International Bank Account Number (IBAN)'
],
'bic' => [
'type' => 'string',
'description' => 'Bank Identifier Code (BIC / SWIFT)'
]
],
'additionalProperties' => false
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://{cluster_id}.on-hellgate.cloud/api/admin/types"
payload := strings.NewReader("{\n \"name\": \"Simple SEPA Schema\",\n \"schema\": {\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"type\": \"object\",\n \"required\": [\n \"iban\",\n \"bic\"\n ],\n \"properties\": {\n \"iban\": {\n \"type\": \"string\",\n \"description\": \"International Bank Account Number (IBAN)\"\n },\n \"bic\": {\n \"type\": \"string\",\n \"description\": \"Bank Identifier Code (BIC / SWIFT)\"\n }\n },\n \"additionalProperties\": false\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://{cluster_id}.on-hellgate.cloud/api/admin/types")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Simple SEPA Schema\",\n \"schema\": {\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"type\": \"object\",\n \"required\": [\n \"iban\",\n \"bic\"\n ],\n \"properties\": {\n \"iban\": {\n \"type\": \"string\",\n \"description\": \"International Bank Account Number (IBAN)\"\n },\n \"bic\": {\n \"type\": \"string\",\n \"description\": \"Bank Identifier Code (BIC / SWIFT)\"\n }\n },\n \"additionalProperties\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{cluster_id}.on-hellgate.cloud/api/admin/types")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Simple SEPA Schema\",\n \"schema\": {\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"type\": \"object\",\n \"required\": [\n \"iban\",\n \"bic\"\n ],\n \"properties\": {\n \"iban\": {\n \"type\": \"string\",\n \"description\": \"International Bank Account Number (IBAN)\"\n },\n \"bic\": {\n \"type\": \"string\",\n \"description\": \"Bank Identifier Code (BIC / SWIFT)\"\n }\n },\n \"additionalProperties\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "c3b51d3b-1b39-4789-8c9b-842e4bbff7db",
"created_at": "2026-01-19T15:32:45+01:00",
"name": "Simple SEPA Schema",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
"iban",
"bic"
],
"properties": {
"iban": {
"type": "string",
"description": "International Bank Account Number (IBAN)"
},
"bic": {
"type": "string",
"description": "Bank Identifier Code (BIC / SWIFT)"
}
},
"additionalProperties": false
}
}{
"code": 401,
"message": "No valid means of authentication was provided",
"classifier": "UNAUTHORIZED"
}{
"code": 403,
"message": "Not allowed to access this resource or feature",
"classifier": "FORBIDDEN"
}{
"code": 409,
"message": "Conflict",
"classifier": "CONFLICT"
}{
"code": 422,
"classifier": "VALIDATION_ERROR",
"message": "Validation error",
"validation_errors": [
{
"path": "json-path",
"message": "human readable error message"
}
]
}