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

# Create an asset

> Creates a new asset. At least one of `location_id` or `project_id` is required — an asset can belong to a location, to a project directly, or both. Neither is inferred from the other.



## OpenAPI

````yaml POST /assets
openapi: 3.1.0
info:
  title: Mangrove - API
  version: 1.1.0
servers:
  - url: https://app.gomangrove.com/api/v1
security:
  - sec0: []
paths:
  /assets:
    post:
      summary: Create an asset
      description: >-
        Creates a new asset. At least one of `location_id` or `project_id` is
        required — an asset can belong to a location, to a project directly, or
        both. Neither is inferred from the other.
      operationId: create-asset
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                asset:
                  type: object
                  required:
                    - name
                  properties:
                    name:
                      type: string
                      description: Name of the asset
                    location_id:
                      type: string
                      description: >-
                        Location friendly ID (e.g., loc_xyz789). Required if
                        project_id is not provided.
                    project_id:
                      type: string
                      description: >-
                        Project friendly ID (e.g., prj_abc123). Required if
                        location_id is not provided. Not inferred from
                        location_id.
                    lat:
                      type: number
                      description: Latitude in decimal degrees (-90 to 90)
                    long:
                      type: number
                      description: Longitude in decimal degrees (-180 to 180)
                    custom_field_values:
                      type: object
                      description: >-
                        Custom field values keyed by custom field definition
                        key. Each key must match an existing custom field
                        definition with object_type "asset"; values are
                        validated against the definition's value_type.
            examples:
              Request Example:
                value:
                  asset:
                    name: Kiln Alpha
                    location_id: loc_xyz789
                    project_id: prj_abc123
                    lat: 37.3875
                    long: -121.9635
                    custom_field_values:
                      serial: KILN-001
                      status: Unregistered
      responses:
        '201':
          description: '201'
          content:
            application/json:
              examples:
                Result:
                  value:
                    id: asset_abc123def456
                    friendly_id: asset_abc123def456
                    name: Kiln Alpha
                    health_status: null
                    location_id: loc_xyz789
                    project_id: prj_abc123
                    lat: 37.3875
                    long: -121.9635
                    custom_field_values:
                      serial: KILN-001
                      status: Unregistered
                    created_at: '2026-01-15T10:00:00.000Z'
                    updated_at: '2026-01-15T10:00:00.000Z'
        '404':
          description: '404'
          content:
            application/json:
              examples:
                Result:
                  value:
                    status: error
                    statusCode: 404
                    errors:
                      - message: 'Location not found: loc_unknown'
        '422':
          description: '422'
          content:
            application/json:
              examples:
                Result:
                  value:
                    status: error
                    statusCode: 422
                    errors:
                      - message: location_id or project_id is required
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: ''

````