/api/v1/asset-categories
Create an asset category
Create an asset category with optional lifecycle and notification settings.
Last updated
Request
POST /api/v1/asset-categories
Requires asset-categories:create. The token creator must remain an active administrator of the token’s organization. Category permissions.
Send Authorization: Bearer YOUR_API_TOKEN and Accept: application/json.
Query parameters
This endpoint does not use query parameters.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | The category name, up to 255 characters. Must be unique among asset categories in this organization. |
description |
string or null | No | An optional description, up to 10,000 characters. Send null to clear it. |
end_of_life |
integer or null | No | Expected end of life in months: 1–12,000. Send null to clear it. |
useful_life |
integer or null | No | Useful life for depreciation in years: 1–1,000. Send null to clear it. |
eol_lookahead_days |
string | No | End-of-life notification window. Use a value from notification_options in the options endpoint. Defaults to dont_notify on creation; null is invalid. |
warranty_lookahead_days |
string | No | Warranty notification window. Uses the same notification_options values. Defaults to dont_notify on creation; null is invalid. |
Requires Idempotency-Key. Generate one key per action and keep it for retries. Successful responses are remembered for 24 hours per token. Idempotency and retries.
Example
Set ASSETCENTER_API_TOKEN as described in the quick start. Replace example IDs with values from your organization. For a retry, reuse the original key instead of generating another UUID.
curl --request POST "https://my.assetcenter.app/api/v1/asset-categories" \
--header "Authorization: Bearer $ASSETCENTER_API_TOKEN" \
--header "Accept: application/json" \
--header "Idempotency-Key: $(uuidgen)" \
--header "Content-Type: application/json" \
--data '{"name":"Vehicles"}'
Response
201 Created. Illustrative response; IDs and values will differ.
{
"data": {
"id": 7,
"name": "Vehicles",
"description": null,
"end_of_life": null,
"useful_life": null,
"eol_lookahead_days": "dont_notify",
"warranty_lookahead_days": "dont_notify",
"can_delete": true,
"custom_fields": []
}
}
The category has the fields described in Get an asset category. Use the returned category ID as category_id when creating an asset.
Behavior and constraints
Only name is required. Omitted description and lifecycle values are null; notification settings default to dont_notify. Categories are always created in the token’s organization with type asset. Add fields using Create a category field. Organization IDs, type, position, and nested custom fields are not writable. Unsupported fields return 422.
Errors
401 means the customer bearer token is missing, expired, revoked, or invalid. 403 means the required permission is missing or the token creator is no longer an active organization administrator. 404 means the category or field is unavailable in this organization. 422 identifies invalid or unsupported input. 429 means a rate limit was reached. Error handling and rate limits. 409 means conflicting key reuse or a data constraint described above.