forked from NdoleStudio/httpsms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswagger.yaml
More file actions
3042 lines (3042 loc) · 81.8 KB
/
swagger.yaml
File metadata and controls
3042 lines (3042 loc) · 81.8 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
basePath: /v1
definitions:
entities.BillingUsage:
properties:
created_at:
example: "2022-06-05T14:26:02.302718+03:00"
type: string
end_timestamp:
example: "2022-01-31T23:59:59+00:00"
type: string
id:
example: 32343a19-da5e-4b1b-a767-3298a73703cb
type: string
received_messages:
example: 465
type: integer
sent_messages:
example: 321
type: integer
start_timestamp:
example: "2022-01-01T00:00:00+00:00"
type: string
total_cost:
example: 0
type: integer
updated_at:
example: "2022-06-05T14:26:10.303278+03:00"
type: string
user_id:
example: WB7DRDWrJZRGbYrv2CKGkqbzvqdC
type: string
required:
- created_at
- end_timestamp
- id
- received_messages
- sent_messages
- start_timestamp
- total_cost
- updated_at
- user_id
type: object
entities.Discord:
properties:
created_at:
example: "2022-06-05T14:26:02.302718+03:00"
type: string
id:
example: 32343a19-da5e-4b1b-a767-3298a73703cb
type: string
incoming_channel_id:
example: "1095780203256627291"
type: string
name:
example: Game Server
type: string
server_id:
example: "1095778291488653372"
type: string
updated_at:
example: "2022-06-05T14:26:10.303278+03:00"
type: string
user_id:
example: WB7DRDWrJZRGbYrv2CKGkqbzvqdC
type: string
required:
- created_at
- id
- incoming_channel_id
- name
- server_id
- updated_at
- user_id
type: object
entities.Heartbeat:
properties:
charging:
example: true
type: boolean
id:
example: 32343a19-da5e-4b1b-a767-3298a73703cb
type: string
owner:
example: "+18005550199"
type: string
timestamp:
example: "2022-06-05T14:26:01.520828+03:00"
type: string
user_id:
example: WB7DRDWrJZRGbYrv2CKGkqbzvqdC
type: string
version:
example: 344c10f
type: string
required:
- charging
- id
- owner
- timestamp
- user_id
- version
type: object
entities.Message:
properties:
can_be_polled:
example: false
type: boolean
contact:
example: "+18005550100"
type: string
content:
example: This is a sample text message
type: string
created_at:
example: "2022-06-05T14:26:02.302718+03:00"
type: string
delivered_at:
example: "2022-06-05T14:26:09.527976+03:00"
type: string
encrypted:
example: false
type: boolean
expired_at:
example: "2022-06-05T14:26:09.527976+03:00"
type: string
failed_at:
example: "2022-06-05T14:26:09.527976+03:00"
type: string
failure_reason:
example: UNKNOWN
type: string
id:
example: 32343a19-da5e-4b1b-a767-3298a73703cb
type: string
last_attempted_at:
example: "2022-06-05T14:26:09.527976+03:00"
type: string
max_send_attempts:
example: 1
type: integer
order_timestamp:
example: "2022-06-05T14:26:09.527976+03:00"
type: string
owner:
example: "+18005550199"
type: string
received_at:
example: "2022-06-05T14:26:09.527976+03:00"
type: string
request_id:
example: 153554b5-ae44-44a0-8f4f-7bbac5657ad4
type: string
request_received_at:
example: "2022-06-05T14:26:01.520828+03:00"
type: string
scheduled_at:
example: "2022-06-05T14:26:09.527976+03:00"
type: string
scheduled_send_time:
example: "2022-06-05T14:26:09.527976+03:00"
type: string
send_attempt_count:
example: 0
type: integer
send_time:
description:
SendDuration is the number of nanoseconds from when the request
was received until when the mobile phone send the message
example: 133414
type: integer
sent_at:
example: "2022-06-05T14:26:09.527976+03:00"
type: string
sim:
description: |-
SIM is the SIM card to use to send the message
* SMS1: use the SIM card in slot 1
* SMS2: use the SIM card in slot 2
* DEFAULT: used the default communication SIM card
example: DEFAULT
type: string
status:
example: pending
type: string
type:
example: mobile-terminated
type: string
updated_at:
example: "2022-06-05T14:26:10.303278+03:00"
type: string
user_id:
example: WB7DRDWrJZRGbYrv2CKGkqbzvqdC
type: string
required:
- can_be_polled
- contact
- content
- created_at
- delivered_at
- encrypted
- expired_at
- failed_at
- failure_reason
- id
- last_attempted_at
- max_send_attempts
- order_timestamp
- owner
- received_at
- request_id
- request_received_at
- scheduled_at
- scheduled_send_time
- send_attempt_count
- send_time
- sent_at
- sim
- status
- type
- updated_at
- user_id
type: object
entities.MessageThread:
properties:
color:
example: indigo
type: string
contact:
example: "+18005550100"
type: string
created_at:
example: "2022-06-05T14:26:09.527976+03:00"
type: string
id:
example: 32343a19-da5e-4b1b-a767-3298a73703ca
type: string
is_archived:
example: false
type: boolean
last_message_content:
example: This is a sample message content
type: string
last_message_id:
example: 32343a19-da5e-4b1b-a767-3298a73703ca
type: string
order_timestamp:
example: "2022-06-05T14:26:09.527976+03:00"
type: string
owner:
example: "+18005550199"
type: string
status:
example: PENDING
type: string
updated_at:
example: "2022-06-05T14:26:09.527976+03:00"
type: string
user_id:
example: WB7DRDWrJZRGbYrv2CKGkqbzvqdC
type: string
required:
- color
- contact
- created_at
- id
- is_archived
- last_message_content
- last_message_id
- order_timestamp
- owner
- status
- updated_at
- user_id
type: object
entities.Phone:
properties:
created_at:
example: "2022-06-05T14:26:02.302718+03:00"
type: string
fcm_token:
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzd.....
type: string
id:
example: 32343a19-da5e-4b1b-a767-3298a73703cb
type: string
max_send_attempts:
description:
MaxSendAttempts determines how many times to retry sending an
SMS message
example: 2
type: integer
message_expiration_seconds:
description:
MessageExpirationSeconds is the duration in seconds after sending
a message when it is considered to be expired.
type: integer
messages_per_minute:
example: 1
type: integer
missed_call_auto_reply:
example: This phone cannot receive calls. Please send an SMS instead.
type: string
phone_number:
example: "+18005550199"
type: string
sim:
description: SIM card that received the message
type: string
updated_at:
example: "2022-06-05T14:26:10.303278+03:00"
type: string
user_id:
example: WB7DRDWrJZRGbYrv2CKGkqbzvqdC
type: string
required:
- created_at
- fcm_token
- id
- max_send_attempts
- message_expiration_seconds
- messages_per_minute
- missed_call_auto_reply
- phone_number
- sim
- updated_at
- user_id
type: object
entities.PhoneAPIKey:
properties:
api_key:
example: pk_DGW8NwQp7mxKaSZ72Xq9v6xxxxx
type: string
created_at:
example: "2022-06-05T14:26:02.302718+03:00"
type: string
id:
example: 32343a19-da5e-4b1b-a767-3298a73703cb
type: string
name:
example: Business Phone Key
type: string
phone_ids:
example:
- 32343a19-da5e-4b1b-a767-3298a73703cb
- 32343a19-da5e-4b1b-a767-3298a73703cc
items:
type: string
type: array
phone_numbers:
example:
- "+18005550199"
- "+18005550100"
items:
type: string
type: array
updated_at:
example: "2022-06-05T14:26:02.302718+03:00"
type: string
user_email:
example: user@gmail.com
type: string
user_id:
example: WB7DRDWrJZRGbYrv2CKGkqbzvqdC
type: string
required:
- api_key
- created_at
- id
- name
- phone_ids
- phone_numbers
- updated_at
- user_email
- user_id
type: object
entities.User:
properties:
active_phone_id:
example: 32343a19-da5e-4b1b-a767-3298a73703cb
type: string
api_key:
example: x-api-key
type: string
created_at:
example: "2022-06-05T14:26:02.302718+03:00"
type: string
email:
example: name@email.com
type: string
id:
example: WB7DRDWrJZRGbYrv2CKGkqbzvqdC
type: string
notification_heartbeat_enabled:
example: true
type: boolean
notification_message_status_enabled:
example: true
type: boolean
notification_newsletter_enabled:
example: true
type: boolean
notification_webhook_enabled:
example: true
type: boolean
subscription_ends_at:
example: "2022-06-05T14:26:02.302718+03:00"
type: string
subscription_id:
example: 8f9c71b8-b84e-4417-8408-a62274f65a08
type: string
subscription_name:
example: free
type: string
subscription_renews_at:
example: "2022-06-05T14:26:02.302718+03:00"
type: string
subscription_status:
example: on_trial
type: string
timezone:
example: Europe/Helsinki
type: string
updated_at:
example: "2022-06-05T14:26:10.303278+03:00"
type: string
required:
- active_phone_id
- api_key
- created_at
- email
- id
- notification_heartbeat_enabled
- notification_message_status_enabled
- notification_newsletter_enabled
- notification_webhook_enabled
- subscription_ends_at
- subscription_id
- subscription_name
- subscription_renews_at
- subscription_status
- timezone
- updated_at
type: object
entities.Webhook:
properties:
created_at:
example: "2022-06-05T14:26:02.302718+03:00"
type: string
events:
example:
- message.phone.received
items:
type: string
type: array
id:
example: 32343a19-da5e-4b1b-a767-3298a73703cb
type: string
phone_numbers:
example:
- "+18005550199"
- "+18005550100"
items:
type: string
type: array
signing_key:
example: DGW8NwQp7mxKaSZ72Xq9v67SLqSbWQvckzzmK8D6rvd7NywSEkdMJtuxKyEkYnCY
type: string
updated_at:
example: "2022-06-05T14:26:10.303278+03:00"
type: string
url:
example: https://example.com
type: string
user_id:
example: WB7DRDWrJZRGbYrv2CKGkqbzvqdC
type: string
required:
- created_at
- events
- id
- phone_numbers
- signing_key
- updated_at
- url
- user_id
type: object
requests.DiscordStore:
properties:
incoming_channel_id:
type: string
name:
type: string
server_id:
type: string
required:
- incoming_channel_id
- name
- server_id
type: object
requests.DiscordUpdate:
properties:
incoming_channel_id:
type: string
name:
type: string
server_id:
type: string
required:
- incoming_channel_id
- name
- server_id
type: object
requests.HeartbeatStore:
properties:
charging:
type: boolean
phone_numbers:
items:
type: string
type: array
required:
- charging
- phone_numbers
type: object
requests.MessageBulkSend:
properties:
content:
example: This is a sample text message
type: string
encrypted:
description:
Encrypted is used to determine if the content is end-to-end encrypted.
Make sure to set the encryption key on the httpSMS mobile app
example: false
type: boolean
from:
example: "+18005550199"
type: string
request_id:
description:
RequestID is an optional parameter used to track a request from
the client's perspective
example: 153554b5-ae44-44a0-8f4f-7bbac5657ad4
type: string
to:
example:
- "+18005550100"
- "+18005550100"
items:
type: string
type: array
required:
- content
- encrypted
- from
- to
type: object
requests.MessageCallMissed:
properties:
from:
example: "+18005550199"
type: string
sim:
example: SIM1
type: string
timestamp:
example: "2022-06-05T14:26:09.527976+03:00"
type: string
to:
example: "+18005550100"
type: string
required:
- from
- sim
- timestamp
- to
type: object
requests.MessageEvent:
properties:
event_name:
description: |-
EventName is the type of event
* SENT: is emitted when a message is sent by the mobile phone
* FAILED: is event is emitted when the message could not be sent by the mobile phone
* DELIVERED: is event is emitted when a delivery report has been received by the mobile phone
example: SENT
type: string
reason:
description: Reason is the exact error message in case the event is an error
type: string
timestamp:
description:
Timestamp is the time when the event was emitted, Please send
the timestamp in UTC with as much precision as possible
example: "2022-06-05T14:26:09.527976+03:00"
type: string
required:
- event_name
- reason
- timestamp
type: object
requests.MessageReceive:
properties:
content:
example: This is a sample text message received on a phone
type: string
encrypted:
description:
Encrypted is used to determine if the content is end-to-end encrypted.
Make sure to set the encryption key on the httpSMS mobile app
example: false
type: boolean
from:
example: "+18005550199"
type: string
sim:
description: SIM card that received the message
example: SIM1
type: string
timestamp:
description:
Timestamp is the time when the event was emitted, Please send
the timestamp in UTC with as much precision as possible
example: "2022-06-05T14:26:09.527976+03:00"
type: string
to:
example: "+18005550100"
type: string
required:
- content
- encrypted
- from
- sim
- timestamp
- to
type: object
requests.MessageSend:
properties:
content:
example: This is a sample text message
type: string
encrypted:
description:
Encrypted is an optional parameter used to determine if the content
is end-to-end encrypted. Make sure to set the encryption key on the httpSMS
mobile app
example: false
type: boolean
from:
example: "+18005550199"
type: string
request_id:
description:
RequestID is an optional parameter used to track a request from
the client's perspective
example: 153554b5-ae44-44a0-8f4f-7bbac5657ad4
type: string
send_at:
description:
SendAt is an optional parameter used to schedule a message to
be sent at a later time
example: "2022-06-05T14:26:09.527976+03:00"
type: string
to:
example: "+18005550100"
type: string
required:
- content
- from
- to
type: object
requests.MessageThreadUpdate:
properties:
is_archived:
example: true
type: boolean
required:
- is_archived
type: object
requests.PhoneAPIKeyStoreRequest:
properties:
name:
example: My Phone API Key
type: string
required:
- name
type: object
requests.PhoneFCMToken:
properties:
fcm_token:
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzd.....
type: string
phone_number:
example: "[+18005550199]"
type: string
sim:
description:
SIM is the SIM slot of the phone in case the phone has more than
1 SIM slot
example: SIM1
type: string
required:
- fcm_token
- phone_number
- sim
type: object
requests.PhoneUpsert:
properties:
fcm_token:
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzd.....
type: string
max_send_attempts:
description:
MaxSendAttempts is the number of attempts when sending an SMS
message to handle the case where the phone is offline.
example: 2
type: integer
message_expiration_seconds:
description:
MessageExpirationSeconds is the duration in seconds after sending
a message when it is considered to be expired.
example: 12345
type: integer
messages_per_minute:
example: 1
type: integer
missed_call_auto_reply:
example: e.g. This phone cannot receive calls. Please send an SMS instead.
type: string
phone_number:
example: "+18005550199"
type: string
sim:
description:
SIM is the SIM slot of the phone in case the phone has more than
1 SIM slot
example: SIM1
type: string
required:
- fcm_token
- max_send_attempts
- message_expiration_seconds
- messages_per_minute
- missed_call_auto_reply
- phone_number
- sim
type: object
requests.UserNotificationUpdate:
properties:
heartbeat_enabled:
example: true
type: boolean
message_status_enabled:
example: true
type: boolean
newsletter_enabled:
example: true
type: boolean
webhook_enabled:
example: true
type: boolean
required:
- heartbeat_enabled
- message_status_enabled
- newsletter_enabled
- webhook_enabled
type: object
requests.UserUpdate:
properties:
active_phone_id:
example: 32343a19-da5e-4b1b-a767-3298a73703cb
type: string
timezone:
example: Europe/Helsinki
type: string
required:
- active_phone_id
- timezone
type: object
requests.WebhookStore:
properties:
events:
items:
type: string
type: array
phone_numbers:
example:
- "+18005550100"
- "+18005550100"
items:
type: string
type: array
signing_key:
type: string
url:
type: string
required:
- events
- phone_numbers
- signing_key
- url
type: object
requests.WebhookUpdate:
properties:
events:
items:
type: string
type: array
phone_numbers:
example:
- "+18005550100"
- "+18005550100"
items:
type: string
type: array
signing_key:
type: string
url:
type: string
required:
- events
- phone_numbers
- signing_key
- url
type: object
responses.BadRequest:
properties:
data:
example: The request body is not a valid JSON string
type: string
message:
example: The request isn't properly formed
type: string
status:
example: error
type: string
required:
- data
- message
- status
type: object
responses.BillingUsageResponse:
properties:
data:
$ref: "#/definitions/entities.BillingUsage"
message:
example: Request handled successfully
type: string
status:
example: success
type: string
required:
- data
- message
- status
type: object
responses.BillingUsagesResponse:
properties:
data:
items:
$ref: "#/definitions/entities.BillingUsage"
type: array
message:
example: Request handled successfully
type: string
status:
example: success
type: string
required:
- data
- message
- status
type: object
responses.DiscordResponse:
properties:
data:
$ref: "#/definitions/entities.Discord"
message:
example: Request handled successfully
type: string
status:
example: success
type: string
required:
- data
- message
- status
type: object
responses.DiscordsResponse:
properties:
data:
items:
$ref: "#/definitions/entities.Discord"
type: array
message:
example: Request handled successfully
type: string
status:
example: success
type: string
required:
- data
- message
- status
type: object
responses.HeartbeatResponse:
properties:
data:
$ref: "#/definitions/entities.Heartbeat"
message:
example: Request handled successfully
type: string
status:
example: success
type: string
required:
- data
- message
- status
type: object
responses.HeartbeatsResponse:
properties:
data:
items:
$ref: "#/definitions/entities.Heartbeat"
type: array
message:
example: Request handled successfully
type: string
status:
example: success
type: string
required:
- data
- message
- status
type: object
responses.InternalServerError:
properties:
message:
example: We ran into an internal error while handling the request.
type: string
status:
example: error
type: string
required:
- message
- status
type: object
responses.MessageResponse:
properties:
data:
$ref: "#/definitions/entities.Message"
message:
example: Request handled successfully
type: string
status:
example: success
type: string
required:
- data
- message
- status
type: object
responses.MessageThreadsResponse:
properties:
data:
items:
$ref: "#/definitions/entities.MessageThread"
type: array
message:
example: Request handled successfully
type: string
status:
example: success
type: string
required:
- data
- message
- status
type: object
responses.MessagesResponse:
properties:
data:
items:
$ref: "#/definitions/entities.Message"
type: array
message:
example: Request handled successfully
type: string
status:
example: success
type: string
required:
- data
- message
- status
type: object
responses.NoContent:
properties: