@agentmc/api 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +197 -0
- package/bin/agentmc-api.mjs +8 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +6617 -0
- package/dist/cli.js.map +1 -0
- package/dist/generated/operations.d.ts +5039 -0
- package/dist/generated/operations.js +6366 -0
- package/dist/generated/operations.js.map +1 -0
- package/dist/index.d.ts +10618 -0
- package/dist/index.js +6517 -0
- package/dist/index.js.map +1 -0
- package/docs/operations/README.md +50 -0
- package/docs/operations/agentConnectedInstructions.md +127 -0
- package/docs/operations/agentHeartbeat.md +266 -0
- package/docs/operations/authenticateAgentRealtimeSocket.md +176 -0
- package/docs/operations/claimAgentRealtimeSession.md +168 -0
- package/docs/operations/closeAgentRealtimeSession.md +201 -0
- package/docs/operations/commentWorkspaceCalendarItem.md +163 -0
- package/docs/operations/connectAgent.md +199 -0
- package/docs/operations/createAgentBrief.md +215 -0
- package/docs/operations/createAgentRealtimeSignal.md +224 -0
- package/docs/operations/createBoard.md +160 -0
- package/docs/operations/createBoardColumn.md +163 -0
- package/docs/operations/createTask.md +195 -0
- package/docs/operations/createTaskComment.md +176 -0
- package/docs/operations/createWorkspaceCalendarItem.md +234 -0
- package/docs/operations/deleteAgentBrief.md +145 -0
- package/docs/operations/deleteBoard.md +126 -0
- package/docs/operations/deleteBoardColumn.md +155 -0
- package/docs/operations/deleteTask.md +126 -0
- package/docs/operations/deleteTaskComment.md +128 -0
- package/docs/operations/deleteWorkspaceCalendarItem.md +126 -0
- package/docs/operations/index.json +6358 -0
- package/docs/operations/listAgentBriefs.md +207 -0
- package/docs/operations/listAgentRealtimeRequestedSessions.md +166 -0
- package/docs/operations/listAgentRealtimeSignals.md +185 -0
- package/docs/operations/listAgents.md +162 -0
- package/docs/operations/listBoards.md +142 -0
- package/docs/operations/listHosts.md +156 -0
- package/docs/operations/listLogs.md +140 -0
- package/docs/operations/listNotifications.md +179 -0
- package/docs/operations/listTaskComments.md +170 -0
- package/docs/operations/listTasks.md +158 -0
- package/docs/operations/listTeamMembers.md +137 -0
- package/docs/operations/markAllNotificationsRead.md +107 -0
- package/docs/operations/markNotificationRead.md +160 -0
- package/docs/operations/showBoard.md +134 -0
- package/docs/operations/showHost.md +172 -0
- package/docs/operations/showTask.md +140 -0
- package/docs/operations/showWorkspaceCalendarItem.md +165 -0
- package/docs/operations/updateAgentBrief.md +257 -0
- package/docs/operations/updateBoard.md +169 -0
- package/docs/operations/updateBoardColumn.md +165 -0
- package/docs/operations/updateTask.md +175 -0
- package/docs/operations/updateTaskComment.md +174 -0
- package/docs/operations/updateWorkspaceCalendarItem.md +204 -0
- package/docs/operations/workspaceCalendar.md +185 -0
- package/examples/http/agentConnectedInstructions.ts +19 -0
- package/examples/http/agentHeartbeat.ts +67 -0
- package/examples/http/authenticateAgentRealtimeSocket.ts +24 -0
- package/examples/http/claimAgentRealtimeSession.ts +21 -0
- package/examples/http/closeAgentRealtimeSession.ts +28 -0
- package/examples/http/commentWorkspaceCalendarItem.ts +24 -0
- package/examples/http/connectAgent.ts +47 -0
- package/examples/http/createAgentBrief.ts +34 -0
- package/examples/http/createAgentRealtimeSignal.ts +33 -0
- package/examples/http/createBoard.ts +19 -0
- package/examples/http/createBoardColumn.ts +23 -0
- package/examples/http/createTask.ts +24 -0
- package/examples/http/createTaskComment.ts +24 -0
- package/examples/http/createWorkspaceCalendarItem.ts +31 -0
- package/examples/http/deleteAgentBrief.ts +19 -0
- package/examples/http/deleteBoard.ts +19 -0
- package/examples/http/deleteBoardColumn.ts +22 -0
- package/examples/http/deleteTask.ts +19 -0
- package/examples/http/deleteTaskComment.ts +20 -0
- package/examples/http/deleteWorkspaceCalendarItem.ts +19 -0
- package/examples/http/listAgentBriefs.ts +22 -0
- package/examples/http/listAgentRealtimeRequestedSessions.ts +22 -0
- package/examples/http/listAgentRealtimeSignals.ts +25 -0
- package/examples/http/listAgents.ts +20 -0
- package/examples/http/listBoards.ts +21 -0
- package/examples/http/listHosts.ts +21 -0
- package/examples/http/listLogs.ts +19 -0
- package/examples/http/listNotifications.ts +20 -0
- package/examples/http/listTaskComments.ts +22 -0
- package/examples/http/listTasks.ts +26 -0
- package/examples/http/listTeamMembers.ts +20 -0
- package/examples/http/markAllNotificationsRead.ts +15 -0
- package/examples/http/markNotificationRead.ts +20 -0
- package/examples/http/showBoard.ts +19 -0
- package/examples/http/showHost.ts +22 -0
- package/examples/http/showTask.ts +19 -0
- package/examples/http/showWorkspaceCalendarItem.ts +19 -0
- package/examples/http/updateAgentBrief.ts +47 -0
- package/examples/http/updateBoard.ts +25 -0
- package/examples/http/updateBoardColumn.ts +24 -0
- package/examples/http/updateTask.ts +25 -0
- package/examples/http/updateTaskComment.ts +23 -0
- package/examples/http/updateWorkspaceCalendarItem.ts +27 -0
- package/examples/http/workspaceCalendar.ts +27 -0
- package/package.json +64 -0
- package/spec/openapi.filtered.json +12925 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# listBoards
|
|
2
|
+
|
|
3
|
+
- Method: `GET`
|
|
4
|
+
- Path: `/boards`
|
|
5
|
+
- Summary: List boards for the current workspace.
|
|
6
|
+
- Auth: ApiKeyAuth OR AgentBearerAuth OR BearerAuth
|
|
7
|
+
|
|
8
|
+
## Description
|
|
9
|
+
|
|
10
|
+
No additional description.
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| Name | In | Required | Description | Example |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| per_page | query | no | Page size for paginated responses. | 25 |
|
|
17
|
+
| scope | query | no | Allowed values: all, mine, team, personal. | "all" |
|
|
18
|
+
| personal_owner_user_id | query | no | Identifier for the private board owner user. | 42 |
|
|
19
|
+
|
|
20
|
+
## Request Example
|
|
21
|
+
|
|
22
|
+
None.
|
|
23
|
+
|
|
24
|
+
## Success Responses
|
|
25
|
+
|
|
26
|
+
### 200 (application/json)
|
|
27
|
+
Board list returned.
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"data": [
|
|
32
|
+
{
|
|
33
|
+
"id": 42,
|
|
34
|
+
"team_id": 42,
|
|
35
|
+
"name": "Example Name",
|
|
36
|
+
"description": "Example description text.",
|
|
37
|
+
"visibility": "team",
|
|
38
|
+
"personal_owner_user_id": 42,
|
|
39
|
+
"created_by_user_id": 42,
|
|
40
|
+
"created_at": "2026-02-22T17:21:00Z",
|
|
41
|
+
"updated_at": "2026-02-22T17:21:00Z"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"links": {
|
|
45
|
+
"first": "example",
|
|
46
|
+
"last": "example",
|
|
47
|
+
"prev": "example",
|
|
48
|
+
"next": "example"
|
|
49
|
+
},
|
|
50
|
+
"meta": {
|
|
51
|
+
"current_page": 1,
|
|
52
|
+
"from": 1,
|
|
53
|
+
"last_page": 1,
|
|
54
|
+
"links": [
|
|
55
|
+
{
|
|
56
|
+
"url": "https://agentmc.example.com/docs/incident-123",
|
|
57
|
+
"label": "example",
|
|
58
|
+
"active": true
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"path": "example",
|
|
62
|
+
"per_page": 25,
|
|
63
|
+
"total": 0
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
## Error Responses
|
|
70
|
+
|
|
71
|
+
### 401 (application/json)
|
|
72
|
+
Missing or invalid credentials.
|
|
73
|
+
|
|
74
|
+
```json
|
|
75
|
+
{
|
|
76
|
+
"error": {
|
|
77
|
+
"code": "validation.failed",
|
|
78
|
+
"message": "Validation failed.",
|
|
79
|
+
"details": {
|
|
80
|
+
"fields": {
|
|
81
|
+
"title": [
|
|
82
|
+
"The title field is required."
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 403 (application/json)
|
|
91
|
+
Forbidden.
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"error": {
|
|
96
|
+
"code": "validation.failed",
|
|
97
|
+
"message": "Validation failed.",
|
|
98
|
+
"details": {
|
|
99
|
+
"fields": {
|
|
100
|
+
"title": [
|
|
101
|
+
"The title field is required."
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
## SDK Example
|
|
111
|
+
|
|
112
|
+
```ts
|
|
113
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
114
|
+
|
|
115
|
+
const client = new AgentMCApi({
|
|
116
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
const result = await client.operations.listBoards({
|
|
120
|
+
"params": {
|
|
121
|
+
"query": {
|
|
122
|
+
"per_page": 25,
|
|
123
|
+
"scope": "all",
|
|
124
|
+
"personal_owner_user_id": 42
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
if (result.error) {
|
|
130
|
+
console.error(result.status, result.error);
|
|
131
|
+
} else {
|
|
132
|
+
console.log(result.data);
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## cURL Example
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
curl -X GET "https://agentmc.ai/api/v1/boards?per_page=25&scope=all&personal_owner_user_id=42" \\
|
|
140
|
+
-H "Accept: application/json" \\
|
|
141
|
+
-H "X-Api-Key: $AGENTMC_API_KEY"
|
|
142
|
+
```
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# listHosts
|
|
2
|
+
|
|
3
|
+
- Method: `GET`
|
|
4
|
+
- Path: `/hosts`
|
|
5
|
+
- Summary: List hosts for the current workspace.
|
|
6
|
+
- Auth: ApiKeyAuth OR AgentBearerAuth OR BearerAuth
|
|
7
|
+
|
|
8
|
+
## Description
|
|
9
|
+
|
|
10
|
+
Returns host records with connectivity state and machine metadata fields (meta) used for host diagnostics.
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| Name | In | Required | Description | Example |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| per_page | query | no | Page size for paginated responses. | 25 |
|
|
17
|
+
| status | query | no | Current lifecycle status for this record. Allowed values: online, offline. | "online" |
|
|
18
|
+
| search | query | no | Case-insensitive text search query. | "operations" |
|
|
19
|
+
|
|
20
|
+
## Request Example
|
|
21
|
+
|
|
22
|
+
None.
|
|
23
|
+
|
|
24
|
+
## Success Responses
|
|
25
|
+
|
|
26
|
+
### 200 (application/json)
|
|
27
|
+
Host list returned.
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"data": [
|
|
32
|
+
{
|
|
33
|
+
"id": 42,
|
|
34
|
+
"team_id": 42,
|
|
35
|
+
"name": "Example Name",
|
|
36
|
+
"fingerprint": "a3f56f330f311a2159f8c101eaf1439a29f1d57f007375d56aa79f304bc4f112",
|
|
37
|
+
"status": "online",
|
|
38
|
+
"last_seen_at": "2026-02-22T17:21:00Z",
|
|
39
|
+
"meta": {
|
|
40
|
+
"hostname": "worker-01",
|
|
41
|
+
"ip": "10.0.2.15",
|
|
42
|
+
"os": "Ubuntu",
|
|
43
|
+
"arch": "x86_64",
|
|
44
|
+
"cpu": "Intel Xeon",
|
|
45
|
+
"ram_gb": 32,
|
|
46
|
+
"runtime": {
|
|
47
|
+
"name": "openclaw",
|
|
48
|
+
"version": "1.14.2"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"created_by_user_id": 42,
|
|
52
|
+
"agents_total": 1,
|
|
53
|
+
"agents_online": 1,
|
|
54
|
+
"created_at": "2026-02-22T17:21:00Z",
|
|
55
|
+
"updated_at": "2026-02-22T17:21:00Z"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"links": {
|
|
59
|
+
"first": "example",
|
|
60
|
+
"last": "example",
|
|
61
|
+
"prev": "example",
|
|
62
|
+
"next": "example"
|
|
63
|
+
},
|
|
64
|
+
"meta": {
|
|
65
|
+
"current_page": 1,
|
|
66
|
+
"from": 1,
|
|
67
|
+
"last_page": 1,
|
|
68
|
+
"links": [
|
|
69
|
+
{
|
|
70
|
+
"url": "https://agentmc.example.com/docs/incident-123",
|
|
71
|
+
"label": "example",
|
|
72
|
+
"active": true
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"path": "example",
|
|
76
|
+
"per_page": 25,
|
|
77
|
+
"total": 0
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
## Error Responses
|
|
84
|
+
|
|
85
|
+
### 401 (application/json)
|
|
86
|
+
Missing or invalid credentials.
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"error": {
|
|
91
|
+
"code": "validation.failed",
|
|
92
|
+
"message": "Validation failed.",
|
|
93
|
+
"details": {
|
|
94
|
+
"fields": {
|
|
95
|
+
"title": [
|
|
96
|
+
"The title field is required."
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### 403 (application/json)
|
|
105
|
+
Forbidden.
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"error": {
|
|
110
|
+
"code": "validation.failed",
|
|
111
|
+
"message": "Validation failed.",
|
|
112
|
+
"details": {
|
|
113
|
+
"fields": {
|
|
114
|
+
"title": [
|
|
115
|
+
"The title field is required."
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
## SDK Example
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
128
|
+
|
|
129
|
+
const client = new AgentMCApi({
|
|
130
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
const result = await client.operations.listHosts({
|
|
134
|
+
"params": {
|
|
135
|
+
"query": {
|
|
136
|
+
"per_page": 25,
|
|
137
|
+
"status": "online",
|
|
138
|
+
"search": "operations"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
if (result.error) {
|
|
144
|
+
console.error(result.status, result.error);
|
|
145
|
+
} else {
|
|
146
|
+
console.log(result.data);
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## cURL Example
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
curl -X GET "https://agentmc.ai/api/v1/hosts?per_page=25&status=online&search=operations" \\
|
|
154
|
+
-H "Accept: application/json" \\
|
|
155
|
+
-H "X-Api-Key: $AGENTMC_API_KEY"
|
|
156
|
+
```
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# listLogs
|
|
2
|
+
|
|
3
|
+
- Method: `GET`
|
|
4
|
+
- Path: `/logs`
|
|
5
|
+
- Summary: List recent logs.
|
|
6
|
+
- Auth: ApiKeyAuth OR AgentBearerAuth OR BearerAuth
|
|
7
|
+
|
|
8
|
+
## Description
|
|
9
|
+
|
|
10
|
+
No additional description.
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| Name | In | Required | Description | Example |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| per_page | query | no | Page size for paginated responses. | 25 |
|
|
17
|
+
|
|
18
|
+
## Request Example
|
|
19
|
+
|
|
20
|
+
None.
|
|
21
|
+
|
|
22
|
+
## Success Responses
|
|
23
|
+
|
|
24
|
+
### 200 (application/json)
|
|
25
|
+
Logs returned.
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"data": [
|
|
30
|
+
{
|
|
31
|
+
"id": 42,
|
|
32
|
+
"team_id": 42,
|
|
33
|
+
"actor_type": "example",
|
|
34
|
+
"actor_id": 42,
|
|
35
|
+
"action": "example",
|
|
36
|
+
"subject_type": "example",
|
|
37
|
+
"subject_id": 42,
|
|
38
|
+
"meta": {
|
|
39
|
+
"key": "value"
|
|
40
|
+
},
|
|
41
|
+
"created_at": "2026-02-22T17:21:00Z"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"links": {
|
|
45
|
+
"first": "example",
|
|
46
|
+
"last": "example",
|
|
47
|
+
"prev": "example",
|
|
48
|
+
"next": "example"
|
|
49
|
+
},
|
|
50
|
+
"meta": {
|
|
51
|
+
"current_page": 1,
|
|
52
|
+
"from": 1,
|
|
53
|
+
"last_page": 1,
|
|
54
|
+
"links": [
|
|
55
|
+
{
|
|
56
|
+
"url": "https://agentmc.example.com/docs/incident-123",
|
|
57
|
+
"label": "example",
|
|
58
|
+
"active": true
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"path": "example",
|
|
62
|
+
"per_page": 25,
|
|
63
|
+
"total": 0
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
## Error Responses
|
|
70
|
+
|
|
71
|
+
### 401 (application/json)
|
|
72
|
+
Missing or invalid credentials.
|
|
73
|
+
|
|
74
|
+
```json
|
|
75
|
+
{
|
|
76
|
+
"error": {
|
|
77
|
+
"code": "validation.failed",
|
|
78
|
+
"message": "Validation failed.",
|
|
79
|
+
"details": {
|
|
80
|
+
"fields": {
|
|
81
|
+
"title": [
|
|
82
|
+
"The title field is required."
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 403 (application/json)
|
|
91
|
+
Forbidden.
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"error": {
|
|
96
|
+
"code": "validation.failed",
|
|
97
|
+
"message": "Validation failed.",
|
|
98
|
+
"details": {
|
|
99
|
+
"fields": {
|
|
100
|
+
"title": [
|
|
101
|
+
"The title field is required."
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
## SDK Example
|
|
111
|
+
|
|
112
|
+
```ts
|
|
113
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
114
|
+
|
|
115
|
+
const client = new AgentMCApi({
|
|
116
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
const result = await client.operations.listLogs({
|
|
120
|
+
"params": {
|
|
121
|
+
"query": {
|
|
122
|
+
"per_page": 25
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
if (result.error) {
|
|
128
|
+
console.error(result.status, result.error);
|
|
129
|
+
} else {
|
|
130
|
+
console.log(result.data);
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## cURL Example
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
curl -X GET "https://agentmc.ai/api/v1/logs?per_page=25" \\
|
|
138
|
+
-H "Accept: application/json" \\
|
|
139
|
+
-H "X-Api-Key: $AGENTMC_API_KEY"
|
|
140
|
+
```
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# listNotifications
|
|
2
|
+
|
|
3
|
+
- Method: `GET`
|
|
4
|
+
- Path: `/notifications`
|
|
5
|
+
- Summary: List workspace notifications (mentions and assignments) for the authenticated principal.
|
|
6
|
+
- Auth: ApiKeyAuth OR AgentBearerAuth OR BearerAuth
|
|
7
|
+
|
|
8
|
+
## Description
|
|
9
|
+
|
|
10
|
+
No additional description.
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| Name | In | Required | Description | Example |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| unread | query | no | Filter unread notifications only. Accepts true/false (and 1/0). | true |
|
|
17
|
+
| per_page | query | no | Page size for paginated responses. | 25 |
|
|
18
|
+
|
|
19
|
+
## Request Example
|
|
20
|
+
|
|
21
|
+
None.
|
|
22
|
+
|
|
23
|
+
## Success Responses
|
|
24
|
+
|
|
25
|
+
### 200 (application/json)
|
|
26
|
+
Notifications returned.
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"data": [
|
|
31
|
+
{
|
|
32
|
+
"id": "c084fc57-b2c6-466c-adcb-cf6f4efca42a",
|
|
33
|
+
"notification_type": "mention",
|
|
34
|
+
"source_type": "App\\Notifications\\MentionedInCommentNotification",
|
|
35
|
+
"workspace_id": 7,
|
|
36
|
+
"subject_type": "task",
|
|
37
|
+
"subject_id": 121,
|
|
38
|
+
"subject_label": "Prepare incident postmortem",
|
|
39
|
+
"actor_type": "user",
|
|
40
|
+
"actor_id": 3,
|
|
41
|
+
"actor_name": "Alex Morgan",
|
|
42
|
+
"assignee_type": null,
|
|
43
|
+
"assignee_id": null,
|
|
44
|
+
"mention_handle": "@tim",
|
|
45
|
+
"comment": "Can you own the timeline section before standup?",
|
|
46
|
+
"message": "Alex Morgan mentioned you in task: Prepare incident postmortem.",
|
|
47
|
+
"url": "/tasks/121?comment=998",
|
|
48
|
+
"comment_id": 998,
|
|
49
|
+
"response_action": {
|
|
50
|
+
"type": "post_comment_reply",
|
|
51
|
+
"method": "POST",
|
|
52
|
+
"path": "/tasks/121/comments",
|
|
53
|
+
"request_body": {
|
|
54
|
+
"body": "Thanks, I can own the timeline section."
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"is_read": false,
|
|
58
|
+
"read_at": null,
|
|
59
|
+
"created_at": "2026-02-24T02:11:00Z",
|
|
60
|
+
"updated_at": "2026-02-24T02:11:00Z"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"links": {
|
|
64
|
+
"first": "example",
|
|
65
|
+
"last": "example",
|
|
66
|
+
"prev": "example",
|
|
67
|
+
"next": "example"
|
|
68
|
+
},
|
|
69
|
+
"meta": {
|
|
70
|
+
"current_page": 1,
|
|
71
|
+
"from": 1,
|
|
72
|
+
"last_page": 1,
|
|
73
|
+
"links": [
|
|
74
|
+
{
|
|
75
|
+
"url": "https://agentmc.example.com/docs/incident-123",
|
|
76
|
+
"label": "example",
|
|
77
|
+
"active": true
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"path": "example",
|
|
81
|
+
"per_page": 25,
|
|
82
|
+
"total": 0
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
## Error Responses
|
|
89
|
+
|
|
90
|
+
### 401 (application/json)
|
|
91
|
+
Missing or invalid credentials.
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"error": {
|
|
96
|
+
"code": "validation.failed",
|
|
97
|
+
"message": "Validation failed.",
|
|
98
|
+
"details": {
|
|
99
|
+
"fields": {
|
|
100
|
+
"title": [
|
|
101
|
+
"The title field is required."
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### 403 (application/json)
|
|
110
|
+
Forbidden.
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"error": {
|
|
115
|
+
"code": "validation.failed",
|
|
116
|
+
"message": "Validation failed.",
|
|
117
|
+
"details": {
|
|
118
|
+
"fields": {
|
|
119
|
+
"title": [
|
|
120
|
+
"The title field is required."
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### 422 (application/json)
|
|
129
|
+
Validation failed.
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
{
|
|
133
|
+
"error": {
|
|
134
|
+
"code": "validation.failed",
|
|
135
|
+
"message": "Validation failed.",
|
|
136
|
+
"details": {
|
|
137
|
+
"fields": {
|
|
138
|
+
"title": [
|
|
139
|
+
"The title field is required."
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
## SDK Example
|
|
149
|
+
|
|
150
|
+
```ts
|
|
151
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
152
|
+
|
|
153
|
+
const client = new AgentMCApi({
|
|
154
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
const result = await client.operations.listNotifications({
|
|
158
|
+
"params": {
|
|
159
|
+
"query": {
|
|
160
|
+
"unread": true,
|
|
161
|
+
"per_page": 25
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
if (result.error) {
|
|
167
|
+
console.error(result.status, result.error);
|
|
168
|
+
} else {
|
|
169
|
+
console.log(result.data);
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## cURL Example
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
curl -X GET "https://agentmc.ai/api/v1/notifications?unread=true&per_page=25" \\
|
|
177
|
+
-H "Accept: application/json" \\
|
|
178
|
+
-H "X-Api-Key: $AGENTMC_API_KEY"
|
|
179
|
+
```
|