-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.json
More file actions
2096 lines (2096 loc) · 72 KB
/
Copy pathopenapi.json
File metadata and controls
2096 lines (2096 loc) · 72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"openapi": "3.1.0",
"info": {
"title": "HookPulse",
"version": "2d690e87",
"description": "Dead-man switch for webhooks/cron. Index: GET /api/."
},
"servers": [
{
"url": "https://hookpulse.net"
}
],
"components": {
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer",
"description": "Guest token (`POST /api/guest`) in `X-Guest-Token: hp_…` or `Authorization: Bearer hp_…`. A `sess_…` session also works."
}
},
"schemas": {
"Monitor": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Monitor ID; it is the `:id` of the ingest URL."
},
"name": {
"type": "string",
"description": "Name you gave it, to recognise it in the alert."
},
"interval_sec": {
"type": "integer",
"description": "Tolerated silence, in seconds. Past that, it is a miss."
},
"alert_to": {
"type": "string",
"description": "E-mail alerted on a miss.",
"nullable": true
},
"alert_url": {
"type": "string",
"description": "HTTPS URL that receives a POST on a miss (Slack, Discord, n8n).",
"nullable": true
},
"last_event_at": {
"type": "string",
"description": "Last ping received (UTC); `null` while it never pinged.",
"nullable": true
},
"last_status": {
"type": "integer",
"description": "HTTP status the last ping sent, when it did.",
"nullable": true
},
"last_latency_ms": {
"type": "integer",
"description": "Latency reported in the last ping, in ms.",
"nullable": true
},
"miss_count": {
"type": "integer",
"description": "How many times this monitor has gone silent."
},
"alerted_at": {
"type": "string",
"description": "When the last alert went out — it is what holds the 1 alert/24h cap.",
"nullable": true
},
"active": {
"type": "boolean",
"description": "Whether the monitor is on."
},
"healthy": {
"type": "boolean",
"description": "`true` when it has pinged at least once and is not overdue."
},
"overdue": {
"type": "boolean",
"description": "`true` when the silence passed `interval_sec`."
},
"waiting_first_ping": {
"type": "boolean",
"description": "`true` while it never pinged. Neither healthy nor overdue: nobody has wired it yet."
},
"created_at": {
"type": "string",
"description": "When the monitor was created (UTC)."
},
"ingest_url": {
"type": "string",
"description": "The URL your cron/webhook calls to prove life."
},
"token": {
"type": "string",
"description": "Read token of this monitor. Only comes on creation and to the owner."
},
"status_url": {
"type": "string",
"description": "Status of this monitor with the token already in the query."
},
"events_url": {
"type": "string",
"description": "Latest pings with the token already in the query."
},
"curl_example": {
"type": "string",
"description": "The ingest `curl`, ready to paste in the cron."
},
"templates": {
"allOf": [
{
"$ref": "#/components/schemas/Templates"
}
],
"description": "Ingest snippets and the alert body, with this monitor already in them."
}
},
"required": [
"id",
"name",
"interval_sec",
"alert_to",
"alert_url",
"last_event_at",
"last_status",
"last_latency_ms",
"miss_count",
"alerted_at",
"active",
"healthy",
"overdue",
"waiting_first_ping",
"created_at",
"ingest_url"
],
"description": "A dead-man switch: the thing you make ping. If the ping stops for longer than `interval_sec`, it becomes `overdue` and the alert goes out."
},
"Templates": {
"type": "object",
"properties": {
"ingest_curl": {
"type": "string",
"description": "A `curl` that works as proof of life."
},
"ingest_cron": {
"type": "string",
"description": "The equivalent crontab line."
},
"ingest_n8n": {
"type": "string",
"description": "How to call the ingest from n8n."
},
"miss_json": {
"type": "string",
"description": "The exact JSON we POST to `alert_url` when the silence becomes a miss."
},
"miss_url_hint": {
"type": "string",
"description": "What works as `alert_url` — public HTTPS only."
}
},
"required": [
"ingest_curl",
"ingest_cron",
"ingest_n8n",
"miss_json",
"miss_url_hint"
],
"description": "How to ping and what we send when it fails. It is what saves guessing the format."
},
"Billing": {
"type": "object",
"properties": {
"provider": {
"type": "string",
"description": "Always `x402` — the only billing protocol accepted."
},
"mode": {
"type": "string",
"description": "Seller mode: `live` charges for real, `dev` lets calls through unpaid."
},
"network": {
"type": "string",
"description": "USDC network: `base` in production, `base-sepolia` in staging."
},
"chain_id": {
"type": "integer",
"description": "EVM chain ID of the network above, so the wallet signs on the right chain."
},
"pay_to": {
"type": "string",
"description": "Address that receives the payment.",
"nullable": true
},
"homolog": {
"type": "boolean",
"description": "Staging seam on: the loop can be closed without spending USDC."
},
"dev": {
"type": "boolean",
"description": "Development mode: the 402 is simulated."
},
"dev_gate": {
"type": "string",
"description": "How dev mode is unlocked, when it exists.",
"nullable": true
},
"facilitator": {
"type": "string",
"description": "URL of the facilitator that verifies and settles the payment."
},
"asset": {
"type": "string",
"description": "Accepted currency — always `USDC`."
},
"asset_address": {
"type": "string",
"description": "USDC contract on the network above."
},
"faucet": {
"type": "string",
"description": "Test-USDC faucet; only on base-sepolia.",
"nullable": true
},
"wallets": {
"type": "object",
"description": "Links to wallets that speak x402 (metamask, coinbase, base_app)."
},
"product": {
"type": "string",
"description": "Name of the product charging."
},
"free_max_endpoints": {
"type": "integer",
"description": "Free monitors per owner."
},
"free_min_interval_sec": {
"type": "integer",
"description": "Shortest interval that is still free. Below it, it costs."
},
"free_email_alerts": {
"type": "integer",
"description": "Free e-mail alert registrations; the rest is paid (it is SES cost per miss)."
},
"prices": {
"allOf": [
{
"$ref": "#/components/schemas/Precos"
}
],
"description": "What each paid action costs, in USD."
},
"usage": {
"type": "object",
"description": "How much of the allowance the owner has used."
},
"trial": {
"allOf": [
{
"$ref": "#/components/schemas/Trial"
}
],
"description": "The account's trial, when there is a session."
}
},
"required": [
"provider",
"mode",
"network",
"chain_id",
"pay_to",
"homolog",
"dev",
"dev_gate",
"facilitator",
"asset",
"asset_address",
"faucet",
"wallets",
"product",
"free_max_endpoints",
"free_min_interval_sec",
"free_email_alerts",
"prices",
"usage",
"trial"
],
"description": "Everything that decides whether the next call will cost: x402 configuration, allowance, prices and trial."
},
"Precos": {
"type": "object",
"properties": {
"extra_endpoint_usd": {
"type": "number",
"description": "Monitor beyond the allowance."
},
"fast_interval_usd": {
"type": "number",
"description": "Interval below the free minimum."
},
"email_alert_usd": {
"type": "number",
"description": "E-mail alert registration beyond the first."
},
"contact_agent_usd": {
"type": "number",
"description": "Agent contact."
}
},
"required": [
"extra_endpoint_usd",
"fast_interval_usd",
"email_alert_usd",
"contact_agent_usd"
],
"description": "Prices in force, in dollars. Read them here, not from the documentation."
},
"Trial": {
"type": "object",
"properties": {
"days": {
"type": "integer",
"description": "Trial length in days."
},
"active": {
"type": "boolean",
"description": "Whether it is in force now."
},
"days_left": {
"type": "integer",
"description": "How many days remain."
},
"ends_at": {
"type": "string",
"description": "When it ends (UTC).",
"nullable": true
},
"granted": {
"type": "boolean",
"description": "`true` when THIS call granted the trial."
}
},
"required": [
"days",
"active",
"ends_at"
],
"description": "The period without the usage paywall that confirming the e-mail grants. It is the alternative to paying."
},
"Ok": {
"type": "object",
"properties": {
"ok": {
"type": "boolean",
"description": "Always `true` — failure comes as a 4xx/5xx status, not as `ok:false`."
}
},
"required": [
"ok"
],
"description": "Write confirmation with no body of its own to return."
},
"Ping": {
"type": "object",
"properties": {
"at": {
"type": "string",
"description": "When it arrived (UTC)."
},
"status": {
"type": "integer",
"description": "Status reported by the caller, when it did.",
"nullable": true
},
"latency_ms": {
"type": "integer",
"description": "Latency reported by the caller, in ms.",
"nullable": true
},
"source": {
"type": "string",
"description": "Where it came from: `get` or `post`.",
"nullable": true
}
},
"required": [
"at",
"status",
"latency_ms",
"source"
],
"description": "A ping received at the ingest — the proof of life."
},
"Feed": {
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Feed token. Read-only: it does not create, change or delete."
},
"rotated": {
"type": "boolean",
"description": "`true` when this call rotated the token and invalidated the previous URL."
},
"json": {
"type": "string",
"description": "URL of the dashboard as JSON."
},
"rss": {
"type": "string",
"description": "URL of the same dashboard as RSS 2.0."
},
"note": {
"type": "string",
"description": "The warning that whoever has the link reads the dashboard."
},
"api_index": {
"type": "string",
"description": "Self-describing API index."
}
},
"required": [
"token",
"rotated",
"json",
"rss",
"note",
"api_index"
],
"description": "The URLs of the owner's public dashboard, with the token just minted or rotated."
},
"FeedStatus": {
"type": "object",
"properties": {
"generated_at": {
"type": "string",
"description": "When this dashboard was built (UTC)."
},
"summary": {
"allOf": [
{
"$ref": "#/components/schemas/ResumoStatus"
}
],
"description": "The number you look at first."
},
"endpoints": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LinhaStatus"
},
"description": "One row per monitor, with no secret at all."
},
"_links": {
"type": "object",
"description": "This dashboard as JSON, as RSS and the API index."
}
},
"required": [
"generated_at",
"summary",
"endpoints",
"_links"
],
"description": "The owner's whole status dashboard, addressable by URL. The token in the path IS the credential — whoever has the link, reads."
},
"ResumoStatus": {
"type": "object",
"properties": {
"total": {
"type": "integer",
"description": "Monitors on the dashboard."
},
"ok": {
"type": "integer",
"description": "Active and healthy."
},
"overdue": {
"type": "integer",
"description": "Active and silent beyond the interval."
},
"waiting_first_ping": {
"type": "integer",
"description": "Active ones that never pinged."
},
"inactive": {
"type": "integer",
"description": "Deactivated."
},
"all_ok": {
"type": "boolean",
"description": "`true` only with at least one monitor, none overdue and none waiting for the first ping — one that never pinged does not count as healthy."
}
},
"required": [
"total",
"ok",
"overdue",
"waiting_first_ping",
"inactive",
"all_ok"
],
"description": "The set in numbers. `all_ok` is the field for an external monitor to check without understanding the rest."
},
"LinhaStatus": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Stable label of THIS dashboard, derived from the pair (feed token, monitor) — it is not the ingest id, and it changes when the owner rotates the token. The real id does not leave here because `GET /in/:id` asks for no credential: publishing it would give whoever only reads the power to reset the silence counter."
},
"name": {
"type": "string",
"description": "Name given by the owner."
},
"status": {
"type": "string",
"description": "State in one word."
},
"healthy": {
"type": "boolean",
"description": "Whether it is healthy now."
},
"overdue": {
"type": "boolean",
"description": "Whether it is silent beyond the interval."
},
"interval_sec": {
"type": "integer",
"description": "Tolerated silence, in seconds."
},
"last_event_at": {
"type": "string",
"description": "Last ping (UTC).",
"nullable": true
},
"miss_count": {
"type": "integer",
"description": "How many misses have happened."
},
"alerts": {
"type": "object",
"description": "Which alert channels are on: `{ email, url }` — booleans, never the address."
}
},
"required": [
"id",
"name",
"status",
"healthy",
"overdue",
"interval_sec",
"last_event_at",
"miss_count",
"alerts"
],
"description": "A monitor on the public dashboard: enough to know the state, with no token, no e-mail and no ingest id."
},
"Conta": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ID of the account."
},
"email": {
"type": "string",
"description": "E-mail confirmed by code."
}
},
"required": [
"id",
"email"
],
"description": "The person behind the session."
},
"Metricas": {
"type": "object",
"properties": {
"app": {
"type": "string",
"description": "Product name."
},
"today": {
"type": "string",
"description": "Reference day (UTC, YYYY-MM-DD)."
},
"today_visits": {
"type": "integer",
"description": "Visits counted today."
},
"today_contacts": {
"type": "integer",
"description": "Contact messages received today. Only with `METRICS_TOKEN`: contact does not leave without a token."
},
"days": {
"type": "array",
"items": {
"type": "object"
},
"description": "One record per day of the window, with the counts of each metric."
},
"usage": {
"type": "object",
"description": "Usage per product resource — here, monitors."
},
"accounts": {
"type": "object",
"description": "Total guests and accounts."
},
"financeiro": {
"type": "object",
"description": "Aggregate of the day: `hoje_usd`, `hoje_count`, `rede`. Only with `METRICS_TOKEN`: money does not leave without a token; the full series is `payments`."
},
"payments": {
"type": "object",
"description": "Finance summary; only with METRICS_TOKEN."
}
},
"required": [
"app",
"today",
"today_visits",
"days",
"usage",
"accounts"
],
"description": "7-day panel. `payments` only shows with the operator token and only on Base mainnet."
}
}
},
"paths": {
"/okf/{arquivo}": {
"get": {
"operationId": "get_okf_by_arquivo",
"summary": "OKF bundle (Open Knowledge Format v0.1): markdown with frontmatter so an agent reads the whole product without parsing HTML.",
"description": "Returns: `text/markdown`. Start at `/okf/index.md`, which lists the bundle.",
"security": [],
"parameters": [
{
"name": "arquivo",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "`text/markdown`. Start at `/okf/index.md`, which lists the bundle."
},
"404": {
"description": "File outside the bundle."
}
}
}
},
"/.well-known/{arquivo}": {
"get": {
"operationId": "get_well_known_by_arquivo",
"summary": "Machine discovery before the home page: `api-catalog` (RFC 9727, a linkset with the API and the MCP), `security.txt` (RFC 9116) and `mcp-registry-auth` (the official MCP registry key).",
"description": "Returns: `application/linkset+json` for the api-catalog; `text/plain` for the other two.",
"security": [],
"parameters": [
{
"name": "arquivo",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "`application/linkset+json` for the api-catalog; `text/plain` for the other two."
},
"404": {
"description": "Name outside the four published."
}
}
}
},
"/apis.json": {
"get": {
"operationId": "get_apis_json",
"summary": "APIs.json (apisjson.org, 0.19): the index APIs.io harvests — the API, the MCP, OpenAPI, guide and OKF bundle in one file. Also at `/.well-known/apis.json`.",
"description": "Returns: `application/json` in the APIs.json 0.19 format: `apis[]` with `baseURL`, `humanURL` and `properties[]`.",
"security": [],
"responses": {
"200": {
"description": "`application/json` in the APIs.json 0.19 format: `apis[]` with `baseURL`, `humanURL` and `properties[]`."
}
}
}
},
"/api/": {
"get": {
"operationId": "api_index",
"summary": "Self-describing index: the whole API surface, with quota and quickstart.",
"description": "Returns: { name, description, build, base_url, docs, conventions, auth, endpoints, quota, mcp, mcp_tools, quickstart }",
"security": [],
"responses": {
"200": {
"description": "{ name, description, build, base_url, docs, conventions, auth, endpoints, quota, mcp, mcp_tools, quickstart }",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Product name."
},
"description": {
"type": "string",
"description": "What the product does, in one sentence."
},
"build": {
"type": "string",
"description": "Deployed commit."
},
"base_url": {
"type": "string",
"description": "Origin this API is serving from."
},
"docs": {
"type": "object",
"description": "Links to llms.txt, llms-full.txt, openapi.json, MCP and the UI."
},
"conventions": {
"type": "object",
"description": "Error format, CORS, x402 and the UI↔API parity rule."
},
"auth": {
"type": "object",
"description": "Each authentication mode and how to obtain it."
},
"endpoints": {
"type": "array",
"items": {
"type": "object"
},
"description": "Every endpoint with method, path, auth, absolute URL and what it returns."
},
"quota": {
"type": "object",
"description": "What is free, what costs and how to pay — before you spend a call."
},
"mcp": {
"type": "object",
"description": "Address and transport of the MCP server."
},
"mcp_tools": {
"type": "array",
"items": {
"type": "string"
},
"description": "Name of each MCP tool."
},
"quickstart": {
"type": "array",
"items": {
"type": "string"
},
"description": "The calls that take you from zero to the first monitor."
}
},
"required": [
"name",
"description",
"build",
"base_url",
"docs",
"conventions",
"auth",
"endpoints",
"quota",
"mcp",
"mcp_tools",
"quickstart"
]
}
}
}
}
}
}
},
"/api/health": {
"get": {
"operationId": "health",
"summary": "Liveness and the commit deployed right now — it is how the smoke waits for its own deploy.",
"description": "Returns: { ok, app, build, ts }",
"security": [],
"responses": {
"200": {
"description": "{ ok, app, build, ts }",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ok": {
"type": "boolean",
"description": "Always `true` when the Worker answers."
},
"app": {
"type": "string",
"description": "Product name."
},
"build": {
"type": "string",
"description": "Deployed commit; CI passes the short SHA on deploy."
},
"ts": {
"type": "string",
"description": "Time of the response (UTC, ISO-8601)."
}
},
"required": [
"ok",
"app",
"build",
"ts"
]
}
}
}
}
}
}
},
"/mcp": {
"post": {
"operationId": "post_mcp",
"summary": "MCP server over HTTP (Streamable HTTP, JSON-RPC 2.0) — plugs into the client with nothing to install.",
"description": "The tools are the operations of this same catalog; the MCP has no backend of its own. `GET /mcp` returns the server card.\nReturns: JSON-RPC 2.0 response (`initialize`, `tools/list` or `tools/call`).\nCredentials go in the usual headers (X-Guest-Token, Authorization, X-PAYMENT) and are forwarded to the API.\nAn exhausted quota comes back as a 402 with accepts[] inside the tool result — pay and repeat.",
"security": [],
"responses": {
"200": {
"description": "JSON-RPC 2.0 response (`initialize`, `tools/list` or `tools/call`)."
}
}
}
},
"/api/guest": {
"post": {
"operationId": "create_guest",
"summary": "Creates a guest `hp_…` — it is the anonymous owner of your monitors.",
"description": "Keep the token: without it there is no way back to the monitors, unless you have already tied them to an e-mail.\nReturns: { token }",
"security": [],
"responses": {
"200": {
"description": "{ token }",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "The guest, prefix `hp_`. Send it in `X-Guest-Token` or as Bearer."
}
},
"required": [
"token"
]
}
}
}
}
}
}
},
"/api/endpoints": {
"get": {
"operationId": "list_endpoints",
"summary": "Lists the owner's monitors, with the state of each one.",
"description": "Returns: { endpoints[{id,name,interval_sec,alert_to,alert_url,last_event_at,last_status,last_latency_ms,miss_count,alerted_at,active,healthy,overdue,waiting_first_ping,created_at,ingest_url,token?,status_url?,events_url?,curl_example?,templates?}], guest, billing?{provider,mode,network,chain_id,pay_to,homolog,dev,dev_gate,facilitator,asset,asset_address,faucet,wallets,product,free_max_endpoints,free_min_interval_sec,free_email_alerts,prices,usage,trial} }",
"security": [
{
"bearerAuth": []
}
],
"responses": {
"200": {
"description": "{ endpoints[{id,name,interval_sec,alert_to,alert_url,last_event_at,last_status,last_latency_ms,miss_count,alerted_at,active,healthy,overdue,waiting_first_ping,created_at,ingest_url,token?,status_url?,events_url?,curl_example?,templates?}], guest, billing?{provider,mode,network,chain_id,pay_to,homolog,dev,dev_gate,facilitator,asset,asset_address,faucet,wallets,product,free_max_endpoints,free_min_interval_sec,free_email_alerts,prices,usage,trial} }",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"endpoints": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Monitor"
},
"description": "The owner's monitors, without the secret fields."
},
"guest": {
"type": "string",
"description": "The guest that owns this list.",
"nullable": true
},
"billing": {
"allOf": [
{
"$ref": "#/components/schemas/Billing"
}
],
"description": "Prices and allowance, to decide before creating the next one."
}
},
"required": [
"endpoints",
"guest"
]
}
}
}
},
"401": {
"description": "No credential, or an invalid one. See this endpoint's auth."
}
}
},
"post": {
"operationId": "create_endpoint",
"summary": "Creates a dead-man switch: silence beyond the interval becomes an alert.",
"description": "This response is the only one that shows the monitor's `token` and the `templates` — keep them. The second monitor, or an interval below the free minimum, answers **402 with `accepts[]`**: pay and repeat. A miss alerts at most once per 24h (or per interval, if it is longer).\nReturns: { id, name, interval_sec, alert_to, alert_url, last_event_at, last_status, last_latency_ms, miss_count, alerted_at, active, healthy, overdue, waiting_first_ping, created_at, ingest_url, token?, status_url?, events_url?, curl_example?, templates?{ingest_curl,ingest_cron,ingest_n8n,miss_json,miss_url_hint} }",
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name to recognise the monitor in the alert."
},
"interval_sec": {
"type": "integer",
"description": "Tolerated silence, in seconds. Below the free minimum, it costs."
},
"alert_to": {
"type": "string",
"description": "E-mail to alert on a miss; without it, the account is alerted."
},
"alert_url": {
"type": "string",
"description": "Public HTTPS URL that receives a POST on a miss (Slack Incoming, Discord, n8n)."
}
},
"required": [
"name"
]
},
"example": {
"name": "prod cron",
"interval_sec": 900,
"alert_to": "optional@email.com",
"alert_url": "https://n8n.example/webhook/hp"
}
}
}
},
"responses": {
"200": {
"description": "{ id, name, interval_sec, alert_to, alert_url, last_event_at, last_status, last_latency_ms, miss_count, alerted_at, active, healthy, overdue, waiting_first_ping, created_at, ingest_url, token?, status_url?, events_url?, curl_example?, templates?{ingest_curl,ingest_cron,ingest_n8n,miss_json,miss_url_hint} }",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Monitor"
}
}
}
},
"400": {
"description": "Empty name, invalid interval or an `alert_url` that is not public HTTPS."
},
"401": {
"description": "No credential, or an invalid one. See this endpoint's auth."
},
"402": {
"description": "Quota exceeded. The response carries `accepts[]` (x402, USDC on Base): pay and repeat the same call with `X-PAYMENT`."
}
}
}
},
"/api/endpoints/{id}": {