Assets API
POST/api/v1/assets
Product availabilityAlgaPSA

Create asset

Creates an asset for the authenticated tenant. The request body is validated with createAssetWithExtensionSchema; client_id, asset_type, asset_tag, name, and status are required. Custom attributes are checked against the registered type schema and required fields must be present. Unknown asset_type slugs and invalid/missing required attributes return 400. AssetService.create writes the attributes map, optionally upserts extension_data, publishes ASSET_CREATED, and returns getWithDetails.

RBAC · asset

Request body

Content type: application/json · schema AssetCreateRequest

client_idstring <uuid>Required
Client UUID from clients.client_id. Required.
asset_typestringRequired
Must be a built-in slug or registered custom slug; unknown slugs return 400.
asset_tagstringRequired
Required tenant-specific asset tag.
min length 1 · max length 255
namestringRequired
Required asset name.
min length 1 · max length 255
statusstringRequired
Required asset status.
min length 1
location_idstring <uuid>Nullable
Optional client_locations.location_id link. Validated to belong to client_id.
locationstring
Optional free-text asset location.
serial_numberstring
Optional serial number.
purchase_datestring <date-time>
Optional purchase date/time.
warranty_end_datestring <date-time>
Optional warranty end date/time.
manufacturerstringNullable
Hardware make. RMM sync fills it when the provider reports one.
max length 255
modelstringNullable
Hardware model. A first-class column, not a system_info lookup.
max length 255
vendor_idstring <uuid>Nullable
Supplier; an inventory vendors.vendor_id of this tenant.
purchase_costintegerNullable
Purchase cost in minor units (cents).
purchase_cost_currencystringNullable
ISO currency code; defaults to the tenant currency when a cost is written without one.
min length 3 · max length 3
order_numberstringNullable
Purchase order number.
max length 255
billing_profile_idstring <uuid>Nullable
Billing profile for work on this device. Must belong to the asset client and be active; cleared when the client changes.
attributesobject
Values for a custom asset type's fields, keyed by each field's key in the tenant asset type registry fields_schema. On create, required fields must be present; on update, provided keys merge into the stored map, omitted keys remain, and required fields cannot be blanked. Other keys such as integration namespaces are stored as-is. Built-in asset types accept the map without schema validation.
extension_dataobject
Asset-type-specific extension data written to the corresponding extension table for workstation, network device, server, mobile device, or printer assets. Validated against the schema of the asset type (on update, the new asset_type or the stored one); unknown keys are dropped, and other asset types return 400.

Response body

Success response 201 · schema AssetResourceResponse

successbooleanRequired
Enum: true
dataobjectRequired
dataobjectRequired
asset_idstring <uuid>Required
Primary key from assets.asset_id.
client_idstring <uuid>Required
Client UUID from assets.client_id.
asset_typestringRequired
Asset type stored in assets.asset_type.
asset_tagstringRequired
Tenant-specific asset tag.
namestringRequired
Asset display name.
statusstringRequired
Asset status.
location_idstring <uuid>Nullable
Client_locations.location_id link, when set.
locationstringNullable
Asset location, when recorded.
serial_numberstringNullable
Asset serial number, when recorded.
purchase_datestringNullable
Asset purchase date from assets.purchase_date.
warranty_end_datestringNullable
Warranty end date from assets.warranty_end_date.
contact_name_idstring <uuid>Nullable
The contact this asset is assigned to; drives portal contact-scoped visibility.
manufacturerstringNullable
Hardware make from assets.manufacturer.
modelstringNullable
Hardware model from assets.model.
vendor_idstring <uuid>Nullable
Supplier from assets.vendor_id (inventory vendors).
vendor_namestringNullable
Supplier name from the joined vendors row.
purchase_costintegerNullable
Purchase cost in minor units (cents).
purchase_cost_currencystringNullable
ISO currency code of purchase_cost.
order_numberstringNullable
Purchase order number from assets.order_number.
billing_profile_idstring <uuid>Nullable
Billing profile for work on this device; null means the location default or the client default applies.
created_atstring <date-time>Required
Asset creation timestamp.
updated_atstring <date-time>Required
Asset last update timestamp.
tenantstring <uuid>Required
Tenant UUID from assets.tenant; filtered to the authenticated request context.
attributesobject
client_namestring
Client name selected from the joined clients table.
warranty_statusstring
Computed from warranty_end_date by SQL CASE expression.
Enum: no_warrantyexpiredexpiring_soonactive
maintenance_statusstring
Optional computed maintenance status when present in service results.
extension_dataobject
relationshipsarray of object
Related asset rows included by getWithDetails after create.
itemsobject
documentsarray of object
Associated document rows included by getWithDetails after create.
itemsobject
maintenance_schedulesarray of object
Maintenance schedule rows included by getWithDetails after create.
itemsobject
_linksobject
HATEOAS links generated from the asset_id.
metaobjectRequired
timestampstring <date-time>Required
Response timestamp generated by createApiResponse/createErrorResponse.
versionstringRequired
API response version string.

Response codes

201
Asset created successfully.
400
Request validation failed, asset_type is not a built-in or registered slug, or custom attributes are invalid or missing required fields.
401
x-api-key is missing at middleware.
403
Authenticated request context lacks permission to create assets when auth wiring is present.
500
Unexpected error.