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

# Create asset types

> Create asset types



## OpenAPI

````yaml https://spec.speakeasy.com/idalia-r5y/idalia/api-documentation-with-code-samples post /asset-types
openapi: 3.0.0
info:
  title: API Documentation
  version: 1.0.0
  description: This is the OpenAPI specification for your project.
servers:
  - url: https://idalia.app/api
    description: Idalia API server
security: []
paths:
  /asset-types:
    post:
      tags:
        - Asset-types
      summary: Create asset types
      description: Create asset types
      operationId: createAssetTypes
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetTypesCreateParams'
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AssetTypeResponse'
        '400':
          $ref: '#/components/responses/400'
        '500':
          $ref: '#/components/responses/500'
      x-codeSamples:
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { Idalia } from "idalia";

            const idalia = new Idalia({
              apiKeyAuth: process.env["IDALIA_API_KEY_AUTH"] ?? "",
            });

            async function run() {
              const result = await idalia.assetTypes.create();

              console.log(result);
            }

            run();
components:
  schemas:
    AssetTypesCreateParams:
      type: array
      items:
        $ref: '#/components/schemas/CreateAssetTypeSchema'
    AssetTypeResponse:
      type: object
      properties:
        id:
          type: string
          description: ID of the asset type
        createdAt:
          type: string
          description: Datetime when the asset type was created
        updatedAt:
          type: string
          nullable: true
          description: Datetime when the asset type was last updated
        workspaceId:
          type: string
          nullable: true
          description: ID of the workspace the asset type belongs to
        updatedBy:
          type: string
          nullable: true
          description: ID of the user who last updated the asset type
        name:
          type: string
          description: Name of the asset type
        sku:
          type: string
          nullable: true
        notes:
          type: string
          nullable: true
        length:
          type: number
          nullable: true
          description: Length of the asset type in m
        width:
          type: number
          nullable: true
          description: Width of the asset type in m
        height:
          type: number
          nullable: true
          description: Height of the asset type in m
        mass:
          type: number
          nullable: true
          description: Mass of the asset type in m
        externalIds:
          type: object
          additionalProperties:
            type: string
          nullable: true
        categoryId:
          type: string
          nullable: true
          description: ID of the category the asset type belongs to
        isAssembly:
          type: boolean
          default: false
          nullable: true
          description: >-
            Boolean true if the asset type represents an assembly otherwise
            false to represent a component
      required:
        - id
        - createdAt
        - name
    CreateAssetTypeSchema:
      type: object
      properties:
        updatedBy:
          type: string
          nullable: true
          description: ID of the user who last updated the asset type
        name:
          type: string
          description: Name of the asset type
        sku:
          type: string
          nullable: true
        notes:
          type: string
          nullable: true
        length:
          type: number
          nullable: true
          description: Length of the asset type in m
        width:
          type: number
          nullable: true
          description: Width of the asset type in m
        height:
          type: number
          nullable: true
          description: Height of the asset type in m
        mass:
          type: number
          nullable: true
          description: Mass of the asset type in m
        externalIds:
          type: object
          additionalProperties:
            type: string
          nullable: true
        categoryId:
          type: string
          nullable: true
          description: ID of the category the asset type belongs to
        isAssembly:
          type: boolean
          default: false
          nullable: true
          description: >-
            Boolean true if the asset type represents an assembly otherwise
            false to represent a component
      required:
        - name
  responses:
    '400':
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Invalid request parameters
              code:
                type: string
                example: '400'
    '500':
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: An unexpected error occurred
              code:
                type: string
                example: '500'

````