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

# Create Transport Mode

> Create a custom transport mode

export const permission_0 = 'element:create'

<Info>Requires permission: **{permission_0}**</Info>


## OpenAPI

````yaml POST /v1/transport/mode
openapi: 3.0.1
info:
  title: Variable API
  description: This is the Variable API
  version: 1.1.0
servers:
  - url: https://app.variable.global/api
security:
  - basicAuth: []
  - bearerAuth: []
  - oAuthNoScopes: []
paths:
  /v1/transport/mode:
    post:
      summary: Create a custom transport mode
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TransportMode'
                - type: object
                  required:
                    - name
                    - taxonomy
                - description: >-
                    Provide the backing freight dataset via `dataset`
                    (preferred). The deprecated `footprint` alias is still
                    accepted; when both are sent, `dataset` wins.
                  anyOf:
                    - required:
                        - dataset
                    - required:
                        - footprint
      responses:
        '201':
          description: The created transport mode
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransportMode'
        '401':
          description: ExpiredToken
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExpiredTokenResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    TransportMode:
      type: object
      description: >-
        How cargo moves on a transport leg. Built-in modes (`truck`,
        `container-ship`, `train`, `air-*`, …) are system-curated and work out
        of the box; create a custom mode only when no built-in fits. A custom
        mode is backed by a `Product[DATASET_CONTAINER]`, so its `code` is that
        product's `sku` and it also appears under `/v1/product` — intentional,
        not a leak.
      properties:
        uuid:
          type: string
          format: uuid
          readOnly: true
          description: Present only for custom modes; built-ins have none.
        code:
          type: string
          description: >-
            Stable handle for the mode, equal to the backing product's `sku` for
            a custom mode. 1–128 characters of letters, digits, hyphens, dots,
            or underscores; unique within your company; cannot reuse a built-in
            code.
          example: electric-truck
        name:
          type: string
          description: Required on create.
          example: Electric truck
        taxonomy:
          allOf:
            - $ref: '#/components/schemas/TaxonomyRef'
          description: >-
            On write, reference a category by `{ path }` or `{ uuid }`; it must
            sit under `transport/freight/modes/*`. Required on create. Reads
            return the full reference.
        footprint:
          type: object
          writeOnly: true
          deprecated: true
          required:
            - uuid
          description: >-
            Deprecated — use `dataset`. Backwards-compatible alias for the
            backing emission-factor dataset; `dataset` takes precedence when
            both are sent. Reference it by `uuid`.
          properties:
            uuid:
              type: string
              format: uuid
        dataset:
          required:
            - uuid
          description: >-
            Custom modes only: the freight emission-factor dataset the mode
            draws from (declared per tonne-kilometre or tonne-mile). On write,
            reference it by `{ uuid }` — required on create, and it must be a
            freight-unit dataset (a per-km or per-kg dataset is rejected). Reads
            return the full reference. Built-ins have none.
          allOf:
            - $ref: '#/components/schemas/DatasetRef'
    ExpiredTokenResponse:
      type: object
      properties:
        message:
          type: string
          example: token expired
    TaxonomyRef:
      type: object
      description: A reference to a taxonomy category, including its machine-readable path.
      properties:
        uuid:
          type: string
          format: uuid
        name:
          type: string
          example: Material
        path:
          type: string
          example: material
    DatasetRef:
      allOf:
        - $ref: '#/components/schemas/IDAndName'
        - type: object
          properties:
            source:
              description: The dataset's originating database.
              type: string
              example: ecoinvent 3.8
            declaredUnit:
              description: The unit the dataset's per-unit impact is declared in.
              type: string
              example: kg
    IDAndName:
      type: object
      properties:
        uuid:
          $ref: '#/components/schemas/UUID'
        name:
          type: string
          example: Name
    UUID:
      type: string
      format: uuid
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    oAuthNoScopes:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: /auth/token
          scopes: {}

````