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

# Build

> Build a raw message from an MTI and field values.



## OpenAPI

````yaml /rest/openapi.json post /build
openapi: 3.1.0
info:
  description: >-
    Parse, build, validate, explain, generate and convert ISO 8583 messages.
    Intended for testing: there is no authentication. Only use test card
    numbers.
  title: ISO8583 Simulator API
  version: '1'
servers:
  - description: Public demo (LLM features off)
    url: https://api.iso8583sim.com
  - description: Local server (iso8583sim web)
    url: http://127.0.0.1:8000
security: []
paths:
  /build:
    post:
      tags:
        - Messages
      summary: Build
      description: Build a raw message from an MTI and field values.
      operationId: build_build_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BuildRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuildResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    BuildRequest:
      properties:
        fields:
          additionalProperties:
            maxLength: 1998
            type: string
          examples:
            - '2': '4111111111111111'
              '3': '000000'
              '4': '000000001000'
          maxProperties: 128
          title: Fields
          type: object
        mti:
          examples:
            - '0100'
          pattern: ^\d{4}$
          title: Mti
          type: string
        network:
          anyOf:
            - $ref: '#/components/schemas/CardNetwork'
            - type: 'null'
        version:
          $ref: '#/components/schemas/ISO8583Version'
          default: '1987'
      required:
        - mti
        - fields
      title: BuildRequest
      type: object
    BuildResponse:
      properties:
        length:
          title: Length
          type: integer
        message:
          title: Message
          type: string
      required:
        - message
        - length
      title: BuildResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    CardNetwork:
      description: Card network identifiers
      enum:
        - VISA
        - MASTERCARD
        - AMEX
        - DISCOVER
        - JCB
        - UNIONPAY
      title: CardNetwork
      type: string
    ISO8583Version:
      description: ISO 8583 protocol versions
      enum:
        - '1987'
        - '1993'
        - '2003'
      title: ISO8583Version
      type: string
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.