> ## Documentation Index
> Fetch the complete documentation index at: https://developer.hellgate.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create type

> Create a type on Guardian, which can be used to define a schema for generic tokens.




## OpenAPI

````yaml /products/guardian/openapi.yaml post /api/admin/types
openapi: 3.1.0
info:
  title: Guardian API
  version: '1.0'
  contact:
    name: Starfish GmbH & Co. KG
    email: support@hellgate.io
    url: https://hellgate.io/cpa/guardian
  license:
    name: Hellgate API Terms
    url: https://hellgate.io/terms-and-conditions
servers:
  - url: https://{instance}.{env}.on-hellgate.cloud
    description: Managed instance of Guardian
    variables:
      instance:
        default: my-instance
        description: Your unique instance slug, provided during onboarding.
      env:
        default: eu1
        description: Deployment environment (currently eu1).
security: []
tags:
  - name: pci
    description: Management of card payment credentials under the ruling of PCI DSS.
  - name: network
    description: Management of network tokens and cryptograms for secure transactions.
  - name: generic
    description: Management of generic tokens and their schemas for various use cases.
  - name: metadata
    description: Inquiries for card metadata based on PAN, PCI tokens, or network tokens.
  - name: wallet
    description: >-
      Management of wallet tokens ingested from device wallets such as Google
      Pay.
  - name: apikey
    description: Management of API keys for service access.
  - name: webhook
    description: Management of webhooks for event notifications.
  - name: types
    description: Management of types for generic token schemas.
paths:
  /api/admin/types:
    post:
      tags:
        - types
      summary: Create type
      description: >
        Create a type on Guardian, which can be used to define a schema for
        generic tokens.
      operationId: admin_type_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/type_create_request'
            examples:
              sepa_schema:
                summary: Example Payload for SEPA Credentials
                value:
                  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
      responses:
        '200':
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type'
              examples:
                sepa_schema:
                  summary: Example Payload for SEPA Credentials
                  value:
                    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
        '401':
          $ref: '#/components/responses/401_UnauthorizedError'
        '403':
          $ref: '#/components/responses/403_ForbiddenError'
        '409':
          $ref: '#/components/responses/409_ConflictError'
        '422':
          $ref: '#/components/responses/422_ValidationError'
      security:
        - bearerAuth: []
        - APIKey: []
components:
  schemas:
    type_create_request:
      type: object
      properties:
        name:
          example: Loyalty Card
          type: string
          description: A display name for the type
        schema:
          example:
            type: object
            properties:
              number:
                type: string
          type: object
          description: >-
            JSON Schema definition according to
            https://json-schema.org/draft/2020-12/schema
      required:
        - name
        - schema
    type:
      type: object
      properties:
        id:
          example: 9e5b3f7d-2c8a-4b6e-a1d9-6f4c8b2e5a7d
          type: string
          format: uuid
        created_at:
          example: '2026-01-05T12:00:00Z'
          type: string
          format: date-time
        name:
          example: Loyalty Card
          type: string
          description: A display name for the type
        schema:
          example:
            type: object
            properties:
              number:
                type: string
          type: object
          description: >-
            JSON Schema definition according to
            https://json-schema.org/draft/2020-12/schema
    ErrorGeneric:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/ErrorStatusCode'
        classifier:
          $ref: '#/components/schemas/ErrorClassifier'
        message:
          $ref: '#/components/schemas/ErrorMessage'
    ErrorValidation:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/ErrorStatusCode'
        classifier:
          $ref: '#/components/schemas/ErrorClassifier'
        message:
          $ref: '#/components/schemas/ErrorMessage'
        validation_errors:
          type: array
          items:
            type: object
            properties:
              path:
                example: $.source.account_number
                type: string
                description: Json-path in the request which points to the validation error
              message:
                example: is required
                type: string
                description: Human readable validation message
    ErrorStatusCode:
      type: integer
      description: The corresponding HTTP status code for the error
    ErrorClassifier:
      type: string
      description: Technical code that helps to identify the error
    ErrorMessage:
      type: string
      description: Human readable representation of the error
  responses:
    401_UnauthorizedError:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorGeneric'
          example:
            code: 401
            message: No valid means of authentication was provided
            classifier: UNAUTHORIZED
    403_ForbiddenError:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorGeneric'
          example:
            code: 403
            message: Not allowed to access this resource or feature
            classifier: FORBIDDEN
    409_ConflictError:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorGeneric'
          example:
            code: 409
            message: Conflict
            classifier: CONFLICT
    422_ValidationError:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorValidation'
          example:
            code: 422
            classifier: VALIDATION_ERROR
            message: Validation error
            validation_errors:
              - path: json-path
                message: human readable error message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        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.
    APIKey:
      type: apiKey
      name: x-api-key
      in: header
      description: >-
        Deprecated. Long-lived instance API key, sent as `x-api-key`. Existing
        integrations continue to work, but new ones should use the OAuth2 bearer
        token instead.

````