Tasks
Maintenance and operational tasks, optionally assigned to a vendor.
7 endpoints. Every request needs an Authorization: Bearer mtro_... header, and responses follow the envelope described in Errors and conventions.
POST /tasks/create
Create a new maintenance/service task. Required: propertyId, date (timestamp ms), vendorId. Optional: notes, status.
Required scope: tasks.write
MCP tool: tasks_create
Request body
| Field | Type | Required | Description |
|---|---|---|---|
propertyId | string | yes | Property ID where the task takes place |
date | number | yes | Task date as millisecond timestamp |
vendorId | string | yes | Vendor ID assigned to the task |
notes | string | no | Task notes/description |
status | "pending" | "in_progress" | "completed" | "cancelled" | no | Task status (default: pending) |
Example
curl -X POST 'https://core.mtro.app/tasks/create' \
-H 'Authorization: Bearer mtro_your_api_key' \
-H 'Content-Type: application/json' \
-d '{"propertyId":"<propertyId>","date":0,"vendorId":"<vendorId>"}'
POST /tasks/delete
Delete a task. This action cannot be undone.
Required scope: tasks.write
MCP tool: tasks_delete
Request body
| Field | Type | Required | Description |
|---|---|---|---|
taskId | string | yes | The task ID to delete |
Example
curl -X POST 'https://core.mtro.app/tasks/delete' \
-H 'Authorization: Bearer mtro_your_api_key' \
-H 'Content-Type: application/json' \
-d '{"taskId":"<taskId>"}'
GET /tasks/get/{taskId}
Get detailed information about a specific task.
Required scope: tasks.read
MCP tool: tasks_get
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
taskId | string | yes | The task ID |
Example
curl -X GET 'https://core.mtro.app/tasks/get/<taskId>' \
-H 'Authorization: Bearer mtro_your_api_key'
Response
| Field | Type |
|---|---|
task | object |
error | boolean |
Fields of task
| Field | Type |
|---|---|
id | string |
propertyId | string |
bookingId | string |
guestId | string |
scopeType | string |
scopeId | string |
date | integer |
vendorId | string |
assigneeType | string |
assigneeId | string |
title | string |
notes | string |
completionNotes | string |
completionNotesUpdatedAt | any |
completionNotesUpdatedBy | string |
status | string |
entityOwner | string |
lastUpdated | integer |
timeline | object[] |
GET /tasks/get/all
List all maintenance/service tasks. Returns task details including property, vendor, date, status, and notes.
Required scope: tasks.read
MCP tool: tasks_list
Example
curl -X GET 'https://core.mtro.app/tasks/get/all' \
-H 'Authorization: Bearer mtro_your_api_key'
Response
| Field | Type |
|---|---|
tasks | object[] |
error | boolean |
Fields of tasks[]
| Field | Type |
|---|---|
id | string |
propertyId | string |
bookingId | string |
guestId | string |
scopeType | string |
scopeId | string |
date | integer |
vendorId | string |
assigneeType | string |
assigneeId | string |
title | string |
notes | string |
completionNotes | string |
completionNotesUpdatedAt | any |
completionNotesUpdatedBy | string |
status | string |
entityOwner | string |
lastUpdated | integer |
timeline | object[] |
GET /tasks/get/entity/{entityId}
Get all tasks belonging to a specific entity.
Required scope: tasks.read
MCP tool: tasks_get_by_entity
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
entityId | string | yes | The entity ID |
Example
curl -X GET 'https://core.mtro.app/tasks/get/entity/<entityId>' \
-H 'Authorization: Bearer mtro_your_api_key'
Response
| Field | Type |
|---|---|
tasks | object[] |
error | boolean |
Fields of tasks[]
| Field | Type |
|---|---|
id | string |
propertyId | string |
bookingId | string |
guestId | string |
scopeType | string |
scopeId | string |
date | integer |
vendorId | string |
assigneeType | string |
assigneeId | string |
title | string |
notes | string |
completionNotes | string |
completionNotesUpdatedAt | any |
completionNotesUpdatedBy | string |
status | string |
entityOwner | string |
lastUpdated | integer |
timeline | object[] |
GET /tasks/get/vendor/{vendorId}
Get all tasks assigned to a specific vendor.
Required scope: tasks.read
MCP tool: tasks_get_by_vendor
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
vendorId | string | yes | The vendor ID |
Example
curl -X GET 'https://core.mtro.app/tasks/get/vendor/<vendorId>' \
-H 'Authorization: Bearer mtro_your_api_key'
Response
| Field | Type |
|---|---|
tasks | object[] |
error | boolean |
Fields of tasks[]
| Field | Type |
|---|---|
id | string |
propertyId | string |
bookingId | string |
guestId | string |
scopeType | string |
scopeId | string |
date | integer |
vendorId | string |
assigneeType | string |
assigneeId | string |
title | string |
notes | string |
completionNotes | string |
completionNotesUpdatedAt | any |
completionNotesUpdatedBy | string |
status | string |
entityOwner | string |
lastUpdated | integer |
timeline | object[] |
POST /tasks/update
Update an existing task.
Required scope: tasks.write
MCP tool: tasks_update
Request body
| Field | Type | Required | Description |
|---|---|---|---|
taskId | string | yes | The task ID to update |
propertyId | string | no | Updated property ID |
date | number | no | Updated task date (timestamp ms) |
vendorId | string | no | Updated vendor ID |
notes | string | no | Updated notes |
status | "pending" | "in_progress" | "completed" | "cancelled" | no | Updated status |
Example
curl -X POST 'https://core.mtro.app/tasks/update' \
-H 'Authorization: Bearer mtro_your_api_key' \
-H 'Content-Type: application/json' \
-d '{"taskId":"<taskId>"}'