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

# Mail Checks

> Create multiple mail checks in one single request.



## OpenAPI

````yaml POST /mailchecks
openapi: 3.0.1
info:
  title: Online Check Writer API
  description: API documentation for creating and managing mail checks.
  version: 1.0.0
servers:
  - url: https://test.onlinecheckwriter.com/api/v3
    description: Test server
  - url: https://app.onlinecheckwriter.com/api/v3
    description: Production server
security: []
paths:
  /mailchecks:
    post:
      tags:
        - Mail Checks
      summary: Create New Mail Checks
      description: Create multiple mail checks in one single request.
      requestBody:
        description: Payload to specify the mail checks and their attributes.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                isShippingToCustomAddress:
                  type: boolean
                  description: >-
                    Value is `true` if sending mail to custom address. Defaults
                    to `false`.
                  example: false
                customFromAddressId:
                  type: string
                  description: >-
                    Must be a custom 'from' address ID. Required if
                    `isShippingToCustomAddress` is `true`.
                  example: uJ7hGddEnmG1X7e
                customToAddressId:
                  type: string
                  description: >-
                    Must be a custom 'to' address ID. Required if
                    `isShippingToCustomAddress` is `true`.
                  example: dfGYGddEnmG1X7r
                customShippingTypeId:
                  type: string
                  description: >-
                    Must be a valid custom shipping type ID. Required if
                    `isShippingToCustomAddress` is `true`.
                  example: '1'
                mailChecks:
                  type: array
                  description: An array of mail check attributes.
                  items:
                    type: object
                    properties:
                      checkId:
                        type: string
                        description: Must be a valid check ID.
                        example: bL3YGddEnmG1X7w
                      shippingTypeId:
                        type: integer
                        description: >-
                          Must be a valid `shippingTypeId`. Available values:


                          1 - First Class

                          3 - First Class with Tracking

                          4 - Priority Mail

                          5 - Express Mail

                          12 - Standard Overnight - FedEx by 3 pm the next
                          business day

                          20 - FedEx Saturday Delivery.
                        example: 3
                      paperTypeId:
                        type: integer
                        description: |-
                          Must be a valid `paperTypeId`. Available values:

                          7 - Regular Check Paper
                          8 - Hologram Check Paper
                          9 - Ultra Hologram Check Paper.
                        example: 7
                      informTypeId:
                        type: integer
                        description: |-
                          Must be a valid `informTypeId`. Available values:

                          10 - Notify Receiver by SMS.
                        example: 10
                      enableSmsInform:
                        type: boolean
                        description: Enable SMS notifications. Defaults to `false`.
                        example: false
                      enableEmailInform:
                        type: boolean
                        description: Enable email notifications. Defaults to `false`.
                        example: true
                      payeeEmail:
                        type: string
                        description: >-
                          Required if `enableEmailInform` is `true` and no email
                          exists for the associated payee.
                        example: email@test.com
                      payeePhone:
                        type: string
                        description: >-
                          Required if `enableSmsInform` is `true` and no phone
                          exists for the associated payee.
                        example: '123456789'
                    required:
                      - checkId
                      - shippingTypeId
                      - paperTypeId
              required:
                - mailChecks
            example:
              isShippingToCustomAddress: true
              customFromAddressId: address123
              customToAddressId: address456
              customShippingTypeId: shipping789
              mailChecks:
                - checkId: bL3YGddEnmG1X7w
                  shippingTypeId: 3
                  paperTypeId: 7
                  informTypeId: 10
                  enableSmsInform: false
                  enableEmailInform: true
                  payeeEmail: email@test.com
                  payeePhone: '123456789'
      responses:
        '200':
          description: successfully mailed
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: successfully mailed
        '401':
          description: Unauthorized. Missing or invalid token.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
        '403':
          description: Forbidden. The user has not verified their phone number or email.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  errorMsg:
                    type: string
                    example: >-
                      Please verify your Phone Number and Email Address to
                      enable mail Check.
        '422':
          description: Validation failed or invalid input.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  errorMsg:
                    type: string
                    example: The mailChecks field is required.
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````