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://{instance}.{env}.on-hellgate.cloud/api/admin/types \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--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://{instance}.{env}.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 = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', '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://{instance}.{env}.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://{instance}.{env}.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 => [
"Authorization: Bearer <token>",
"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://{instance}.{env}.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("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{instance}.{env}.on-hellgate.cloud/api/admin/types")
.header("Authorization", "Bearer <token>")
.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://{instance}.{env}.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["Authorization"] = 'Bearer <token>'
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
bearerAuthAPIKey
JWT bearer token obtained via the OAuth2 client-credentials grant from the platform Authentication API. The token's scopes gate the endpoints it may call, and its audience names the Guardian instance. This is the standard way to authenticate to Guardian.
Body
application/json
A display name for the type
Example:
"Loyalty Card"
JSON Schema definition according to https://json-schema.org/draft/2020-12/schema
Example:
{
"type": "object",
"properties": { "number": { "type": "string" } }
}
Response
Success response
Example:
"9e5b3f7d-2c8a-4b6e-a1d9-6f4c8b2e5a7d"
Example:
"2026-01-05T12:00:00Z"
A display name for the type
Example:
"Loyalty Card"
JSON Schema definition according to https://json-schema.org/draft/2020-12/schema
Example:
{
"type": "object",
"properties": { "number": { "type": "string" } }
}
⌘I
Create type
curl --request POST \
--url https://{instance}.{env}.on-hellgate.cloud/api/admin/types \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--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://{instance}.{env}.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 = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', '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://{instance}.{env}.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://{instance}.{env}.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 => [
"Authorization: Bearer <token>",
"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://{instance}.{env}.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("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{instance}.{env}.on-hellgate.cloud/api/admin/types")
.header("Authorization", "Bearer <token>")
.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://{instance}.{env}.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["Authorization"] = 'Bearer <token>'
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"
}
]
}