metadata.type.define

Create Metadata type and its fields definitions.

POST http://api.kompliant.com/metadata.type.define (OpenAPI specification)

Usage Info

Use this endpoint when creating a metadata type and its fields definition. The metadata type is used to capture metadata details for entities like Business, Person, BandAccount & Location.

Request

Authentication: KSig1-HMAC-SHA256

Parameters

ParameterTypeRequiredDescription
account_idstringYesThe account where the metadata type will be created. The Account ID is supplied to you when you receive your credentials.
metadata_typestringYesIdentifier for the metadata category being defined (e.g. ip_address, device_info).
descriptionstringNoExplanation of what the metadata_type represents.
fieldsobjectYesA dynamic object defining the schema of metadata details.

Each key represents a metadata field name, and its value is a field definition object

The field definition parameters is defined in the tables below
max_countintegerNoMaximum number of metadata details entries of this type allowed per subject record.

Allowed values are: -1 or any positive integer.

Notes:

- Defaults to -1.
- Value -1 represents no limit.

Field Definition Parameters

ParameterTypeRequiredDescription
typestringYesData type of the field value.

Allowed types are: string, integer and boolean.
requiredbooleanNoWhether the field is mandatory.
descriptionstringNoExplanation of what the field represents.
formatstringNoAdditional formatting constraint supported for the field.

Must be one of METADATA_DEFINITION_FIELDS_FORMAT .

Example

{
  "metadata_type": "IP_ADDRESS",
  "description": "Metadata for IP address",
  "fields": {
    "ip_address_v4": {
      "type": "string",
      "format": "ipv4",
      "description": "The IPv4 address.",
      "required": true
    },
    "ip_address_v6": {
      "type": "string",
      "format": "ipv6",
      "description": "The IPv6 address."
    },
    "event_source": {
      "type": "string",
      "description": "Source of the event."
    }
  },
  "max_count": -1
}

Response

Data

An empty data object is returned when the completion is successful.

Example

{
  "meta": {
    "status": "SUCCESS",
    "trace_id": "trc_6zNzQZHSf26V83BO3uW6dS",
    "version": "2025-03-24"
  },
  "data": {}
}

Errors

Error CodeHTTP CodePossible Cause
BAD_REQUEST400Required parameters not provided or attributes are invalid.

Metadata type is already defined for the account or is defined at SYSTEM/INTERNAL level.
ENTITY_NOT_FOUND400Any of the provided Ids do not exist.