Notifications
In-app notifications and transactional email sends.
7 endpoints. Every request needs an Authorization: Bearer mtro_... header, and responses follow the envelope described in Errors and conventions.
POST /notifications/create
Create an in-app notification. This writes account data and should require owner confirmation when used by an agent.
Required scope: any valid API key for the entity.
MCP tool: notifications_create
Request body
Field names are taken from the Core handler, which reads exactly these. Types and which of them are required are not yet documented.
| Field | Type | Required | Description |
|---|---|---|---|
action | any | no | |
link | any | no | |
message | any | no | |
metadata | any | no | |
title | any | no | |
type | any | no | |
userId | any | no | |
userType | any | no |
Example
curl -X POST 'https://core.mtro.app/notifications/create' \
-H 'Authorization: Bearer mtro_your_api_key' \
-H 'Content-Type: application/json' \
-d '{}'
POST /notifications/delete
Delete a notification. This is destructive and should require owner confirmation when used by an agent.
Required scope: any valid API key for the entity.
MCP tool: notifications_delete
Request body
| Field | Type | Required | Description |
|---|---|---|---|
notificationId | string | yes | The notification ID to delete |
Example
curl -X POST 'https://core.mtro.app/notifications/delete' \
-H 'Authorization: Bearer mtro_your_api_key' \
-H 'Content-Type: application/json' \
-d '{"notificationId":"<notificationId>"}'
GET /notifications/get
List your notifications. Supports pagination and filtering for unread only.
Required scope: any valid API key for the entity.
MCP tool: notifications_list
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | number | no | Number of notifications to return (default 50) |
skip | number | no | Number of notifications to skip for pagination (default 0) |
unreadOnly | boolean | no | Only return unread notifications |
Example
curl -X GET 'https://core.mtro.app/notifications/get?limit=<limit>&skip=<skip>&unreadOnly=<unreadOnly>' \
-H 'Authorization: Bearer mtro_your_api_key'
Response
| Field | Type |
|---|---|
notifications | any[] |
total | integer |
unreadCount | integer |
error | boolean |
POST /notifications/mark-all-read
Mark all notifications as read.
Required scope: any valid API key for the entity.
MCP tool: notifications_mark_all_read
Example
curl -X POST 'https://core.mtro.app/notifications/mark-all-read' \
-H 'Authorization: Bearer mtro_your_api_key'
POST /notifications/mark-read
Mark a specific notification as read.
Required scope: any valid API key for the entity.
MCP tool: notifications_mark_read
Request body
| Field | Type | Required | Description |
|---|---|---|---|
notificationId | string | yes | The notification ID to mark as read |
Example
curl -X POST 'https://core.mtro.app/notifications/mark-read' \
-H 'Authorization: Bearer mtro_your_api_key' \
-H 'Content-Type: application/json' \
-d '{"notificationId":"<notificationId>"}'
POST /notifications/send-email
Send an email with notification context. This sends external communication and should require owner confirmation when used by an agent.
Required scope: any valid API key for the entity.
MCP tool: notifications_send_email
Request body
Field names are taken from the Core handler, which reads exactly these. Types and which of them are required are not yet documented.
| Field | Type | Required | Description |
|---|---|---|---|
action | any | no | |
channels | any | no | |
message | any | no | |
sendNotification | any | no | |
subject | any | no | |
userId | any | no | |
userType | any | no |
Example
curl -X POST 'https://core.mtro.app/notifications/send-email' \
-H 'Authorization: Bearer mtro_your_api_key' \
-H 'Content-Type: application/json' \
-d '{}'
GET /notifications/unread-count
Get the count of unread notifications.
Required scope: any valid API key for the entity.
MCP tool: notifications_unread_count
Example
curl -X GET 'https://core.mtro.app/notifications/unread-count' \
-H 'Authorization: Bearer mtro_your_api_key'
Response
| Field | Type |
|---|---|
unreadCount | integer |
error | boolean |