> ## Documentation Index > Fetch the complete documentation index at: https://learn.servitly.com/llms.txt > Use this file to discover all available pages before exploring further. # Create new maintenance work > Required permissions: READ_MAINTENANCE_REGISTRY, WRITE_MAINTENANCE_REGISTRY.

Use the ACTIONS endpoints instead. ## OpenAPI ````json POST /inventory/maintenanceWorks { "openapi": "3.1.0", "info": { "title": "Servitly DPS API", "version": "1.0.0" }, "servers": [ { "url": "https://api.servitly-sandbox.com", "description": "[AWS SANDBOX]" }, { "url": "https://api.servitly.com", "description": "[AWS PRODUCTION Ireland]" }, { "url": "https://api-ap.servitly.com", "description": "[AWS Hong Kong]" }, { "url": "https://azapi.servitly-dev.com", "description": "[AZURE DEV Frankfurt]" }, { "url": "https://azapi.servitly-staging.com", "description": "[AZURE STAGING Frankfurt]" }, { "url": "https://azapi.servitly.com", "description": "[AZURE PRODUCTION Frankfurt]" } ], "security": [ { "bearerAuth": [] } ], "tags": [ { "name": "ACTIONS" }, { "name": "ALERTS" }, { "name": "API GATEWAY" }, { "name": "AUTHENTICATION" }, { "name": "AUTHORIZATIONS" }, { "name": "CUSTOMERS" }, { "name": "DATA IMPORT / EXPORT" }, { "name": "EVENTS" }, { "name": "LOCATIONS" }, { "name": "MAINTENANCE" }, { "name": "MAPPING" }, { "name": "METRIC DATA" }, { "name": "MOBILE APP" }, { "name": "ORGANIZATION" }, { "name": "PARTNERS" }, { "name": "PRODUCT MODELS" }, { "name": "SPARE PARTS" }, { "name": "STATISTICS" }, { "name": "STORE ORDERS" }, { "name": "SUBSCRIPTIONS" }, { "name": "SUBSCRIPTIONS (OLD)" }, { "name": "THING CONTROL" }, { "name": "THING DEFINITIONS" }, { "name": "THING MANAGEMENT" }, { "name": "THINGS" }, { "name": "TICKETS" }, { "name": "USER TYPES" }, { "name": "USERS" }, { "name": "WORK SESSIONS" } ], "paths": { "/inventory/maintenanceWorks": { "post": { "summary": "Create new maintenance work", "description": "Required permissions: READ_MAINTENANCE_REGISTRY, WRITE_MAINTENANCE_REGISTRY.

Use the ACTIONS endpoints instead.", "deprecated": "true", "tags": [ "MAINTENANCE" ], "parameters": [ { "$ref": "#/components/parameters/tenantNameHeader" } ], "requestBody": { "description": "The details of the maintenance work being created.", "required": "true", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MaintenanceWork" } } } }, "responses": { "201": { "description": "Successful creation.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MaintenanceWork" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/NotAuthenticated" }, "403": { "$ref": "#/components/responses/NotAuthorized" }, "429": { "$ref": "#/components/responses/ApiLimit" }, "500": { "$ref": "#/components/responses/IntError" } } } } }, "components": { "parameters": { "tenantNameHeader": { "in": "header", "name": "X-Servitly-Tenant", "required": "true", "schema": { "type": "string", "example": "{{tenantName}}" }, "description": "The name of the tenant (e.g. acme)." } }, "schemas": { "MaintenanceWork": { "type": "object", "description": "The object providing information of a maintenance activity performed on a thing or location.", "properties": { "id": { "type": "string", "description": "The maintenance work object identifier.", "readOnly": "true" }, "startTimestamp": { "type": "integer", "format": "int64", "description": "The timestamp when the maintenance work started.", "example": "1578438000000" }, "endTimestamp": { "type": "integer", "format": "int64", "description": "The timestamp when the maintenance work completed.", "example": "1578438000000" }, "type": { "type": "string", "description": "The maintenance event type.", "example": "REPAIR" }, "description": { "type": "string", "description": "The description of the performed activities.", "example": "Main unit repair..." }, "outcome": { "type": "string", "description": "The outcome of the performed activities.", "example": "Impossible to reset error..." }, "userEmail": { "type": "string", "description": "The email address of the user that has performed the maintenance." }, "thingId": { "type": "string", "description": "The thing identifier in case of thing maintenance." }, "locationId": { "type": "string", "description": "The location identifier in case of location maintenance." }, "properties": { "description": "The maintenance work additional properties.", "$ref": "#/components/schemas/Properties" } } }, "Properties": { "type": "object", "description": "The set of properties providing additional details to the parent object.", "additionalProperties": { "type": "string" }, "example": { "foo": "abc", "bar": "123" } } }, "responses": { "BadRequest": { "description": "Request data not valid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "The error response.", "example": "Bad request" } } } } } }, "NotAuthenticated": { "description": "User not authenticated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "The error response.", "example": "User not authenticated" } } } } } }, "NotAuthorized": { "description": "User not authorized.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "The error response.", "example": "User not authorized" } } } } } }, "ApiLimit": { "description": "API call rate limit exceeded.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "The error response.", "example": "API call rate limit exceeded" } } } } } }, "IntError": { "description": "Internal server error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "The error response.", "example": "Internal Server Error" } } } } } } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer" } } } } ````