---
agentTools:
  projectIndex: https://asset-management-for-jira.readme.io/llms.txt
---

# /v1/assets

Create a new asset

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "paths": {
    "/v1/assets": {
      "post": {
        "security": [
          {
            "api_key": []
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/AssetRequest"
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/AssetExternalSerializer"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "asset"
        ],
        "description": "Create a new asset"
      }
    }
  },
  "info": {
    "title": "Asset Management for Jira API",
    "version": "v1"
  },
  "servers": [
    {
      "url": "//api.assetmanagementforjira.com"
    }
  ],
  "components": {
    "requestBodies": {
      "AssetRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AssetRequest"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY"
      }
    },
    "schemas": {
      "AssetFieldValues": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "ID of the Asset Field"
          },
          "value": {
            "description": "Value of the Asset Field"
          }
        },
        "required": [
          "id",
          "value"
        ]
      },
      "AssetRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the Asset"
          },
          "location_id": {
            "type": "integer",
            "description": "ID of location associated with Asset"
          },
          "asset_type_id": {
            "type": "integer",
            "description": "ID of asset type associated with Asset"
          },
          "field_values": {
            "description": "List of Asset Field values",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AssetFieldValues"
            }
          },
          "loanee_id": {
            "type": "integer",
            "description": "ID of the User associated with Asset. Must match an existing user."
          },
          "loanee_name": {
            "type": "string",
            "description": "Name of the User associated with Asset. Will create a new user if not present."
          },
          "loanee_jira_id": {
            "type": "string",
            "description": "Jira ID of the User associated with Asset. Must match an existing user."
          }
        },
        "required": [
          "asset_type_id",
          "name"
        ]
      },
      "AssetTypeListSerializer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "readOnly": true
          }
        }
      },
      "LocationSerializer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "maxLength": 256,
            "nullable": true
          }
        }
      },
      "UserExternalSerializer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "jira_id": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "AssetExternalSerializer": {
        "type": "object",
        "properties": {
          "assettype": {
            "$ref": "#/components/schemas/AssetTypeListSerializer"
          },
          "location": {
            "$ref": "#/components/schemas/LocationSerializer"
          },
          "loanee": {
            "$ref": "#/components/schemas/UserExternalSerializer"
          },
          "updated_at": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "purchase_date": {
            "type": "string",
            "nullable": true
          },
          "end_of_life": {
            "nullable": true
          },
          "depreciation_calculated_at": {
            "nullable": true
          },
          "merged_at": {
            "nullable": true
          },
          "purchase_price": {
            "type": "number",
            "nullable": true
          },
          "current_value": {
            "type": "number",
            "nullable": true
          },
          "depreciation_percentage": {
            "type": "number",
            "nullable": true
          },
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "field_values": {
            "nullable": true
          },
          "issue_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "nullable": true
          },
          "intune_id": {
            "type": "string",
            "maxLength": 256,
            "nullable": true
          },
          "kandji_id": {
            "type": "string",
            "maxLength": 256,
            "nullable": true
          },
          "jamf_id": {
            "type": "string",
            "maxLength": 256,
            "nullable": true
          },
          "merged_by": {
            "type": "string",
            "maxLength": 256,
            "nullable": true
          },
          "is_sample": {
            "type": "boolean"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 98,
      "1": 146,
      "2": 213,
      "3": 62,
      "4": 71,
      "5": 81,
      "6": 87,
      "7": 0,
      "8": 170,
      "9": 87,
      "10": 91,
      "11": 222
    }
  }
}
```