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

# Create assets

> Send a JSON array, including when creating one asset. Each item requires `AssetName` and `AccountID`. All other fields are optional.

The success response contains `Code` and `Message`; it does not include `AssetID` or per-item results. Use List assets to retrieve asset identifiers. Do not rely on the asset name alone to identify a newly created asset.

Replace the fictional destination and coordinates in the full example with your own values, or omit those fields.



## OpenAPI

````yaml /openapi/openapi.json post /Assets/NewAssets
openapi: 3.1.0
info:
  title: Aiyoti Integration API Basic
  description: Create, retrieve, update, and manage the tracking lifecycle of assets.
  version: 0.0.1
servers:
  - url: https://api.aiyoticloud.com
security: []
tags:
  - name: Users
    description: Log in and refresh credentials.
  - name: Carriers
    description: Look up the carriers available to an account.
  - name: Labels
    description: Look up the labels available for new assets.
  - name: Assets / Shipments
    description: Create, list, retrieve, edit, annotate, and delete assets.
paths:
  /Assets/NewAssets:
    post:
      tags:
        - Assets / Shipments
      summary: Create assets
      description: >-
        Send a JSON array, including when creating one asset. Each item requires
        `AssetName` and `AccountID`. All other fields are optional.


        The success response contains `Code` and `Message`; it does not include
        `AssetID` or per-item results. Use List assets to retrieve asset
        identifiers. Do not rely on the asset name alone to identify a newly
        created asset.


        Replace the fictional destination and coordinates in the full example
        with your own values, or omit those fields.
      operationId: new_asset_Assets_NewAssets_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/Asset'
            examples:
              minimal:
                summary: Minimal
                value:
                  - AssetName: Example Shipment
                    AccountID: '00000000000000000000000000000002'
              full:
                summary: With optional shipment fields
                value:
                  - CarrierID: '00000000000000000000000000000004'
                    AssetName: Example Shipment
                    TrackingNo: EXAMPLE_TRACKING_NUMBER
                    LabelID: ''
                    DestinationAddress: 100 Example Street, Example City
                    DestinationLat: 0
                    DestinationLng: 0
                    Description: Example asset creation
                    AccountID: '00000000000000000000000000000002'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MutationResult'
              example:
                Code: 200
                Message: Success
        '422':
          description: Request validation failed. Check required fields and value types.
      security:
        - accessKey: []
components:
  schemas:
    Asset:
      properties:
        CarrierID:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Unique identifier of the carrier. Use a valid carrier identifier if
            you supply this field.
        AssetName:
          type: string
          description: Name of the asset.
        AccountID:
          type: string
          description: Unique identifier of the account.
        TrackingNo:
          anyOf:
            - type: string
            - type: 'null'
          description: Carrier tracking number.
        LabelID:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Label identifier. Optional on creation and can be omitted. Send it
            as a string in requests. Responses return `LabelID` as a number.
        GroupID:
          anyOf:
            - type: string
            - type: 'null'
          description: Unique identifier of the group.
        DestinationAddress:
          anyOf:
            - type: string
            - type: 'null'
          description: Destination address.
        DestinationLat:
          anyOf:
            - type: number
            - type: 'null'
          description: Destination latitude.
        DestinationLng:
          anyOf:
            - type: number
            - type: 'null'
          description: Destination longitude.
        Description:
          anyOf:
            - type: string
            - type: 'null'
          description: Free-text description.
        AssetForeignID:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Identifier supplied by your system. Not included in the list
            response.
      type: object
      required:
        - AssetName
        - AccountID
    MutationResult:
      type: object
      properties:
        Code:
          type: integer
          description: >-
            Application code in the response body. Separate from the HTTP
            status.
        Message:
          type: string
          description: Result message.
      description: Response body for successful asset changes.
  securitySchemes:
    accessKey:
      type: apiKey
      in: header
      name: AccessKey
      description: >-
        Send the `access` token returned by Login. Both `access` and `refresh`
        tokens are accepted; reserve `refresh` for credential renewal.

````

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