blob: 8b6558de54c0b6811e464b2e206a76adbcc60a40 [file] [log] [blame]
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01001openapi: 3.0.0
2info:
3 description: >-
4 mailcow is complete e-mailing solution with advanced antispam, antivirus,
5 nice UI and API.
6
7
8 In order to use this API you have to create a API key and add your IP
9 address to the whitelist of allowed IPs this can be done by logging into the
10 Mailcow UI using your admin account, then go to Configuration > Access >
11 Edit administrator details > API. There you will find a collapsed API menu.
12
13
14 There are two types of API keys
15 - The read only key can only be used for all get endpoints
16 - The read write key can be used for all endpoints
17
18 title: mailcow API
19 version: "1.0.0"
20
21servers:
22 - url: /
23
24components:
25 securitySchemes:
26 ApiKeyAuth:
27 type: apiKey
28 in: header
29 name: X-API-Key
30 responses:
31 Unauthorized:
32 description: Unauthorized
33 content:
34 application/json:
35 schema:
36 type: object
37 properties:
38 type:
39 type: string
40 example: error
41 msg:
42 type: string
43 example: authentication failed
44 required:
45 - type
46 - msg
47
48security:
49 - ApiKeyAuth: []
50
51paths:
52 /api/v1/add/alias:
53 post:
54 responses:
55 "401":
56 $ref: "#/components/responses/Unauthorized"
57 "200":
58 content:
59 application/json:
60 examples:
61 response:
62 value:
63 - log:
64 - mailbox
65 - add
66 - alias
67 - active: "1"
68 address: alias@domain.tld
69 goto: destination@domain.tld
70 - null
71 msg:
72 - alias_added
73 - alias@domain.tld
74 type: success
75 schema:
76 properties:
77 log:
78 description: contains request object
79 items: {}
80 type: array
81 msg:
82 items: {}
83 type: array
84 type:
85 enum:
86 - success
87 - danger
88 - error
89 type: string
90 type: object
91 description: OK
92 headers: {}
93 tags:
94 - Aliases
95 description: >-
96 You may create your own mailbox alias using this action. It takes a JSON
97 object containing a domain informations.
98
99 Only one `goto*` option can be used, for ex. if you want learn as spam,
100 then send just `goto_spam = 1` in request body.
101 operationId: Create alias
102 requestBody:
103 content:
104 application/json:
105 schema:
106 example:
107 active: "1"
108 address: alias@domain.tld
109 goto: destination@domain.tld
110 properties:
111 active:
112 description: is alias active or not
113 type: boolean
114 address:
115 description: 'alias address, for catchall use "@domain.tld"'
116 type: string
117 goto:
118 description: "destination address, comma separated"
119 type: string
120 goto_ham:
121 description: learn as ham
122 type: boolean
123 goto_null:
124 description: silently ignore
125 type: boolean
126 goto_spam:
127 description: learn as spam
128 type: boolean
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200129 sogo_visible:
130 description: toggle visibility as selectable sender in SOGo
131 type: boolean
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100132 type: object
133 summary: Create alias
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +0100134 /api/v1/add/time_limited_alias:
135 post:
136 responses:
137 "401":
138 $ref: "#/components/responses/Unauthorized"
139 "200":
140 content:
141 application/json:
142 examples:
143 response:
144 value:
145 - log:
146 - mailbox
147 - add
148 - time_limited_alias
149 - address: info@domain.tld
150 domain: domain.tld
151 - null
152 msg:
153 - mailbox_modified
154 - info@domain.tld
155 type: success
156 schema:
157 properties:
158 log:
159 description: contains request object
160 items: {}
161 type: array
162 msg:
163 items: {}
164 type: array
165 type:
166 enum:
167 - success
168 - danger
169 - error
170 type: string
171 type: object
172 description: OK
173 headers: {}
174 tags:
175 - Aliases
176 description: >-
177 You may create a time limited alias using this action. It takes a JSON
178 object containing a domain and mailbox informations.
179 Mailcow will generate a random alias.
180 operationId: Create time limited alias
181 requestBody:
182 content:
183 application/json:
184 schema:
185 example:
186 username: info@domain.tld
187 domain: domain.tld
188 properties:
189 username:
190 description: 'the mailbox an alias should be created for'
191 type: string
192 domain:
193 description: "the domain"
194 type: string
195 type: object
196 summary: Create time limited alias
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100197 /api/v1/add/app-passwd:
198 post:
199 responses:
200 "401":
201 $ref: "#/components/responses/Unauthorized"
202 "200":
203 content:
204 application/json:
205 examples:
206 response:
207 value:
208 - log:
209 - app_passwd
210 - add
211 - active: "1"
212 app_name: emclient
213 app_passwd: keyleudecticidechothistishownsan31
214 app_passwd2: keyleudecticidechothistishownsan31
215 username: hello@mailcow.email
216 msg: app_passwd_added
217 type: success
218 schema:
219 properties:
220 log:
221 description: contains request object
222 items: {}
223 type: array
224 msg:
225 items: {}
226 type: array
227 type:
228 enum:
229 - success
230 - danger
231 - error
232 type: string
233 type: object
234 description: OK
235 headers: {}
236 tags:
237 - App Passwords
238 description: >-
239 Using this endpoint you can create a new app password for a specific
240 mailbox.
241 operationId: Create App Password
242 requestBody:
243 content:
244 application/json:
245 schema:
246 example:
247 active: "1"
248 username: info@domain.tld
249 app_name: wordpress
250 app_passwd: keyleudecticidechothistishownsan31
251 app_passwd2: keyleudecticidechothistishownsan31
252 properties:
253 active:
254 description: is alias active or not
255 type: boolean
256 username:
257 description: mailbox for which the app password should be created
258 type: string
259 app_name:
260 description: name of your app password
261 type: string
262 app_passwd:
263 description: your app password
264 type: string
265 app_passwd2:
266 description: your app password
267 type: string
268 type: object
269 summary: Create App Password
270 /api/v1/add/bcc:
271 post:
272 responses:
273 "401":
274 $ref: "#/components/responses/Unauthorized"
275 "200":
276 content:
277 application/json:
278 examples:
279 response:
280 value:
281 - log:
282 - bcc
283 - add
284 - active: "1"
285 bcc_dest: bcc@awesomecow.tld
286 local_dest: mailcow.tld
287 type: sender
288 - null
289 msg: bcc_saved
290 type: success
291 schema:
292 properties:
293 log:
294 description: contains request object
295 items: {}
296 type: array
297 msg:
298 items: {}
299 type: array
300 type:
301 enum:
302 - success
303 - danger
304 - error
305 type: string
306 type: object
307 description: OK
308 headers: {}
309 tags:
310 - Address Rewriting
311 description: >-
312 Using this endpoint you can create a BCC map to forward all mails via a
313 bcc for a given domain.
314 operationId: Create BCC Map
315 requestBody:
316 content:
317 application/json:
318 schema:
319 example:
320 active: "1"
321 bcc_dest: bcc@awesomecow.tld
322 local_dest: mailcow.tld
323 type: sender
324 properties:
325 active:
326 description: 1 for a active user account 0 for a disabled user account
327 type: number
328 bcc_dest:
329 description: the email address where all mails should be send to
330 type: string
331 local_dest:
332 description: the domain which emails should be forwarded
333 type: string
334 type:
335 description: the type of bcc map can be `sender` or `recipient`
336 type: string
337 type: object
338 summary: Create BCC Map
339 /api/v1/add/dkim:
340 post:
341 responses:
342 "401":
343 $ref: "#/components/responses/Unauthorized"
344 "200":
345 content:
346 application/json:
347 examples:
348 response:
349 value:
350 - log:
351 - dkim
352 - add
353 - dkim_selector: dkim
354 domains: hanspeterlol.de
355 key_size: "2048"
356 msg:
357 - dkim_added
358 - hanspeterlol.de
359 type: success
360 schema:
361 properties:
362 log:
363 description: contains request object
364 items: {}
365 type: array
366 msg:
367 items: {}
368 type: array
369 type:
370 enum:
371 - success
372 - danger
373 - error
374 type: string
375 type: object
376 description: OK
377 headers: {}
378 tags:
379 - DKIM
380 description: Using this endpoint you can generate new DKIM keys.
381 operationId: Generate DKIM Key
382 requestBody:
383 content:
384 application/json:
385 schema:
386 example:
387 dkim_selector: dkim
388 domains: mailcow.tld
389 key_size: "2048"
390 properties:
391 dkim_selector:
392 description: the DKIM selector default dkim
393 type: string
394 domains:
395 description: a list of domains for which a dkim key should be generated
396 type: string
397 key_size:
398 description: the key size (1024 or 2048)
399 type: number
400 type: object
401 summary: Generate DKIM Key
402 /api/v1/add/dkim_duplicate:
403 post:
404 responses:
405 "401":
406 $ref: "#/components/responses/Unauthorized"
407 "200":
408 content:
409 application/json:
410 examples:
411 response:
412 value:
413 - log:
414 - dkim
415 - duplicate
416 - from_domain: mailcow.tld
417 to_domain: awesomecow.tld
418 msg:
419 - dkim_duplicated
420 - mailcow.tld
421 - awesomecow.tld
422 type: success
423 schema:
424 properties:
425 log:
426 description: contains request object
427 items: {}
428 type: array
429 msg:
430 items: {}
431 type: array
432 type:
433 enum:
434 - success
435 - danger
436 - error
437 type: string
438 type: object
439 description: OK
440 headers: {}
441 tags:
442 - DKIM
443 description: Using this endpoint you can duplicate the DKIM Key of one domain.
444 operationId: Duplicate DKIM Key
445 requestBody:
446 content:
447 application/json:
448 schema:
449 example:
450 from_domain: mailcow.tld
451 to_domain: awesomecow.tld
452 properties:
453 fron_domain:
454 description: the domain where the dkim key should be copied from
455 type: string
456 to_domain:
457 description: the domain where the dkim key should be copied to
458 type: string
459 type: object
460 summary: Duplicate DKIM Key
461 /api/v1/add/domain:
462 post:
463 responses:
464 "401":
465 $ref: "#/components/responses/Unauthorized"
466 "200":
467 content:
468 application/json:
469 examples:
470 response:
471 value:
472 - log:
473 - ratelimit
474 - edit
475 - domain
476 - object: domain.tld
477 rl_frame: s
478 rl_value: "10"
479 msg:
480 - rl_saved
481 - domain.tld
482 type: success
483 - log:
484 - mailbox
485 - add
486 - domain
487 - active: "1"
488 aliases: "400"
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200489 restart_sogo: "1"
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100490 backupmx: "0"
491 defquota: "3072"
492 description: some decsription
493 domain: domain.tld
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100494 mailboxes: "10"
495 maxquota: "10240"
496 quota: "10240"
497 relay_all_recipients: "0"
498 rl_frame: s
499 rl_value: "10"
500 - null
501 msg:
502 - domain_added
503 - domain.tld
504 type: success
505 schema:
506 properties:
507 log:
508 description: contains request object
509 items: {}
510 type: array
511 msg:
512 items: {}
513 type: array
514 type:
515 enum:
516 - success
517 - danger
518 - error
519 type: string
520 type: object
521 description: OK
522 headers: {}
523 tags:
524 - Domains
525 description: >-
526 You may create your own domain using this action. It takes a JSON object
527 containing a domain informations.
528 operationId: Create domain
529 requestBody:
530 content:
531 application/json:
532 schema:
533 example:
534 active: "1"
535 aliases: "400"
536 backupmx: "0"
537 defquota: "3072"
538 description: some decsription
539 domain: domain.tld
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100540 mailboxes: "10"
541 maxquota: "10240"
542 quota: "10240"
543 relay_all_recipients: "0"
544 rl_frame: s
545 rl_value: "10"
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200546 restart_sogo: "10"
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100547 properties:
548 active:
549 description: is domain active or not
550 type: boolean
551 aliases:
552 description: limit count of aliases associated with this domain
553 type: number
554 backupmx:
555 description: relay domain or not
556 type: boolean
557 defquota:
558 description: predefined mailbox quota in `add mailbox` form
559 type: number
560 description:
561 description: Description of domain
562 type: string
563 domain:
564 description: Fully qualified domain name
565 type: string
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100566 mailboxes:
567 description: limit count of mailboxes associated with this domain
568 type: number
569 maxquota:
570 description: maximum quota per mailbox
571 type: number
572 quota:
573 description: maximum quota for this domain (for all mailboxes in sum)
574 type: number
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200575 restart_sogo:
576 description: restart SOGo to activate the domain in SOGo
577 type: number
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100578 relay_all_recipients:
579 description: >-
580 if not, them you have to create "dummy" mailbox for each
581 address to relay
582 type: boolean
583 rl_frame:
584 enum:
585 - s
586 - m
587 - h
588 - d
589 type: string
590 rl_value:
591 description: rate limit value
592 type: number
593 type: object
594 summary: Create domain
595 /api/v1/add/domain-admin:
596 post:
597 responses:
598 "401":
599 $ref: "#/components/responses/Unauthorized"
600 "200":
601 content:
602 application/json:
603 examples:
604 response:
605 value:
606 - log:
607 - domain_admin
608 - add
609 - active: "1"
610 domains: mailcow.tld
611 password: "*"
612 password2: "*"
613 username: testadmin
614 msg:
615 - domain_admin_added
616 - testadmin
617 type: success
618 schema:
619 properties:
620 log:
621 description: contains request object
622 items: {}
623 type: array
624 msg:
625 items: {}
626 type: array
627 type:
628 enum:
629 - success
630 - danger
631 - error
632 type: string
633 type: object
634 description: OK
635 headers: {}
636 tags:
637 - Domain admin
638 description: >-
639 Using this endpoint you can create a new Domain Admin user. This user
640 has full control over a domain, and can create new mailboxes and
641 aliases.
642 operationId: Create Domain Admin user
643 requestBody:
644 content:
645 application/json:
646 schema:
647 example:
648 active: "1"
649 domains: mailcow.tld
650 password: supersecurepw
651 password2: supersecurepw
652 username: testadmin
653 properties:
654 active:
655 description: 1 for a active user account 0 for a disabled user account
656 type: number
657 domains:
658 description: the domains the user should be a admin of
659 type: string
660 password:
661 description: domain admin user password
662 type: string
663 password2:
664 description: domain admin user password
665 type: string
666 username:
667 description: the username for the admin user
668 type: string
669 type: object
670 summary: Create Domain Admin user
671 /api/v1/edit/da-acl:
672 post:
673 responses:
674 "401":
675 $ref: "#/components/responses/Unauthorized"
676 "200":
677 content:
678 application/json:
679 examples:
680 response:
681 value:
682 - type: success
683 log:
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +0100684 - acl
685 - edit
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100686 - testadmin
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +0100687 - username:
688 - testadmin
689 da_acl:
690 - syncjobs
691 - quarantine
692 - login_as
693 - sogo_access
694 - app_passwds
695 - bcc_maps
696 - pushover
697 - filters
698 - ratelimit
699 - spam_policy
700 - extend_sender_acl
701 - unlimited_quota
702 - protocol_access
703 - smtp_ip_access
704 - alias_domains
705 - domain_desc
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100706 msg:
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +0100707 - acl_saved
708 - testadmin
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100709 schema:
710 properties:
711 log:
712 description: contains request object
713 items: {}
714 type: array
715 msg:
716 items: {}
717 type: array
718 type:
719 enum:
720 - success
721 - danger
722 - error
723 type: string
724 type: object
725 description: OK
726 headers: {}
727 tags:
728 - Domain admin
729 description: >-
730 Using this endpoint you can edit the ACLs of a Domain Admin user. This user
731 has full control over a domain, and can create new mailboxes and
732 aliases.
733 operationId: Edit Domain Admin ACL
734 requestBody:
735 content:
736 application/json:
737 schema:
738 example:
739 items:
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +0100740 - testadmin
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100741 attr:
742 da_acl:
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +0100743 - syncjobs
744 - quarantine
745 - login_as
746 - sogo_access
747 - app_passwds
748 - bcc_maps
749 - pushover
750 - filters
751 - ratelimit
752 - spam_policy
753 - extend_sender_acl
754 - unlimited_quota
755 - protocol_access
756 - smtp_ip_access
757 - alias_domains
758 - domain_desc
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100759 properties:
760 items:
761 description: contains the domain admin username you want to edit
762 type: object
763 attr:
764 properties:
765 da_acl:
766 description: contains the list of acl names that are active for this user
767 type: object
768 type: object
769 summary: Edit Domain Admin ACL
770 /api/v1/edit/domain-admin:
771 post:
772 responses:
773 "401":
774 $ref: "#/components/responses/Unauthorized"
775 "200":
776 content:
777 application/json:
778 examples:
779 response:
780 value:
781 - type: success
782 log:
783 - domain_admin
784 - edit
785 - username: testadmin
786 active: ["0","1"]
787 username_new: testadmin
788 domains: ["domain.tld"]
789 password: "*"
790 password2: "*"
791 msg:
792 - domain_admin_modified
793 - testadmin
794 schema:
795 properties:
796 type:
797 enum:
798 - success
799 - danger
800 - error
801 type: string
802 log:
803 description: contains request object
804 items: {}
805 type: array
806 msg:
807 items: {}
808 type: array
809 type: object
810 description: OK
811 headers: {}
812 tags:
813 - Domain admin
814 description: >-
815 Using this endpoint you can edit a existing Domain Admin user. This user
816 has full control over a domain, and can create new mailboxes and
817 aliases.
818 operationId: Edit Domain Admin user
819 requestBody:
820 content:
821 application/json:
822 schema:
823 example:
824 items:
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +0100825 - testadmin
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100826 attr:
827 active:
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +0100828 - '0'
829 - '1'
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100830 username_new: testadmin
831 domains: ["domain.tld"]
832 password: supersecurepassword
833 password2: supersecurepassword
834 properties:
835 attr:
836 properties:
837 active:
838 description: is the domain admin active or not
839 type: boolean
840 username_new:
841 description: the username of the domain admin, change this to change the username
842 type: string
843 domains:
844 description: a list of all domains managed by this domain admin
845 type: array
846 items:
847 type: string
848 password:
849 description: the new domain admin user password
850 type: string
851 password2:
852 description: the new domain admin user password for confirmation
853 type: string
854 type: object
855 items:
856 description: contains the domain admin username you want to edit
857 type: object
858 summary: Edit Domain Admin user
859 /api/v1/add/domain-policy:
860 post:
861 responses:
862 "401":
863 $ref: "#/components/responses/Unauthorized"
864 "200":
865 content:
866 application/json:
867 examples:
868 response:
869 value:
870 - log:
871 - policy
872 - add
873 - domain
874 - domain: domain.tld
875 object_from: "*@baddomain.tld"
876 object_list: bl
877 msg:
878 - domain_modified
879 - domain.tld
880 type: success
881 schema:
882 properties:
883 log:
884 description: contains request object
885 items: {}
886 type: array
887 msg:
888 items: {}
889 type: array
890 type:
891 enum:
892 - success
893 - danger
894 - error
895 type: string
896 type: object
897 description: OK
898 headers: {}
899 tags:
900 - Domain antispam policies
901 description: >-
902 You may create your own domain policy using this action. It takes a JSON
903 object containing a domain informations.
904 operationId: Create domain policy
905 requestBody:
906 content:
907 application/json:
908 schema:
909 example:
910 domain: domain.tld
911 object_from: "*@baddomain.tld"
912 object_list: bl
913 properties:
914 domain:
915 description: domain name to which policy is associated to
916 type: string
917 object_from:
918 description: exact address or use wildcard to match whole domain
919 type: string
920 object_list:
921 enum:
922 - wl
923 - bl
924 type: string
925 type: object
926 summary: Create domain policy
927 /api/v1/add/fwdhost:
928 post:
929 responses:
930 "401":
931 $ref: "#/components/responses/Unauthorized"
932 "200":
933 content:
934 application/json:
935 examples:
936 response:
937 value:
938 - log:
939 - fwdhost
940 - add
941 - filter_spam: "0"
942 hostname: hosted.mailcow.de
943 msg:
944 - forwarding_host_added
945 - "5.1.76.202, 2a00:f820:417::202"
946 type: success
947 schema:
948 properties:
949 log:
950 description: contains request object
951 items: {}
952 type: array
953 msg:
954 items: {}
955 type: array
956 type:
957 enum:
958 - success
959 - danger
960 - error
961 type: string
962 type: object
963 description: OK
964 headers: {}
965 tags:
966 - Fordwarding Hosts
967 description: >-
968 Add a new Forwarding host to mailcow. You can chose to enable or disable
969 spam filtering of incoming emails by specifing `filter_spam` 0 =
970 inactive, 1 = active.
971 operationId: Add Forward Host
972 requestBody:
973 content:
974 application/json:
975 schema:
976 example:
977 filter_spam: "0"
978 hostname: hosted.mailcow.de
979 properties:
980 filter_spam:
981 description: "1 to enable spam filter, 0 to disable spam filter"
982 type: number
983 hostname:
984 description: contains the hostname you want to add
985 type: string
986 type: object
987 summary: Add Forward Host
988 /api/v1/add/mailbox:
989 post:
990 responses:
991 "401":
992 $ref: "#/components/responses/Unauthorized"
993 "200":
994 content:
995 application/json:
996 examples:
997 response:
998 value:
999 - log:
1000 - mailbox
1001 - add
1002 - mailbox
1003 - active: "1"
1004 domain: domain.tld
1005 local_part: info
1006 name: Full name
1007 password: "*"
1008 password2: "*"
1009 quota: "3072"
1010 force_pw_update: "1"
1011 tls_enforce_in: "1"
1012 tls_enforce_out: "1"
1013 - null
1014 msg:
1015 - mailbox_added
1016 - info@domain.tld
1017 type: success
1018 schema:
1019 properties:
1020 log:
1021 description: contains request object
1022 items: {}
1023 type: array
1024 msg:
1025 items: {}
1026 type: array
1027 type:
1028 enum:
1029 - success
1030 - danger
1031 - error
1032 type: string
1033 type: object
1034 description: OK
1035 headers: {}
1036 tags:
1037 - Mailboxes
1038 description: >-
1039 You may create your own mailbox using this action. It takes a JSON
1040 object containing a domain informations.
1041 operationId: Create mailbox
1042 requestBody:
1043 content:
1044 application/json:
1045 schema:
1046 example:
1047 active: "1"
1048 domain: domain.tld
1049 local_part: info
1050 name: Full name
1051 password: atedismonsin
1052 password2: atedismonsin
1053 quota: "3072"
1054 force_pw_update: "1"
1055 tls_enforce_in: "1"
1056 tls_enforce_out: "1"
1057 properties:
1058 active:
1059 description: is mailbox active or not
1060 type: boolean
1061 domain:
1062 description: domain name
1063 type: string
1064 local_part:
1065 description: left part of email address
1066 type: string
1067 name:
1068 description: Full name of the mailbox user
1069 type: string
1070 password2:
1071 description: mailbox password for confirmation
1072 type: string
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +02001073 password:
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01001074 description: mailbox password
1075 type: string
1076 quota:
1077 description: mailbox quota
1078 type: number
1079 force_pw_update:
1080 description: forces the user to update its password on first login
1081 type: boolean
1082 tls_enforce_in:
1083 description: force inbound email tls encryption
1084 type: boolean
1085 tls_enforce_out:
1086 description: force oubound tmail tls encryption
1087 type: boolean
1088 type: object
1089 summary: Create mailbox
1090
1091 /api/v1/add/oauth2-client:
1092 post:
1093 responses:
1094 "401":
1095 $ref: "#/components/responses/Unauthorized"
1096 "200":
1097 content:
1098 application/json:
1099 examples:
1100 response:
1101 value:
1102 - log:
1103 - oauth2
1104 - add
1105 - client
1106 - redirect_uri: "https://mailcow.tld"
1107 msg: Added client access
1108 type: success
1109 schema:
1110 properties:
1111 log:
1112 description: contains request object
1113 items: {}
1114 type: array
1115 msg:
1116 items: {}
1117 type: array
1118 type:
1119 enum:
1120 - success
1121 - danger
1122 - error
1123 type: string
1124 type: object
1125 description: OK
1126 headers: {}
1127 tags:
1128 - oAuth Clients
1129 description: Using this endpoint you can create a oAuth clients.
1130 operationId: Create oAuth Client
1131 requestBody:
1132 content:
1133 application/json:
1134 schema:
1135 example:
1136 redirect_uri: "https://mailcow.tld"
1137 properties:
1138 redirect_uri:
1139 description: the uri where you should be redirected after oAuth
1140 type: string
1141 type: object
1142 summary: Create oAuth Client
1143 /api/v1/add/recipient_map:
1144 post:
1145 responses:
1146 "401":
1147 $ref: "#/components/responses/Unauthorized"
1148 "200":
1149 content:
1150 application/json:
1151 examples:
1152 response:
1153 value:
1154 - log:
1155 - recipient_map
1156 - add
1157 - active: "1"
1158 recipient_map_new: target@mailcow.tld
1159 recipient_map_old: recipient@mailcow.tld
1160 - null
1161 msg:
1162 - recipient_map_entry_saved
1163 - recipient@mailcow.tld
1164 type: success
1165 schema:
1166 properties:
1167 log:
1168 description: contains request object
1169 items: {}
1170 type: array
1171 msg:
1172 items: {}
1173 type: array
1174 type:
1175 enum:
1176 - success
1177 - danger
1178 - error
1179 type: string
1180 type: object
1181 description: OK
1182 headers: {}
1183 tags:
1184 - Address Rewriting
1185 description: >-
1186 Using this endpoint you can create a recipient map to forward all mails
1187 from one email address to another.
1188 operationId: Create Recipient Map
1189 requestBody:
1190 content:
1191 application/json:
1192 schema:
1193 example:
1194 active: "1"
1195 recipient_map_new: target@mailcow.tld
1196 recipient_map_old: recipient@mailcow.tld
1197 properties:
1198 active:
1199 description: 1 for a active user account 0 for a disabled user account
1200 type: number
1201 recipient_map_new:
1202 description: the email address that should receive the forwarded emails
1203 type: string
1204 recipient_map_old:
1205 description: the email address which emails should be forwarded
1206 type: string
1207 type: object
1208 summary: Create Recipient Map
1209 /api/v1/add/relayhost:
1210 post:
1211 responses:
1212 "401":
1213 $ref: "#/components/responses/Unauthorized"
1214 "200":
1215 content:
1216 application/json:
1217 examples:
1218 response:
1219 value:
1220 - log:
1221 - relayhost
1222 - add
1223 - hostname: "mailcow.tld:25"
1224 password: supersecurepassword
1225 username: testuser
1226 msg:
1227 - relayhost_added
1228 - ""
1229 type: success
1230 schema:
1231 properties:
1232 log:
1233 description: contains request object
1234 items: {}
1235 type: array
1236 msg:
1237 items: {}
1238 type: array
1239 type:
1240 enum:
1241 - success
1242 - danger
1243 - error
1244 type: string
1245 type: object
1246 description: OK
1247 headers: {}
1248 tags:
1249 - Routing
1250 description: Using this endpoint you can create Sender-Dependent Transports.
1251 operationId: Create Sender-Dependent Transports
1252 requestBody:
1253 content:
1254 application/json:
1255 schema:
1256 example:
1257 hostname: "mailcow.tld:25"
1258 password: supersecurepassword
1259 username: testuser
1260 properties:
1261 hostname:
1262 description: the hostname of the smtp server with port
1263 type: string
1264 password:
1265 description: the password for the smtp user
1266 type: string
1267 username:
1268 description: the username used to authenticate
1269 type: string
1270 type: object
1271 summary: Create Sender-Dependent Transports
1272 /api/v1/add/resource:
1273 post:
1274 responses:
1275 "401":
1276 $ref: "#/components/responses/Unauthorized"
1277 "200":
1278 content:
1279 application/json:
1280 examples:
1281 response:
1282 value:
1283 - log:
1284 - mailbox
1285 - add
1286 - resource
1287 - active: "1"
1288 description: test
1289 domain: mailcow.tld
1290 kind: location
1291 multiple_bookings: "0"
1292 multiple_bookings_custom: ""
1293 multiple_bookings_select: "0"
1294 - null
1295 msg:
1296 - resource_added
1297 - mailcow.tld
1298 type: success
1299 schema:
1300 properties:
1301 log:
1302 description: contains request object
1303 items: {}
1304 type: array
1305 msg:
1306 items: {}
1307 type: array
1308 type:
1309 enum:
1310 - success
1311 - danger
1312 - error
1313 type: string
1314 type: object
1315 description: OK
1316 headers: {}
1317 tags:
1318 - Resources
1319 description: Using this endpoint you can create Resources.
1320 operationId: Create Resources
1321 requestBody:
1322 content:
1323 application/json:
1324 schema:
1325 example:
1326 active: "1"
1327 description: test
1328 domain: mailcow.tld
1329 kind: location
1330 multiple_bookings: "0"
1331 multiple_bookings_custom: ""
1332 multiple_bookings_select: "0"
1333 properties:
1334 active:
1335 description: 1 for a active transport map 0 for a disabled transport map
1336 type: number
1337 description:
1338 description: a description of the resource
1339 type: string
1340 domain:
1341 description: the domain for which the resource should be
1342 type: string
1343 kind:
1344 description: the kind of recouse
1345 enum:
1346 - location
1347 - group
1348 - thing
1349 type: string
1350 multiple_bookings:
1351 enum:
1352 - "-1"
1353 - "1"
1354 - custom
1355 type: string
1356 multiple_bookings_custom:
1357 description: always empty
1358 type: number
1359 multiple_bookings_select:
1360 enum:
1361 - "-1"
1362 - "1"
1363 - custom
1364 type: string
1365 type: object
1366 summary: Create Resources
1367 /api/v1/add/syncjob:
1368 post:
1369 responses:
1370 "401":
1371 $ref: "#/components/responses/Unauthorized"
1372 "200":
1373 content:
1374 application/json:
1375 examples:
1376 response:
1377 value:
1378 - log:
1379 - mailbox
1380 - add
1381 - syncjob
1382 - active: "1"
1383 automap: "1"
1384 custom_params: ""
1385 delete1: "0"
1386 delete2: "0"
1387 delete2duplicates: "1"
1388 enc1: SSL
1389 exclude: (?i)spam|(?i)junk
1390 host1: imap.server.tld
1391 maxage: "0"
1392 maxbytespersecond: "0"
1393 mins_interval: "20"
1394 password1: supersecret
1395 port1: 993
1396 skipcrossduplicates: "0"
1397 subfolder2: External
1398 subscribeall: "1"
1399 timeout1: "600"
1400 timeout2: "600"
1401 user1: username
1402 username: mailbox@domain.tld
1403 - null
1404 msg:
1405 - mailbox_modified
1406 - mailbox@domain.tld
1407 type: success
1408 schema:
1409 properties:
1410 log:
1411 description: contains request object
1412 items: {}
1413 type: array
1414 msg:
1415 items: {}
1416 type: array
1417 type:
1418 enum:
1419 - success
1420 - danger
1421 - error
1422 type: string
1423 type: object
1424 description: OK
1425 headers: {}
1426 tags:
1427 - Sync jobs
1428 description: >-
1429 You can create new sync job using this action. It takes a JSON object
1430 containing a domain informations.
1431 operationId: Create sync job
1432 summary: Create sync job
1433 requestBody:
1434 content:
1435 application/json:
1436 schema:
1437 example:
1438 username: lisa@mailcow.tld
1439 host1: mail.mailcow.tld
1440 port1: "143"
1441 user1: demo@mailcow.tld
1442 password1: supersecretpw
1443 enc1: TLS
1444 mins_interval: "20"
1445 subfolder2: "/SyncIntoSubfolder"
1446 maxage: "0"
1447 maxbytespersecond: "0"
1448 timeout1: "600"
1449 timeout2: "600"
1450 exclude: "(?i)spam|(?i)junk"
1451 custom_params: "--dry"
1452 delete2duplicates: "1"
1453 delete1: "1"
1454 delete2: "0"
1455 automap: "1"
1456 skipcrossduplicates: "0"
1457 subscribeall: "0"
1458 active: "1"
1459 properties:
1460 parameters:
1461 description: your local mailcow mailbox
1462 type: string
1463 host1:
1464 description: the smtp server where mails should be synced from
1465 type: string
1466 port1:
1467 description: the smtp port of the target mail server
1468 type: string
1469 password:
1470 description: the password of the mailbox
1471 type: string
1472 enc1:
1473 description: the encryption method used to connect to the mailserver
1474 type: string
1475 mins_internal:
1476 description: the interval in which messages should be syned
1477 type: number
1478 subfolder2:
1479 description: sync into subfolder on destination (empty = do not use subfolder)
1480 type: string
1481 maxage:
1482 description: only sync messages up to this age in days
1483 type: number
1484 maxbytespersecond:
1485 description: max speed transfer limit for the sync
1486 type: number
1487 timeout1:
1488 description: timeout for connection to remote host
1489 type: number
1490 timeout2:
1491 description: timeout for connection to local host
1492 type: number
1493 exclude:
1494 description: exclude objects (regex)
1495 type: string
1496 custom_params:
1497 description: custom parameters
1498 type: string
1499 delete2duplicates:
1500 description: delete duplicates on destination (--delete2duplicates)
1501 type: boolean
1502 delete1:
1503 description: delete from source when completed (--delete1)
1504 type: boolean
1505 delete2:
1506 description: delete messages on destination that are not on source (--delete2)
1507 type: boolean
1508 automap:
1509 description: try to automap folders ("Sent items", "Sent" => "Sent" etc.) (--automap)
1510 type: boolean
1511 skipcrossduplicates:
1512 description: skip duplicate messages across folders (first come, first serve) (--skipcrossduplicates)
1513 type: boolean
1514 subscribeall:
1515 description: subscribe all folders (--subscribeall)
1516 type: boolean
1517 active:
1518 description: enables or disables the sync job
1519 type: boolean
1520 type: object
1521 /api/v1/add/tls-policy-map:
1522 post:
1523 responses:
1524 "401":
1525 $ref: "#/components/responses/Unauthorized"
1526 "200":
1527 content:
1528 application/json:
1529 examples:
1530 response:
1531 value:
1532 - log:
1533 - tls_policy_maps
1534 - add
1535 - parameters: ""
1536 active: "1"
1537 dest: mailcow.tld
1538 policy: encrypt
1539 - null
1540 msg:
1541 - tls_policy_map_entry_saved
1542 - mailcow.tld
1543 type: success
1544 schema:
1545 properties:
1546 log:
1547 description: contains request object
1548 items: {}
1549 type: array
1550 msg:
1551 items: {}
1552 type: array
1553 type:
1554 enum:
1555 - success
1556 - danger
1557 - error
1558 type: string
1559 type: object
1560 description: OK
1561 headers: {}
1562 tags:
1563 - Outgoing TLS Policy Map Overrides
1564 description: Using this endpoint you can create a TLS policy map override.
1565 operationId: Create TLS Policy Map
1566 requestBody:
1567 content:
1568 application/json:
1569 schema:
1570 example:
1571 parameters: ""
1572 active: "1"
1573 dest: mailcow.tld
1574 policy: encrypt
1575 properties:
1576 parameters:
1577 description: >-
1578 custom parameters you find out more about them
1579 [here](http://www.postfix.org/postconf.5.html#smtp_tls_policy_maps)
1580 type: string
1581 active:
1582 description: 1 for a active user account 0 for a disabled user account
1583 type: number
1584 dest:
1585 description: the target domain or email address
1586 type: string
1587 policy:
1588 description: the policy
1589 enum:
1590 - none
1591 - may
1592 - encrypt
1593 - dane
1594 - "'dane"
1595 - fingerprint
1596 - verify
1597 - secure
1598 type: string
1599 type: object
1600 summary: Create TLS Policy Map
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +01001601 /api/v1/add/transport:
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01001602 post:
1603 responses:
1604 "401":
1605 $ref: "#/components/responses/Unauthorized"
1606 "200":
1607 content:
1608 application/json:
1609 examples:
1610 response:
1611 value:
1612 - log:
1613 - transport
1614 - add
1615 - active: "1"
1616 destination: example2.org
1617 nexthop: "host:25"
1618 password: supersecurepw
1619 username: testuser
1620 msg:
1621 - relayhost_added
1622 - ""
1623 type: success
1624 schema:
1625 properties:
1626 log:
1627 description: contains request object
1628 items: {}
1629 type: array
1630 msg:
1631 items: {}
1632 type: array
1633 type:
1634 enum:
1635 - success
1636 - danger
1637 - error
1638 type: string
1639 type: object
1640 description: OK
1641 headers: {}
1642 tags:
1643 - Routing
1644 description: Using this endpoint you can create Sender-Dependent Transports.
1645 operationId: Create Transport Maps
1646 requestBody:
1647 content:
1648 application/json:
1649 schema:
1650 example:
1651 active: "1"
1652 destination: example.org
1653 nexthop: "host:25"
1654 password: supersecurepw
1655 username: testuser
1656 properties:
1657 active:
1658 description: 1 for a active transport map 0 for a disabled transport map
1659 type: number
1660 destination:
1661 type: string
1662 nexthop:
1663 type: string
1664 password:
1665 description: the password for the smtp user
1666 type: string
1667 username:
1668 description: the username used to authenticate
1669 type: string
1670 type: object
1671 summary: Create Transport Maps
1672 /api/v1/delete/alias:
1673 post:
1674 responses:
1675 "401":
1676 $ref: "#/components/responses/Unauthorized"
1677 "200":
1678 content:
1679 application/json:
1680 examples:
1681 response:
1682 value:
1683 - log:
1684 - mailbox
1685 - delete
1686 - alias
1687 - id:
1688 - "6"
1689 - "9"
1690 - null
1691 msg:
1692 - alias_removed
1693 - alias@domain.tld
1694 type: success
1695 - log:
1696 - mailbox
1697 - delete
1698 - alias
1699 - id:
1700 - "6"
1701 - "9"
1702 - null
1703 msg:
1704 - alias_removed
1705 - alias2@domain.tld
1706 type: success
1707 schema:
1708 properties:
1709 log:
1710 description: contains request object
1711 items: {}
1712 type: array
1713 msg:
1714 items: {}
1715 type: array
1716 type:
1717 enum:
1718 - success
1719 - danger
1720 - error
1721 type: string
1722 type: object
1723 description: OK
1724 headers: {}
1725 tags:
1726 - Aliases
1727 description: You can delete one or more aliases.
1728 operationId: Delete alias
1729 requestBody:
1730 content:
1731 application/json:
1732 schema:
1733 items:
1734 example: "6"
1735 type: string
1736 type: array
1737 summary: Delete alias
1738 /api/v1/delete/app-passwd:
1739 post:
1740 responses:
1741 "401":
1742 $ref: "#/components/responses/Unauthorized"
1743 "200":
1744 content:
1745 application/json:
1746 examples:
1747 response:
1748 value:
1749 - log:
1750 - app_passwd
1751 - delete
1752 - id:
1753 - "2"
1754 msg:
1755 - app_passwd_removed
1756 - "2"
1757 type: success
1758 schema:
1759 properties:
1760 log:
1761 description: contains request object
1762 items: {}
1763 type: array
1764 msg:
1765 items: {}
1766 type: array
1767 type:
1768 enum:
1769 - success
1770 - danger
1771 - error
1772 type: string
1773 type: object
1774 description: OK
1775 headers: {}
1776 tags:
1777 - App Passwords
1778 description: Using this endpoint you can delete a single app password.
1779 operationId: Delete App Password
1780 requestBody:
1781 content:
1782 application/json:
1783 schema:
1784 example:
1785 - "1"
1786 properties:
1787 items:
1788 description: contains list of app passwords you want to delete
1789 type: object
1790 type: object
1791 summary: Delete App Password
1792 /api/v1/delete/bcc:
1793 post:
1794 responses:
1795 "401":
1796 $ref: "#/components/responses/Unauthorized"
1797 "200":
1798 content:
1799 application/json:
1800 examples:
1801 response:
1802 value:
1803 - log:
1804 - bcc
1805 - delete
1806 - id:
1807 - "4"
1808 - null
1809 msg:
1810 - bcc_deleted
1811 - "4"
1812 type: success
1813 schema:
1814 properties:
1815 log:
1816 description: contains request object
1817 items: {}
1818 type: array
1819 msg:
1820 items: {}
1821 type: array
1822 type:
1823 enum:
1824 - success
1825 - danger
1826 - error
1827 type: string
1828 type: object
1829 description: OK
1830 headers: {}
1831 tags:
1832 - Address Rewriting
1833 description: >-
1834 Using this endpoint you can delete a BCC map, for this you have to know
1835 its ID. You can get the ID using the GET method.
1836 operationId: Delete BCC Map
1837 requestBody:
1838 content:
1839 application/json:
1840 schema:
1841 example:
1842 - "3"
1843 properties:
1844 items:
1845 description: contains list of bcc maps you want to delete
1846 type: object
1847 type: object
1848 summary: Delete BCC Map
1849 /api/v1/delete/dkim:
1850 post:
1851 responses:
1852 "401":
1853 $ref: "#/components/responses/Unauthorized"
1854 "200":
1855 content:
1856 application/json:
1857 examples:
1858 response:
1859 value:
1860 - log:
1861 - dkim
1862 - delete
1863 - domains:
1864 - mailcow.tld
1865 msg:
1866 - dkim_removed
1867 - mailcow.tld
1868 type: success
1869 schema:
1870 properties:
1871 log:
1872 description: contains request object
1873 items: {}
1874 type: array
1875 msg:
1876 items: {}
1877 type: array
1878 type:
1879 enum:
1880 - success
1881 - danger
1882 - error
1883 type: string
1884 type: object
1885 description: OK
1886 headers: {}
1887 tags:
1888 - DKIM
1889 description: Using this endpoint a existing DKIM Key can be deleted
1890 operationId: Delete DKIM Key
1891 requestBody:
1892 content:
1893 application/json:
1894 schema:
1895 items:
1896 example:
1897 - mailcow.tld
1898 type: string
1899 type: array
1900 summary: Delete DKIM Key
1901 /api/v1/delete/domain:
1902 post:
1903 responses:
1904 "401":
1905 $ref: "#/components/responses/Unauthorized"
1906 "200":
1907 content:
1908 application/json:
1909 examples:
1910 response:
1911 value:
1912 - log:
1913 - mailbox
1914 - delete
1915 - domain
1916 - domain:
1917 - domain.tld
1918 - domain2.tld
1919 - null
1920 msg:
1921 - domain_removed
1922 - domain.tld
1923 type: success
1924 - log:
1925 - mailbox
1926 - delete
1927 - domain
1928 - domain:
1929 - domain.tld
1930 - domain2.tld
1931 - null
1932 msg:
1933 - domain_removed
1934 - domain2.tld
1935 type: success
1936 schema:
1937 properties:
1938 log:
1939 description: contains request object
1940 items: {}
1941 type: array
1942 msg:
1943 items: {}
1944 type: array
1945 type:
1946 enum:
1947 - success
1948 - danger
1949 - error
1950 type: string
1951 type: object
1952 description: OK
1953 headers: {}
1954 tags:
1955 - Domains
1956 description: You can delete one or more domains.
1957 operationId: Delete domain
1958 requestBody:
1959 content:
1960 application/json:
1961 schema:
1962 example:
1963 - domain.tld
1964 - domain2.tld
1965 properties:
1966 items:
1967 description: contains list of domains you want to delete
1968 type: object
1969 type: object
1970 summary: Delete domain
1971 /api/v1/delete/domain-admin:
1972 post:
1973 responses:
1974 "401":
1975 $ref: "#/components/responses/Unauthorized"
1976 "200":
1977 content:
1978 application/json:
1979 examples:
1980 response:
1981 value:
1982 - log:
1983 - domain_admin
1984 - delete
1985 - username:
1986 - testadmin
1987 msg:
1988 - domain_admin_removed
1989 - testadmin
1990 type: success
1991 schema:
1992 properties:
1993 log:
1994 description: contains request object
1995 items: {}
1996 type: array
1997 msg:
1998 items: {}
1999 type: array
2000 type:
2001 enum:
2002 - success
2003 - danger
2004 - error
2005 type: string
2006 type: object
2007 description: OK
2008 headers: {}
2009 tags:
2010 - Domain admin
2011 description: Using this endpoint a existing Domain Admin user can be deleted.
2012 operationId: Delete Domain Admin
2013 requestBody:
2014 content:
2015 application/json:
2016 schema:
2017 example:
2018 - testadmin
2019 properties:
2020 items:
2021 description: contains list of usernames of the users you want to delete
2022 type: object
2023 type: object
2024 summary: Delete Domain Admin
2025 /api/v1/delete/domain-policy:
2026 post:
2027 responses:
2028 "401":
2029 $ref: "#/components/responses/Unauthorized"
2030 "200":
2031 content:
2032 application/json:
2033 examples:
2034 response:
2035 value:
2036 - log:
2037 - policy
2038 - delete
2039 - domain
2040 - prefid:
2041 - "1"
2042 - "2"
2043 msg:
2044 - item_deleted
2045 - "1"
2046 type: success
2047 - log:
2048 - policy
2049 - delete
2050 - domain
2051 - prefid:
2052 - "1"
2053 - "2"
2054 msg:
2055 - item_deleted
2056 - "2"
2057 type: success
2058 schema:
2059 properties:
2060 log:
2061 description: contains request object
2062 items: {}
2063 type: array
2064 msg:
2065 items: {}
2066 type: array
2067 type:
2068 enum:
2069 - success
2070 - danger
2071 - error
2072 type: string
2073 type: object
2074 description: OK
2075 headers: {}
2076 tags:
2077 - Domain antispam policies
2078 description: You can delete one o more domain policies.
2079 operationId: Delete domain policy
2080 requestBody:
2081 content:
2082 application/json:
2083 schema:
2084 example:
2085 - "1"
2086 - "2"
2087 properties:
2088 items:
2089 description: contains list of domain policys you want to delete
2090 type: object
2091 type: object
2092 summary: Delete domain policy
2093 /api/v1/delete/fwdhost:
2094 post:
2095 responses:
2096 "401":
2097 $ref: "#/components/responses/Unauthorized"
2098 "200":
2099 content:
2100 application/json:
2101 examples:
2102 response:
2103 value:
2104 - log:
2105 - fwdhost
2106 - delete
2107 - forwardinghost:
2108 - 5.1.76.202
2109 - "2a00:f820:417::202"
2110 msg:
2111 - forwarding_host_removed
2112 - 5.1.76.202
2113 type: success
2114 - log:
2115 - fwdhost
2116 - delete
2117 - forwardinghost:
2118 - 5.1.76.202
2119 - "2a00:f820:417::202"
2120 msg:
2121 - forwarding_host_removed
2122 - "2a00:f820:417::202"
2123 type: success
2124 schema:
2125 properties:
2126 log:
2127 description: contains request object
2128 items: {}
2129 type: array
2130 msg:
2131 items: {}
2132 type: array
2133 type:
2134 enum:
2135 - success
2136 - danger
2137 - error
2138 type: string
2139 type: object
2140 description: OK
2141 headers: {}
2142 tags:
2143 - Fordwarding Hosts
2144 description: >-
2145 Using this endpoint you can delete a forwarding host, in order to do so
2146 you need to know the IP of the host.
2147 operationId: Delete Forward Host
2148 requestBody:
2149 content:
2150 application/json:
2151 schema:
2152 example:
2153 - 5.1.76.202
2154 - "2a00:f820:417::202"
2155 properties:
2156 ip:
2157 description: contains the ip of the fowarding host you want to delete
2158 type: string
2159 type: object
2160 summary: Delete Forward Host
2161 /api/v1/delete/mailbox:
2162 post:
2163 responses:
2164 "401":
2165 $ref: "#/components/responses/Unauthorized"
2166 "200":
2167 content:
2168 application/json:
2169 examples:
2170 response:
2171 value:
2172 - log:
2173 - mailbox
2174 - delete
2175 - mailbox
2176 - username:
2177 - info@domain.tld
2178 - sales@domain.tld
2179 - null
2180 msg:
2181 - mailbox_removed
2182 - info@domain.tld
2183 type: success
2184 - log:
2185 - mailbox
2186 - delete
2187 - mailbox
2188 - username:
2189 - info@domain.tld
2190 - sales@domain.tld
2191 - null
2192 msg:
2193 - mailbox_removed
2194 - sales@domain.tld
2195 type: success
2196 schema:
2197 properties:
2198 log:
2199 description: contains request object
2200 items: {}
2201 type: array
2202 msg:
2203 items: {}
2204 type: array
2205 type:
2206 enum:
2207 - success
2208 - danger
2209 - error
2210 type: string
2211 type: object
2212 description: OK
2213 headers: {}
2214 tags:
2215 - Mailboxes
2216 description: You can delete one or more mailboxes.
2217 operationId: Delete mailbox
2218 requestBody:
2219 content:
2220 application/json:
2221 schema:
2222 example:
2223 - info@domain.tld
2224 - sales@domain.tld
2225 properties:
2226 items:
2227 description: contains list of mailboxes you want to delete
2228 type: object
2229 type: object
2230 summary: Delete mailbox
2231 /api/v1/delete/mailq:
2232 post:
2233 responses:
2234 "401":
2235 $ref: "#/components/responses/Unauthorized"
2236 "200":
2237 content:
2238 application/json:
2239 examples:
2240 response:
2241 value:
2242 msg: Task completed
2243 type: success
2244 description: OK
2245 headers: {}
2246 tags:
2247 - Queue Manager
2248 description: >-
2249 Using this API you can delete the current mail queue. This will delete
2250 all mails in it.
2251
2252 This API uses the command: `postsuper -d`
2253 operationId: Delete Queue
2254 requestBody:
2255 content:
2256 application/json:
2257 schema:
2258 example:
2259 action: super_delete
2260 properties:
2261 action:
2262 description: use super_delete to delete the mail queue
2263 type: string
2264 type: object
2265 summary: Delete Queue
2266 /api/v1/delete/oauth2-client:
2267 post:
2268 responses:
2269 "401":
2270 $ref: "#/components/responses/Unauthorized"
2271 "200":
2272 content:
2273 application/json:
2274 examples:
2275 response:
2276 value:
2277 - log:
2278 - oauth2
2279 - delete
2280 - client
2281 - id:
2282 - "1"
2283 msg:
2284 - items_deleted
2285 - "1"
2286 type: success
2287 schema:
2288 properties:
2289 log:
2290 description: contains request object
2291 items: {}
2292 type: array
2293 msg:
2294 items: {}
2295 type: array
2296 type:
2297 enum:
2298 - success
2299 - danger
2300 - error
2301 type: string
2302 type: object
2303 description: OK
2304 headers: {}
2305 tags:
2306 - oAuth Clients
2307 description: >-
2308 Using this endpoint you can delete a oAuth client, for this you have to
2309 know its ID. You can get the ID using the GET method.
2310 operationId: Delete oAuth Client
2311 requestBody:
2312 content:
2313 application/json:
2314 schema:
2315 example:
2316 - "3"
2317 properties:
2318 items:
2319 description: contains list of oAuth clients you want to delete
2320 type: object
2321 type: object
2322 summary: Delete oAuth Client
2323 /api/v1/delete/qitem:
2324 post:
2325 responses:
2326 "401":
2327 $ref: "#/components/responses/Unauthorized"
2328 "200":
2329 content:
2330 application/json:
2331 examples:
2332 response:
2333 value:
2334 - log:
2335 - quarantine
2336 - delete
2337 - id:
2338 - "33"
2339 msg:
2340 - item_deleted
2341 - "33"
2342 type: success
2343 schema:
2344 properties:
2345 log:
2346 description: contains request object
2347 items: {}
2348 type: array
2349 msg:
2350 items: {}
2351 type: array
2352 type:
2353 enum:
2354 - success
2355 - danger
2356 - error
2357 type: string
2358 type: object
2359 description: OK
2360 headers: {}
2361 tags:
2362 - Quarantine
2363 description: >-
2364 Using this endpoint you can delete a email from quarantine, for this you
2365 have to know its ID. You can get the ID using the GET method.
2366 operationId: Delete mails in Quarantine
2367 requestBody:
2368 content:
2369 application/json:
2370 schema:
2371 example:
2372 - "33"
2373 properties:
2374 items:
2375 description: contains list of emails you want to delete
2376 type: object
2377 type: object
2378 summary: Delete mails in Quarantine
2379 /api/v1/delete/recipient_map:
2380 post:
2381 responses:
2382 "401":
2383 $ref: "#/components/responses/Unauthorized"
2384 "200":
2385 content:
2386 application/json:
2387 examples:
2388 response:
2389 value:
2390 - log:
2391 - recipient_map
2392 - delete
2393 - id:
2394 - "1"
2395 - null
2396 msg:
2397 - recipient_map_entry_deleted
2398 - "1"
2399 type: success
2400 schema:
2401 properties:
2402 log:
2403 description: contains request object
2404 items: {}
2405 type: array
2406 msg:
2407 items: {}
2408 type: array
2409 type:
2410 enum:
2411 - success
2412 - danger
2413 - error
2414 type: string
2415 type: object
2416 description: OK
2417 headers: {}
2418 tags:
2419 - Address Rewriting
2420 description: >-
2421 Using this endpoint you can delete a recipient map, for this you have to
2422 know its ID. You can get the ID using the GET method.
2423 operationId: Delete Recipient Map
2424 requestBody:
2425 content:
2426 application/json:
2427 schema:
2428 example:
2429 - "1"
2430 properties:
2431 items:
2432 description: contains list of recipient maps you want to delete
2433 type: object
2434 type: object
2435 summary: Delete Recipient Map
2436 /api/v1/delete/relayhost:
2437 post:
2438 responses:
2439 "401":
2440 $ref: "#/components/responses/Unauthorized"
2441 "200":
2442 content:
2443 application/json:
2444 examples:
2445 response:
2446 value:
2447 - log:
2448 - relayhost
2449 - delete
2450 - id:
2451 - "1"
2452 msg:
2453 - relayhost_removed
2454 - "1"
2455 type: success
2456 schema:
2457 properties:
2458 log:
2459 description: contains request object
2460 items: {}
2461 type: array
2462 msg:
2463 items: {}
2464 type: array
2465 type:
2466 enum:
2467 - success
2468 - danger
2469 - error
2470 type: string
2471 type: object
2472 description: OK
2473 headers: {}
2474 tags:
2475 - Routing
2476 description: >-
2477 Using this endpoint you can delete a Sender-Dependent Transport, for
2478 this you have to know its ID. You can get the ID using the GET method.
2479 operationId: Delete Sender-Dependent Transports
2480 requestBody:
2481 content:
2482 application/json:
2483 schema:
2484 example:
2485 - "1"
2486 properties:
2487 items:
2488 description: >-
2489 contains list of Sender-Dependent Transport you want to
2490 delete
2491 type: object
2492 type: object
2493 summary: Delete Sender-Dependent Transports
2494 /api/v1/delete/resource:
2495 post:
2496 responses:
2497 "401":
2498 $ref: "#/components/responses/Unauthorized"
2499 "200":
2500 content:
2501 application/json:
2502 examples:
2503 response:
2504 value:
2505 - log:
2506 - mailbox
2507 - delete
2508 - resource
2509 - name:
2510 - test@mailcow.tld
2511 - null
2512 msg:
2513 - resource_removed
2514 - test@mailcow.tld
2515 type: success
2516 schema:
2517 properties:
2518 log:
2519 description: contains request object
2520 items: {}
2521 type: array
2522 msg:
2523 items: {}
2524 type: array
2525 type:
2526 enum:
2527 - success
2528 - danger
2529 - error
2530 type: string
2531 type: object
2532 description: OK
2533 headers: {}
2534 tags:
2535 - Resources
2536 description: >-
2537 Using this endpoint you can delete a Resources, for this you have to
2538 know its ID. You can get the ID using the GET method.
2539 operationId: Delete Resources
2540 requestBody:
2541 content:
2542 application/json:
2543 schema:
2544 example:
2545 - test@mailcow.tld
2546 properties:
2547 items:
2548 description: contains list of Resources you want to delete
2549 type: object
2550 type: object
2551 summary: Delete Resources
2552 /api/v1/delete/syncjob:
2553 post:
2554 responses:
2555 "401":
2556 $ref: "#/components/responses/Unauthorized"
2557 "200":
2558 content:
2559 application/json:
2560 examples:
2561 response:
2562 value:
2563 log:
2564 - entity
2565 - action
2566 - object
2567 msg:
2568 - message
2569 - entity name
2570 type: success
2571 schema:
2572 properties:
2573 log:
2574 description: contains request object
2575 items: {}
2576 type: array
2577 msg:
2578 items: {}
2579 type: array
2580 type:
2581 enum:
2582 - success
2583 - danger
2584 - error
2585 type: string
2586 type: object
2587 description: OK
2588 headers: {}
2589 tags:
2590 - Sync jobs
2591 description: You can delete one or more sync jobs.
2592 operationId: Delete sync job
2593 requestBody:
2594 content:
2595 application/json:
2596 schema:
2597 example:
2598 - "6"
2599 - "9"
2600 properties:
2601 items:
2602 description: contains list of aliases you want to delete
2603 type: object
2604 type: object
2605 summary: Delete sync job
2606 /api/v1/delete/tls-policy-map:
2607 post:
2608 responses:
2609 "401":
2610 $ref: "#/components/responses/Unauthorized"
2611 "200":
2612 content:
2613 application/json:
2614 examples:
2615 response:
2616 value:
2617 - log:
2618 - tls_policy_maps
2619 - delete
2620 - id:
2621 - "1"
2622 - null
2623 msg:
2624 - tls_policy_map_entry_deleted
2625 - "1"
2626 type: success
2627 schema:
2628 properties:
2629 log:
2630 description: contains request object
2631 items: {}
2632 type: array
2633 msg:
2634 items: {}
2635 type: array
2636 type:
2637 enum:
2638 - success
2639 - danger
2640 - error
2641 type: string
2642 type: object
2643 description: OK
2644 headers: {}
2645 tags:
2646 - Outgoing TLS Policy Map Overrides
2647 description: >-
2648 Using this endpoint you can delete a TLS Policy Map, for this you have
2649 to know its ID. You can get the ID using the GET method.
2650 operationId: Delete TLS Policy Map
2651 requestBody:
2652 content:
2653 application/json:
2654 schema:
2655 example:
2656 - "3"
2657 properties:
2658 items:
2659 description: contains list of tls policy maps you want to delete
2660 type: object
2661 type: object
2662 summary: Delete TLS Policy Map
2663 /api/v1/delete/transport:
2664 post:
2665 responses:
2666 "401":
2667 $ref: "#/components/responses/Unauthorized"
2668 "200":
2669 content:
2670 application/json:
2671 examples:
2672 response:
2673 value:
2674 - log:
2675 - transport
2676 - delete
2677 - id:
2678 - "1"
2679 msg:
2680 - relayhost_removed
2681 - "1"
2682 type: success
2683 schema:
2684 properties:
2685 log:
2686 description: contains request object
2687 items: {}
2688 type: array
2689 msg:
2690 items: {}
2691 type: array
2692 type:
2693 enum:
2694 - success
2695 - danger
2696 - error
2697 type: string
2698 type: object
2699 description: OK
2700 headers: {}
2701 tags:
2702 - Routing
2703 description: >-
2704 Using this endpoint you can delete a Transport Maps, for this you have
2705 to know its ID. You can get the ID using the GET method.
2706 operationId: Delete Transport Maps
2707 requestBody:
2708 content:
2709 application/json:
2710 schema:
2711 example:
2712 - "1"
2713 properties:
2714 items:
2715 description: contains list of transport maps you want to delete
2716 type: object
2717 type: object
2718 summary: Delete Transport Maps
2719 /api/v1/edit/alias:
2720 post:
2721 responses:
2722 "401":
2723 $ref: "#/components/responses/Unauthorized"
2724 "200":
2725 content:
2726 application/json:
2727 examples:
2728 response:
2729 value:
2730 - log:
2731 - mailbox
2732 - edit
2733 - alias
2734 - active: "1"
2735 address: alias@domain.tld
2736 goto: destination@domain.tld
2737 id:
2738 - "6"
2739 private_comment: private comment
2740 public_comment: public comment
2741 - null
2742 msg:
2743 - alias_modified
2744 - alias@domain.tld
2745 type: success
2746 schema:
2747 properties:
2748 log:
2749 description: contains request object
2750 items: {}
2751 type: array
2752 msg:
2753 items: {}
2754 type: array
2755 type:
2756 enum:
2757 - success
2758 - danger
2759 - error
2760 type: string
2761 type: object
2762 description: OK
2763 headers: {}
2764 tags:
2765 - Aliases
2766 description: >-
2767 You can update one or more aliases per request. You can also send just
2768 attributes you want to change
2769 operationId: Update alias
2770 requestBody:
2771 content:
2772 application/json:
2773 schema:
2774 example:
2775 attr:
2776 active: "1"
2777 address: alias@domain.tld
2778 goto: destination@domain.tld
2779 private_comment: private comment
2780 public_comment: public comment
2781 items: ["6"]
2782 properties:
2783 attr:
2784 properties:
2785 active:
2786 description: is alias active or not
2787 type: boolean
2788 address:
2789 description: 'alias address, for catchall use "@domain.tld"'
2790 type: string
2791 goto:
2792 description: "destination address, comma separated"
2793 type: string
2794 goto_ham:
2795 description: learn as ham
2796 type: boolean
2797 goto_null:
2798 description: silently ignore
2799 type: boolean
2800 goto_spam:
2801 description: learn as spam
2802 type: boolean
2803 private_comment:
2804 type: string
2805 public_comment:
2806 type: string
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +02002807 sogo_visible:
2808 description: toggle visibility as selectable sender in SOGo
2809 type: boolean
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01002810 type: object
2811 items:
2812 description: contains list of aliases you want update
2813 type: object
2814 type: object
2815 summary: Update alias
2816 /api/v1/edit/domain:
2817 post:
2818 responses:
2819 "401":
2820 $ref: "#/components/responses/Unauthorized"
2821 "200":
2822 content:
2823 "*/*":
2824 schema:
2825 properties:
2826 log:
2827 description: contains request object
2828 items: {}
2829 type: array
2830 msg:
2831 items: {}
2832 type: array
2833 type:
2834 enum:
2835 - success
2836 - danger
2837 - error
2838 type: string
2839 type: object
2840 description: OK
2841 headers: {}
2842 tags:
2843 - Domains
2844 description: >-
2845 You can update one or more domains per request. You can also send just
2846 attributes you want to change.
2847
2848 Example: You can add domain names to items list and in attr object just
2849 include `"active": "0"` to deactivate domains.
2850 operationId: Update domain
2851 requestBody:
2852 content:
2853 application/json:
2854 schema:
2855 example:
2856 attr:
2857 active: "1"
2858 aliases: "400"
2859 backupmx: "1"
2860 defquota: "3072"
2861 description: domain description
2862 gal: "1"
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01002863 mailboxes: "10"
2864 maxquota: "10240"
2865 quota: "10240"
2866 relay_all_recipients: "0"
2867 relayhost: "2"
2868 items: domain.tld
2869 properties:
2870 attr:
2871 properties:
2872 active:
2873 description: is domain active or not
2874 type: boolean
2875 aliases:
2876 description: limit count of aliases associated with this domain
2877 type: number
2878 backupmx:
2879 description: relay domain or not
2880 type: boolean
2881 defquota:
2882 description: predefined mailbox quota in `add mailbox` form
2883 type: number
2884 description:
2885 description: Description of domain
2886 type: string
2887 gal:
2888 description: >-
2889 is domain global address list active or not, it enables
2890 shared contacts accross domain in SOGo webmail
2891 type: boolean
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01002892 mailboxes:
2893 description: limit count of mailboxes associated with this domain
2894 type: number
2895 maxquota:
2896 description: maximum quota per mailbox
2897 type: number
2898 quota:
2899 description: maximum quota for this domain (for all mailboxes in sum)
2900 type: number
2901 relay_all_recipients:
2902 description: >-
2903 if not, them you have to create "dummy" mailbox for each
2904 address to relay
2905 type: boolean
2906 relayhost:
2907 description: id of relayhost
2908 type: number
2909 type: object
2910 items:
2911 description: contains list of domain names you want update
2912 type: object
2913 type: object
2914 summary: Update domain
2915 /api/v1/edit/fail2ban:
2916 post:
2917 responses:
2918 "401":
2919 $ref: "#/components/responses/Unauthorized"
2920 "200":
2921 content:
2922 "*/*":
2923 schema:
2924 properties:
2925 log:
2926 description: contains request object
2927 items: {}
2928 type: array
2929 msg:
2930 items: {}
2931 type: array
2932 type:
2933 enum:
2934 - success
2935 - danger
2936 - error
2937 type: string
2938 type: object
2939 description: OK
2940 headers: {}
2941 tags:
2942 - Fail2Ban
2943 description: >-
2944 Using this endpoint you can edit the Fail2Ban config and black or
2945 whitelist new ips.
2946 operationId: Edit Fail2Ban
2947 requestBody:
2948 content:
2949 application/json:
2950 schema:
2951 example:
2952 attr:
2953 ban_time: "86400"
2954 blacklist: "10.100.6.5/32,10.100.8.4/32"
2955 max_attempts: "5"
2956 netban_ipv4: "24"
2957 netban_ipv6: "64"
2958 retry_window: "600"
2959 whitelist: mailcow.tld
2960 items: none
2961 properties:
2962 attr:
2963 description: array containing the fail2ban settings
2964 properties:
2965 backlist:
2966 description: the backlisted ips or hostnames separated by comma
2967 type: string
2968 ban_time:
2969 description: the time a ip should be banned
2970 type: number
2971 max_attempts:
2972 description: the maximum numbe of wrong logins before a ip is banned
2973 type: number
2974 netban_ipv4:
2975 description: the networks mask to ban for ipv4
2976 type: number
2977 netban_ipv6:
2978 description: the networks mask to ban for ipv6
2979 type: number
2980 retry_window:
2981 description: >-
2982 the maximum time in which a ip as to login with false
2983 credentials to be banned
2984 type: number
2985 whitelist:
2986 description: whitelisted ips or hostnames sepereated by comma
2987 type: string
2988 type: object
2989 items:
2990 description: has to be none
2991 type: object
2992 summary: Edit Fail2Ban
2993 /api/v1/edit/mailbox:
2994 post:
2995 responses:
2996 "401":
2997 $ref: "#/components/responses/Unauthorized"
2998 "200":
2999 content:
3000 application/json:
3001 examples:
3002 response:
3003 value:
3004 - log:
3005 - mailbox
3006 - edit
3007 - mailbox
3008 - active: "1"
3009 force_pw_update: "0"
3010 name: Full name
3011 password: "*"
3012 password2: "*"
3013 quota: "3072"
3014 sender_acl:
3015 - default
3016 - info@domain2.tld
3017 - domain3.tld
3018 - "*"
3019 sogo_access: "1"
3020 username:
3021 - info@domain.tld
3022 - null
3023 msg:
3024 - mailbox_modified
3025 - info@domain.tld
3026 type: success
3027 schema:
3028 properties:
3029 log:
3030 description: contains request object
3031 items: {}
3032 type: array
3033 msg:
3034 items: {}
3035 type: array
3036 type:
3037 enum:
3038 - success
3039 - danger
3040 - error
3041 type: string
3042 type: object
3043 description: OK
3044 headers: {}
3045 tags:
3046 - Mailboxes
3047 description: >-
3048 You can update one or more mailboxes per request. You can also send just
3049 attributes you want to change
3050 operationId: Update mailbox
3051 requestBody:
3052 content:
3053 application/json:
3054 schema:
3055 example:
3056 attr:
3057 active: "1"
3058 force_pw_update: "0"
3059 name: Full name
3060 password: ""
3061 password2: ""
3062 quota: "3072"
3063 sender_acl:
3064 - default
3065 - info@domain2.tld
3066 - domain3.tld
3067 - "*"
3068 sogo_access: "1"
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +02003069 items:
3070 - info@domain.tld
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01003071 properties:
3072 attr:
3073 properties:
3074 active:
3075 description: is mailbox active or not
3076 type: boolean
3077 force_pw_update:
3078 description: force user to change password on next login
3079 type: boolean
3080 name:
3081 description: Full name of the mailbox user
3082 type: string
3083 password2:
3084 description: new mailbox password for confirmation
3085 type: string
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +02003086 password:
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01003087 description: new mailbox password
3088 type: string
3089 quota:
3090 description: mailbox quota
3091 type: number
3092 sender_acl:
3093 description: list of allowed send from addresses
3094 type: object
3095 sogo_access:
3096 description: is access to SOGo webmail active or not
3097 type: boolean
3098 type: object
3099 items:
3100 description: contains list of mailboxes you want update
3101 type: object
3102 type: object
3103 summary: Update mailbox
3104 /api/v1/edit/mailq:
3105 post:
3106 responses:
3107 "401":
3108 $ref: "#/components/responses/Unauthorized"
3109 "200":
3110 content:
3111 application/json:
3112 examples:
3113 response:
3114 value:
3115 msg: Task completed
3116 type: success
3117 description: OK
3118 headers: {}
3119 tags:
3120 - Queue Manager
3121 description: >-
3122 Using this API you can flush the current mail queue. This will try to
3123 deliver all mails currently in it.
3124
3125 This API uses the command: `postqueue -f`
3126 operationId: Flush Queue
3127 requestBody:
3128 content:
3129 application/json:
3130 schema:
3131 example:
3132 action: flush
3133 properties:
3134 action:
3135 description: use flush to flush the mail queue
3136 type: string
3137 type: object
3138 summary: Flush Queue
3139 /api/v1/edit/pushover:
3140 post:
3141 responses:
3142 "401":
3143 $ref: "#/components/responses/Unauthorized"
3144 "200":
3145 content:
3146 application/json:
3147 examples:
3148 response:
3149 value:
3150 - log:
3151 - pushover
3152 - edit
3153 - active: "0"
3154 evaluate_x_prio: "0"
3155 key: 21e8918e1jksdjcpis712
3156 only_x_prio: "0"
3157 senders: ""
3158 senders_regex: ""
3159 text: ""
3160 title: Mail
3161 token: 9023e2ohcwed27d1idu2
3162 username:
3163 - info@domain.tld
3164 msg: pushover_settings_edited
3165 type: success
3166 schema:
3167 properties:
3168 log:
3169 description: contains request object
3170 items: {}
3171 type: array
3172 msg:
3173 items: {}
3174 type: array
3175 type:
3176 enum:
3177 - success
3178 - danger
3179 - error
3180 type: string
3181 type: object
3182 description: OK
3183 headers: {}
3184 tags:
3185 - Mailboxes
3186 description: >-
3187 Using this endpoint it is possible to update the pushover settings for
3188 mailboxes
3189 operationId: Update Pushover settings
3190 requestBody:
3191 content:
3192 application/json:
3193 schema:
3194 example:
3195 attr:
3196 active: "0"
3197 evaluate_x_prio: "0"
3198 key: 21e8918e1jksdjcpis712
3199 only_x_prio: "0"
3200 senders: ""
3201 senders_regex: ""
3202 text: ""
3203 title: Mail
3204 token: 9023e2ohcwed27d1idu2
3205 items: info@domain.tld
3206 properties:
3207 attr:
3208 properties:
3209 active:
3210 description: Enables pushover 1 disable pushover 0
3211 type: number
3212 evaluate_x_prio:
3213 description: Send the Push with High priority
3214 type: number
3215 key:
3216 description: Pushover key
3217 type: string
3218 only_x_prio:
3219 description: Only send push for prio mails
3220 type: number
3221 senders:
3222 description: Only send push for emails from these senders
3223 type: string
3224 senders_regex:
3225 description: Regex to match senders for which a push will be send
3226 type: string
3227 text:
3228 description: Custom push noficiation text
3229 type: string
3230 title:
3231 description: Push title
3232 type: string
3233 token:
3234 description: Pushover token
3235 type: string
3236 type: object
3237 items:
3238 description: contains list of mailboxes you want to delete
3239 type: object
3240 type: object
3241 summary: Update Pushover settings
3242 /api/v1/edit/quarantine_notification:
3243 post:
3244 responses:
3245 "401":
3246 $ref: "#/components/responses/Unauthorized"
3247 "200":
3248 description: OK
3249 headers: {}
3250 tags:
3251 - Mailboxes
3252 description: You can update one or more mailboxes per request.
3253 operationId: Quarantine Notifications
3254 requestBody:
3255 content:
3256 application/json:
3257 schema:
3258 example:
3259 attr:
3260 quarantine_notification: hourly
3261 items:
3262 anyOf:
3263 - mailbox1@domain.tld
3264 - mailbox2@domain.tld
3265 properties:
3266 attr:
3267 properties:
3268 quarantine_notification:
3269 description: recurrence
3270 enum:
3271 - hourly
3272 - daily
3273 - weekly
3274 - never
3275 type: string
3276 type: object
3277 items:
3278 description: >-
3279 contains list of mailboxes you want set qurantine
3280 notifications
3281 type: object
3282 type: object
3283 summary: Quarantine Notifications
3284 /api/v1/edit/syncjob:
3285 post:
3286 responses:
3287 "401":
3288 $ref: "#/components/responses/Unauthorized"
3289 "200":
3290 content:
3291 application/json:
3292 examples:
3293 response:
3294 value:
3295 log:
3296 - entity
3297 - action
3298 - object
3299 msg:
3300 - message
3301 - entity name
3302 type: success
3303 schema:
3304 properties:
3305 log:
3306 description: contains request object
3307 items: {}
3308 type: array
3309 msg:
3310 items: {}
3311 type: array
3312 type:
3313 enum:
3314 - success
3315 - danger
3316 - error
3317 type: string
3318 type: object
3319 description: OK
3320 headers: {}
3321 tags:
3322 - Sync jobs
3323 description: >-
3324 You can update one or more sync jobs per request. You can also send just
3325 attributes you want to change.
3326 operationId: Update sync job
3327 requestBody:
3328 content:
3329 application/json:
3330 schema:
3331 example:
3332 attr:
3333 active: "1"
3334 automap: "1"
3335 custom_params: ""
3336 delete1: "0"
3337 delete2: "0"
3338 delete2duplicates: "1"
3339 enc1: SSL
3340 exclude: (?i)spam|(?i)junk
3341 host1: imap.server.tld
3342 maxage: "0"
3343 maxbytespersecond: "0"
3344 mins_interval: "20"
3345 password1: supersecret
3346 port1: "993"
3347 skipcrossduplicates: "0"
3348 subfolder2: External
3349 subscribeall: "1"
3350 timeout1: "600"
3351 timeout2: "600"
3352 user1: username
3353 items: "1"
3354 properties:
3355 attr:
3356 properties:
3357 active:
3358 description: Is sync job active
3359 type: boolean
3360 automap:
3361 description: >-
3362 Try to automap folders ("Sent items", "Sent" => "Sent"
3363 etc.)
3364 type: boolean
3365 custom_params:
3366 description: Custom parameters passed to imapsync command
3367 type: string
3368 delete1:
3369 description: Delete from source when completed
3370 type: boolean
3371 delete2:
3372 description: Delete messages on destination that are not on source
3373 type: boolean
3374 delete2duplicates:
3375 description: Delete duplicates on destination
3376 type: boolean
3377 enc1:
3378 description: Encryption
3379 enum:
3380 - TLS
3381 - SSL
3382 - PLAIN
3383 type: string
3384 exclude:
3385 description: Exclude objects (regex)
3386 type: string
3387 host1:
3388 description: Hostname
3389 type: string
3390 maxage:
3391 description: >-
3392 Maximum age of messages in days that will be polled from
3393 remote (0 = ignore age)
3394 type: number
3395 maxbytespersecond:
3396 description: Max. bytes per second (0 = unlimited)
3397 type: number
3398 mins_interval:
3399 description: Interval (min)
3400 type: number
3401 password1:
3402 description: Password
3403 type: string
3404 port1:
3405 description: Port
3406 type: string
3407 skipcrossduplicates:
3408 description: >-
3409 Skip duplicate messages across folders (first come,
3410 first serve)
3411 type: boolean
3412 subfolder2:
3413 description: >-
3414 Sync into subfolder on destination (empty = do not use
3415 subfolder)
3416 type: string
3417 subscribeall:
3418 description: Subscribe all folders
3419 type: boolean
3420 timeout1:
3421 description: Timeout for connection to remote host
3422 type: number
3423 timeout2:
3424 description: Timeout for connection to local host
3425 type: number
3426 user1:
3427 description: Username
3428 type: string
3429 type: object
3430 items:
3431 description: contains list of aliases you want update
3432 type: object
3433 type: object
3434 summary: Update sync job
3435 /api/v1/edit/user-acl:
3436 post:
3437 responses:
3438 "401":
3439 $ref: "#/components/responses/Unauthorized"
3440 "200":
3441 content:
3442 application/json:
3443 examples:
3444 response:
3445 value:
3446 - log:
3447 - acl
3448 - edit
3449 - user
3450 - user_acl:
3451 - spam_alias
3452 - tls_policy
3453 - spam_score
3454 - spam_policy
3455 - delimiter_action
3456 - syncjobs
3457 - eas_reset
3458 - quarantine
3459 - sogo_profile_reset
3460 - quarantine_attachments
3461 - quarantine_notification
3462 - app_passwds
3463 - pushover
3464 username:
3465 - info@domain.tld
3466 msg:
3467 - acl_saved
3468 - info@domain.tld
3469 type: success
3470 schema:
3471 properties:
3472 log:
3473 description: contains request object
3474 items: {}
3475 type: array
3476 msg:
3477 items: {}
3478 type: array
3479 type:
3480 enum:
3481 - success
3482 - danger
3483 - error
3484 type: string
3485 type: object
3486 description: OK
3487 headers: {}
3488 tags:
3489 - Mailboxes
3490 description: Using this endpoints its possible to update the ACL's for mailboxes
3491 operationId: Update mailbox ACL
3492 requestBody:
3493 content:
3494 application/json:
3495 schema:
3496 example:
3497 attr:
3498 user_acl:
3499 - spam_alias
3500 - tls_policy
3501 - spam_score
3502 - spam_policy
3503 - delimiter_action
3504 - syncjobs
3505 - eas_reset
3506 - quarantine
3507 - sogo_profile_reset
3508 - quarantine_attachments
3509 - quarantine_notification
3510 - app_passwds
3511 - pushover
3512 items: info@domain.tld
3513 properties:
3514 attr:
3515 properties:
3516 user_acl:
3517 description: contains a list of active user acls
3518 type: object
3519 type: object
3520 items:
3521 description: contains list of mailboxes you want to delete
3522 type: object
3523 type: object
3524 summary: Update mailbox ACL
3525 "/api/v1/get/alias/{id}":
3526 get:
3527 parameters:
3528 - description: id of entry you want to get
3529 example: all
3530 in: path
3531 name: id
3532 required: true
3533 schema:
3534 enum:
3535 - all
3536 - "1"
3537 - "2"
3538 - "5"
3539 - "10"
3540 type: string
3541 - description: e.g. api-key-string
3542 example: api-key-string
3543 in: header
3544 name: X-API-Key
3545 required: false
3546 schema:
3547 type: string
3548 responses:
3549 "401":
3550 $ref: "#/components/responses/Unauthorized"
3551 "200":
3552 content:
3553 application/json:
3554 examples:
3555 response:
3556 value:
3557 - active: "1"
3558 address: alias@domain.tld
3559 created: "2019-04-04 19:29:49"
3560 domain: domain.tld
3561 goto: destination@domain.tld
3562 id: 6
3563 in_primary_domain: ""
3564 is_catch_all: 0
3565 modified: null
3566 private_comment: null
3567 public_comment: null
3568 - active: "1"
3569 address: "@domain.tld"
3570 created: "2019-04-27 13:42:39"
3571 domain: domain.tld
3572 goto: destination@domain.tld
3573 id: 10
3574 in_primary_domain: ""
3575 is_catch_all: 1
3576 modified: null
3577 private_comment: null
3578 public_comment: null
3579 description: OK
3580 headers: {}
3581 tags:
3582 - Aliases
3583 description: You can list mailbox aliases existing in system.
3584 operationId: Get aliases
3585 summary: Get aliases
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +01003586 "/api/v1/get/time_limited_aliases/{mailbox}":
3587 get:
3588 parameters:
3589 - description: mailbox you want to get aliasses from
3590 example: domain.tld
3591 in: path
3592 schema:
3593 type: string
3594 name: mailbox
3595 required: true
3596 - description: e.g. api-key-string
3597 example: api-key-string
3598 in: header
3599 name: X-API-Key
3600 required: false
3601 schema:
3602 type: string
3603 responses:
3604 "401":
3605 $ref: "#/components/responses/Unauthorized"
3606 "200":
3607 content:
3608 application/json:
3609 examples:
3610 response:
3611 value:
3612 - address: alias@domain.tld
3613 goto: destination@domain.tld
3614 validity: 1668251246
3615 created: "2021-11-12 12:07:26"
3616 modified: null
3617 description: OK
3618 headers: {}
3619 tags:
3620 - Aliases
3621 description: You can list time limited mailbox aliases existing in system.
3622 operationId: Get time limited aliases
3623 summary: Get time limited aliases
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01003624 "/api/v1/get/app-passwd/all/{mailbox}":
3625 get:
3626 parameters:
3627 - description: mailbox of entry you want to get
3628 example: hello@mailcow.email
3629 in: path
3630 name: mailbox
3631 required: true
3632 schema:
3633 enum:
3634 - hello@mailcow.email
3635 type: string
3636 - description: e.g. api-key-string
3637 example: api-key-string
3638 in: header
3639 name: X-API-Key
3640 required: false
3641 schema:
3642 type: string
3643 responses:
3644 "401":
3645 $ref: "#/components/responses/Unauthorized"
3646 "200":
3647 content:
3648 application/json:
3649 examples:
3650 response:
3651 value:
3652 - active: "1"
3653 created: "2019-12-21 16:04:55"
3654 domain: mailcow.email
3655 id: 2
3656 mailbox: hello@mailcow.email
3657 modified: null
3658 name: emclient
3659 description: OK
3660 headers: {}
3661 tags:
3662 - App Passwords
3663 description: >-
3664 Using this endpoint you can get all app passwords from a specific
3665 mailbox.
3666 operationId: Get App Password
3667 summary: Get App Password
3668 "/api/v1/get/bcc/{id}":
3669 get:
3670 parameters:
3671 - description: id of entry you want to get
3672 example: all
3673 in: path
3674 name: id
3675 required: true
3676 schema:
3677 enum:
3678 - all
3679 - "1"
3680 - "2"
3681 - "5"
3682 - "10"
3683 type: string
3684 - description: e.g. api-key-string
3685 example: api-key-string
3686 in: header
3687 name: X-API-Key
3688 required: false
3689 schema:
3690 type: string
3691 responses:
3692 "401":
3693 $ref: "#/components/responses/Unauthorized"
3694 "200":
3695 content:
3696 application/json:
3697 examples:
3698 response:
3699 value:
3700 - active: "1"
3701 bcc_dest: bcc@awesomecow.tld
3702 created: "2019-10-02 21:44:34"
3703 domain: mailcow.tld
3704 id: 3
3705 local_dest: "@mailcow.tld"
3706 modified: null
3707 type: sender
3708 description: OK
3709 headers: {}
3710 tags:
3711 - Address Rewriting
3712 description: Using this endpoint you can get all BCC maps.
3713 operationId: Get BCC Map
3714 summary: Get BCC Map
3715 "/api/v1/get/dkim/{domain}":
3716 get:
3717 parameters:
3718 - description: name of domain
3719 in: path
3720 name: domain
3721 required: true
3722 schema:
3723 type: string
3724 - description: e.g. api-key-string
3725 example: api-key-string
3726 in: header
3727 name: X-API-Key
3728 required: false
3729 schema:
3730 type: string
3731 responses:
3732 "401":
3733 $ref: "#/components/responses/Unauthorized"
3734 "200":
3735 content:
3736 application/json:
3737 examples:
3738 response:
3739 value:
3740 dkim_selector: dkim
3741 dkim_txt: >-
3742 v=DKIM1;k=rsa;t=s;s=email;p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA21tUSjyasQy/hJmVjPnlRGfzx6TPhYj8mXY9DVOzSAE64Gddw/GnE/GcCR6WXNT23u9q4zPnz1IPoNt5kFOps8vg/iNqrcH++494noaZuYyFPPFnebkfryO4EvEyxC/c66qts+gnOUml+M8uv5WObBJld2gG12jLwFM0263J/N6J8LuUsaXOB2uCIfx8Nf4zjuJ6Ieez2uyHNK5dXjDLfKA4mTr+EEK6W6e34M4KN1liWM6r9Oy5S1FlLrD42VpURxxBZtBiEtaJPEKSQuk6GQz8ihu7W20Yr53tyCdaORu8dhxXVUWVf+GjuuMEdAmQCjYkarXdYCrt56Psw703kwIDAQAB
3743 length: "2048"
3744 privkey: ""
3745 pubkey: >-
3746 MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA21tUSjyasQy/hJmVjPnlRGfzx6TPhYj8mXY9DVOzSAE64Gddw/GnE/GcCR6WXNT23u9q4zPnz1IPoNt5kFOps8vg/iNqrcH++494noaZuYyFPPFnebkfryO4EvEyxC/c66qts+gnOUml+M8uv5WObBJld2gG12jLwFM0263J/N6J8LuUsaXOB2uCIfx8Nf4zjuJ6Ieez2uyHNK5dXjDLfKA4mTr+EEK6W6e34M4KN1liWM6r9Oy5S1FlLrD42VpURxxBZtBiEtaJPEKSQuk6GQz8ihu7W20Yr53tyCdaORu8dhxXVUWVf+GjuuMEdAmQCjYkarXdYCrt56Psw703kwIDAQAB
3747 description: OK
3748 headers: {}
3749 tags:
3750 - DKIM
3751 description: >-
3752 Using this endpoint you can get the DKIM public key for a specific
3753 domain.
3754 operationId: Get DKIM Key
3755 summary: Get DKIM Key
3756 /api/v1/get/domain-admin/all:
3757 get:
3758 responses:
3759 "401":
3760 $ref: "#/components/responses/Unauthorized"
3761 "200":
3762 content:
3763 application/json:
3764 examples:
3765 response:
3766 value:
3767 - active: "1"
3768 created: "2019-10-02 10:29:41"
3769 selected_domains:
3770 - mailcow.tld
3771 tfa_active: "0"
3772 unselected_domains:
3773 - awesomemailcow.de
3774 - mailcowisgreat.de
3775 username: testadmin
3776 description: OK
3777 headers: {}
3778 tags:
3779 - Domain admin
3780 description: ""
3781 operationId: Get Domain Admins
3782 summary: Get Domain Admins
3783 "/api/v1/get/domain/{id}":
3784 get:
3785 parameters:
3786 - description: id of entry you want to get
3787 example: all
3788 in: path
3789 name: id
3790 required: true
3791 schema:
3792 enum:
3793 - all
3794 - mailcow.tld
3795 type: string
3796 - description: e.g. api-key-string
3797 example: api-key-string
3798 in: header
3799 name: X-API-Key
3800 required: false
3801 schema:
3802 type: string
3803 responses:
3804 "401":
3805 $ref: "#/components/responses/Unauthorized"
3806 "200":
3807 content:
3808 application/json:
3809 examples:
3810 response:
3811 value:
3812 - active: "1"
3813 aliases_in_domain: 0
3814 aliases_left: 400
3815 backupmx: "0"
3816 bytes_total: "5076666944"
3817 def_new_mailbox_quota: 3221225472
3818 def_quota_for_mbox: 3221225472
3819 description: Some description
3820 domain_name: domain.tld
3821 gal: "0"
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01003822 max_new_mailbox_quota: 10737418240
3823 max_num_aliases_for_domain: 400
3824 max_num_mboxes_for_domain: 10
3825 max_quota_for_domain: 10737418240
3826 max_quota_for_mbox: 10737418240
3827 mboxes_in_domain: 0
3828 mboxes_left: 10
3829 msgs_total: "172440"
3830 quota_used_in_domain: "0"
3831 relay_all_recipients: "0"
3832 relayhost: "0"
3833 rl: false
3834 - active: "1"
3835 aliases_in_domain: 0
3836 aliases_left: 400
3837 backupmx: "1"
3838 bytes_total: "5076666944"
3839 def_new_mailbox_quota: 3221225472
3840 def_quota_for_mbox: 3221225472
3841 description: domain description
3842 domain_name: domain2.tld
3843 gal: "0"
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01003844 max_new_mailbox_quota: 10737418240
3845 max_num_aliases_for_domain: 400
3846 max_num_mboxes_for_domain: 10
3847 max_quota_for_domain: 10737418240
3848 max_quota_for_mbox: 10737418240
3849 mboxes_in_domain: 0
3850 mboxes_left: 10
3851 msgs_total: "172440"
3852 quota_used_in_domain: "0"
3853 relay_all_recipients: "0"
3854 relayhost: "0"
3855 rl: false
3856 description: OK
3857 headers: {}
3858 tags:
3859 - Domains
3860 description: You can list all domains existing in system.
3861 operationId: Get domains
3862 summary: Get domains
3863 /api/v1/get/fail2ban:
3864 get:
3865 responses:
3866 "401":
3867 $ref: "#/components/responses/Unauthorized"
3868 "200":
3869 content:
3870 application/json:
3871 examples:
3872 response:
3873 value:
3874 ban_time: 604800
3875 blacklist: |-
3876 45.82.153.37/32
3877 92.118.38.52/32
3878 max_attempts: 1
3879 netban_ipv4: 32
3880 netban_ipv6: 128
3881 perm_bans:
3882 - 45.82.153.37/32
3883 - 92.118.38.52/32
3884 retry_window: 7200
3885 whitelist: 1.1.1.1
3886 description: OK
3887 headers: {}
3888 tags:
3889 - Fail2Ban
3890 description: Gets the current Fail2Ban configuration.
3891 operationId: Get Fail2Ban Config
3892 summary: Get Fail2Ban Config
3893 /api/v1/get/fwdhost/all:
3894 get:
3895 responses:
3896 "401":
3897 $ref: "#/components/responses/Unauthorized"
3898 "200":
3899 content:
3900 application/json:
3901 examples:
3902 response:
3903 value:
3904 - host: 5.1.76.202
3905 keep_spam: "yes"
3906 source: hosted.mailcow.de
3907 - host: "2a00:f820:417::202"
3908 keep_spam: "yes"
3909 source: hosted.mailcow.de
3910 description: OK
3911 headers: {}
3912 tags:
3913 - Fordwarding Hosts
3914 description: You can list all Forwarding Hosts in your mailcow.
3915 operationId: Get Forwarding Hosts
3916 summary: Get Forwarding Hosts
3917 "/api/v1/get/logs/acme/{count}":
3918 get:
3919 parameters:
3920 - description: Number of logs to return
3921 in: path
3922 name: count
3923 required: true
3924 schema:
3925 type: number
3926 - description: e.g. api-key-string
3927 example: api-key-string
3928 in: header
3929 name: X-API-Key
3930 required: false
3931 schema:
3932 type: string
3933 responses:
3934 "401":
3935 $ref: "#/components/responses/Unauthorized"
3936 "200":
3937 content:
3938 application/json:
3939 examples:
3940 response:
3941 value:
3942 - message: >-
3943 Certificate validation done, neither changed nor due for
3944 renewal, sleeping for another day.
3945 time: "1569927728"
3946 description: OK
3947 headers: {}
3948 tags:
3949 - Logs
3950 description: >-
3951 This Api endpoint lists all ACME logs from issued Lets Enctypts
3952 certificates.
3953
3954 Tip: You can limit how many logs you want to get by using `/<count>` at
3955 the end of the api url.
3956 operationId: Get ACME logs
3957 summary: Get ACME logs
3958 "/api/v1/get/logs/api/{count}":
3959 get:
3960 parameters:
3961 - description: Number of logs to return
3962 in: path
3963 name: count
3964 required: true
3965 schema:
3966 type: number
3967 - description: e.g. api-key-string
3968 example: api-key-string
3969 in: header
3970 name: X-API-Key
3971 required: false
3972 schema:
3973 type: string
3974 responses:
3975 "401":
3976 $ref: "#/components/responses/Unauthorized"
3977 "200":
3978 content:
3979 application/json:
3980 examples:
3981 response:
3982 value:
3983 - data: ""
3984 method: GET
3985 remote: 1.1.1.1
3986 time: 1569939001
3987 uri: /api/v1/get/logs/api/2
3988 description: OK
3989 headers: {}
3990 tags:
3991 - Logs
3992 description: >-
3993 This Api endpoint lists all Api logs.
3994
3995 Tip: You can limit how many logs you want to get by using `/<count>` at
3996 the end of the api url.
3997 operationId: Get Api logs
3998 summary: Get Api logs
3999 "/api/v1/get/logs/autodiscover/{count}":
4000 get:
4001 parameters:
4002 - description: Number of logs to return
4003 in: path
4004 name: count
4005 required: true
4006 schema:
4007 type: number
4008 - description: e.g. api-key-string
4009 example: api-key-string
4010 in: header
4011 name: X-API-Key
4012 required: false
4013 schema:
4014 type: string
4015 responses:
4016 "401":
4017 $ref: "#/components/responses/Unauthorized"
4018 "200":
4019 content:
4020 application/json:
4021 examples:
4022 response:
4023 value:
4024 - service: activesync
4025 time: 1569684212
4026 ua: >-
4027 Microsoft Office/16.0 (Windows NT 6.2; MAPICPL
4028 16.0.11328; Pro)
4029 user: awesome@mailcow.de
4030 description: OK
4031 headers: {}
4032 tags:
4033 - Logs
4034 description: >-
4035 This Api endpoint lists all Autodiscover logs.
4036
4037 Tip: You can limit how many logs you want to get by using `/<count>` at
4038 the end of the api url.
4039 operationId: Get Autodiscover logs
4040 summary: Get Autodiscover logs
4041 "/api/v1/get/logs/dovecot/{count}":
4042 get:
4043 parameters:
4044 - description: Number of logs to return
4045 in: path
4046 name: count
4047 required: true
4048 schema:
4049 type: number
4050 - description: e.g. api-key-string
4051 example: api-key-string
4052 in: header
4053 name: X-API-Key
4054 required: false
4055 schema:
4056 type: string
4057 responses:
4058 "401":
4059 $ref: "#/components/responses/Unauthorized"
4060 "200":
4061 content:
4062 application/json:
4063 examples:
4064 response:
4065 value:
4066 - message: >-
4067 managesieve-login: Disconnected (no auth attempts in 0
4068 secs): user=<>, rip=172.22.1.3, lip=172.22.1.250
4069 priority: info
4070 program: dovecot
4071 time: "1569938740"
4072 description: OK
4073 headers: {}
4074 tags:
4075 - Logs
4076 description: >-
4077 This Api endpoint lists all Dovecot logs.
4078
4079 Tip: You can limit how many logs you want to get by using `/<count>` at
4080 the end of the api url.
4081 operationId: Get Dovecot logs
4082 summary: Get Dovecot logs
4083 "/api/v1/get/logs/netfilter/{count}":
4084 get:
4085 parameters:
4086 - description: Number of logs to return
4087 in: path
4088 name: count
4089 required: true
4090 schema:
4091 type: number
4092 - description: e.g. api-key-string
4093 example: api-key-string
4094 in: header
4095 name: X-API-Key
4096 required: false
4097 schema:
4098 type: string
4099 responses:
4100 "401":
4101 $ref: "#/components/responses/Unauthorized"
4102 "200":
4103 content:
4104 application/json:
4105 examples:
4106 response:
4107 value:
4108 - message: "Whitelist was changed, it has 1 entries"
4109 priority: info
4110 time: 1569754911
4111 - message: Add host/network 1.1.1.1/32 to blacklist
4112 priority: crit
4113 time: 1569754911
4114 description: OK
4115 headers: {}
4116 tags:
4117 - Logs
4118 description: >-
4119 This Api endpoint lists all Netfilter logs.
4120
4121 Tip: You can limit how many logs you want to get by using `/<count>` at
4122 the end of the api url.
4123 operationId: Get Netfilter logs
4124 summary: Get Netfilter logs
4125 "/api/v1/get/logs/postfix/{count}":
4126 get:
4127 parameters:
4128 - description: Number of logs to return
4129 in: path
4130 name: count
4131 required: true
4132 schema:
4133 type: number
4134 - description: e.g. api-key-string
4135 example: api-key-string
4136 in: header
4137 name: X-API-Key
4138 required: false
4139 schema:
4140 type: string
4141 responses:
4142 "401":
4143 $ref: "#/components/responses/Unauthorized"
4144 "200":
4145 content:
4146 application/json:
4147 examples:
4148 response:
4149 value:
4150 - message: "EF1711500458: removed"
4151 priority: info
4152 program: postfix/qmgr
4153 time: "1569937433"
4154 description: OK
4155 headers: {}
4156 tags:
4157 - Logs
4158 description: >-
4159 This Api endpoint lists all Postfix logs.
4160
4161 Tip: You can limit how many logs you want to get by using `/<count>` at
4162 the end of the api url.
4163 operationId: Get Postfix logs
4164 summary: Get Postfix logs
4165 "/api/v1/get/logs/ratelimited/{count}":
4166 get:
4167 parameters:
4168 - description: Number of logs to return
4169 in: path
4170 name: count
4171 required: true
4172 schema:
4173 type: number
4174 - description: e.g. api-key-string
4175 example: api-key-string
4176 in: header
4177 name: X-API-Key
4178 required: false
4179 schema:
4180 type: string
4181 responses:
4182 "401":
4183 $ref: "#/components/responses/Unauthorized"
4184 "200":
4185 content:
4186 application/json:
4187 examples:
4188 response:
4189 value:
4190 - from: awesome@mailcow.email
4191 header_from: '"Awesome" <awesome@mailcow.email>'
4192 header_subject: Mailcow is amazing
4193 ip: 172.22.1.248
4194 message_id: 6a-5d892500-7-240abd80@90879116
4195 qid: E3CF91500458
4196 rcpt: hello@mailcow.email
4197 rl_hash: RLsdz3tuabozgd4oacbdh8kc78
4198 rl_info: mailcow(RLsdz3tuabozgd4oacbdh8kc78)
4199 rl_name: mailcow
4200 time: 1569269003
4201 user: awesome@mailcow.email
4202 description: OK
4203 headers: {}
4204 tags:
4205 - Logs
4206 description: >-
4207 This Api endpoint lists all Ratelimit logs.
4208
4209 Tip: You can limit how many logs you want to get by using `/<count>` at
4210 the end of the api url.
4211 operationId: Get Ratelimit logs
4212 summary: Get Ratelimit logs
4213 "/api/v1/get/logs/rspamd-history/{count}":
4214 get:
4215 parameters:
4216 - description: Number of logs to return
4217 in: path
4218 name: count
4219 required: true
4220 schema:
4221 type: number
4222 - description: e.g. api-key-string
4223 example: api-key-string
4224 in: header
4225 name: X-API-Key
4226 required: false
4227 schema:
4228 type: string
4229 responses:
4230 "401":
4231 $ref: "#/components/responses/Unauthorized"
4232 "200":
4233 description: OK
4234 headers: {}
4235 tags:
4236 - Logs
4237 description: >-
4238 This Api endpoint lists all Rspamd logs.
4239
4240 Tip: You can limit how many logs you want to get by using `/<count>` at
4241 the end of the api url.
4242 operationId: Get Rspamd logs
4243 summary: Get Rspamd logs
4244 "/api/v1/get/logs/sogo/{count}":
4245 get:
4246 parameters:
4247 - description: Number of logs to return
4248 in: path
4249 name: count
4250 required: true
4251 schema:
4252 type: number
4253 - description: e.g. api-key-string
4254 example: api-key-string
4255 in: header
4256 name: X-API-Key
4257 required: false
4258 schema:
4259 type: string
4260 responses:
4261 "401":
4262 $ref: "#/components/responses/Unauthorized"
4263 "200":
4264 content:
4265 application/json:
4266 examples:
4267 response:
4268 value:
4269 - message: >-
4270 [109]:
4271 mailcowdockerized_watchdog-mailcow_1.mailcowdockerized_mailcow-network
4272 "GET /SOGo.index/ HTTP/1.1" 200 2531/0 0.005 - - 0
4273 priority: notice
4274 program: sogod
4275 time: "1569938874"
4276 description: OK
4277 headers: {}
4278 tags:
4279 - Logs
4280 description: >-
4281 This Api endpoint lists all SOGo logs.
4282
4283 Tip: You can limit how many logs you want to get by using `/<count>` at
4284 the end of the api url.
4285 operationId: Get SOGo logs
4286 summary: Get SOGo logs
4287 "/api/v1/get/logs/watchdog/{count}":
4288 get:
4289 parameters:
4290 - description: Number of logs to return
4291 in: path
4292 name: count
4293 required: true
4294 schema:
4295 type: number
4296 - description: e.g. api-key-string
4297 example: api-key-string
4298 in: header
4299 name: X-API-Key
4300 required: false
4301 schema:
4302 type: string
4303 responses:
4304 "401":
4305 $ref: "#/components/responses/Unauthorized"
4306 "200":
4307 content:
4308 application/json:
4309 examples:
4310 response:
4311 value:
4312 - hpdiff: "0"
4313 hpnow: "1"
4314 hptotal: "1"
4315 lvl: "100"
4316 service: Fail2ban
4317 time: "1569938958"
4318 - hpdiff: "0"
4319 hpnow: "5"
4320 hptotal: "5"
4321 lvl: "100"
4322 service: Rspamd
4323 time: "1569938956"
4324 description: OK
4325 headers: {}
4326 tags:
4327 - Logs
4328 description: >-
4329 This Api endpoint lists all Watchdog logs.
4330
4331 Tip: You can limit how many logs you want to get by using `/<count>` at
4332 the end of the api url.
4333 operationId: Get Watchdog logs
4334 summary: Get Watchdog logs
4335 "/api/v1/get/mailbox/{id}":
4336 get:
4337 parameters:
4338 - description: id of entry you want to get
4339 example: all
4340 in: path
4341 name: id
4342 required: true
4343 schema:
4344 enum:
4345 - all
4346 - user@domain.tld
4347 type: string
4348 - description: e.g. api-key-string
4349 example: api-key-string
4350 in: header
4351 name: X-API-Key
4352 required: false
4353 schema:
4354 type: string
4355 responses:
4356 "401":
4357 $ref: "#/components/responses/Unauthorized"
4358 "200":
4359 content:
4360 application/json:
4361 examples:
4362 response:
4363 value:
4364 - active: "1"
4365 attributes:
4366 force_pw_update: "0"
4367 mailbox_format: "maildir:"
4368 quarantine_notification: never
4369 sogo_access: "1"
4370 tls_enforce_in: "0"
4371 tls_enforce_out: "0"
4372 domain: doman3.tld
4373 is_relayed: 0
4374 local_part: info
4375 max_new_quota: 10737418240
4376 messages: 0
4377 name: Full name
4378 percent_class: success
4379 percent_in_use: 0
4380 quota: 3221225472
4381 quota_used: 0
4382 rl: false
4383 spam_aliases: 0
4384 username: info@doman3.tld
4385 description: OK
4386 headers: {}
4387 tags:
4388 - Mailboxes
4389 description: You can list all mailboxes existing in system.
4390 operationId: Get mailboxes
4391 summary: Get mailboxes
4392 /api/v1/get/mailq/all:
4393 get:
4394 responses:
4395 "401":
4396 $ref: "#/components/responses/Unauthorized"
4397 "200":
4398 content:
4399 application/json:
4400 examples:
4401 response:
4402 value:
4403 - arrival_time: 1570091234
4404 message_size: 1848
4405 queue_id: B98C6260CA1
4406 queue_name: incoming
4407 recipients:
4408 - recipient@awesomecow.tld
4409 sender: sender@mailcow.tld
4410 description: OK
4411 headers: {}
4412 tags:
4413 - Queue Manager
4414 description: Get the current mail queue and everything it contains.
4415 operationId: Get Queue
4416 summary: Get Queue
4417 "/api/v1/get/oauth2-client/{id}":
4418 get:
4419 parameters:
4420 - description: id of entry you want to get
4421 example: all
4422 in: path
4423 name: id
4424 required: true
4425 schema:
4426 enum:
4427 - all
4428 - "1"
4429 - "2"
4430 - "5"
4431 - "10"
4432 type: string
4433 - description: e.g. api-key-string
4434 example: api-key-string
4435 in: header
4436 name: X-API-Key
4437 required: false
4438 schema:
4439 type: string
4440 responses:
4441 "401":
4442 $ref: "#/components/responses/Unauthorized"
4443 "200":
4444 content:
4445 application/json:
4446 examples:
4447 response:
4448 value:
4449 - client_id: 17c76aaa88c0
4450 client_secret: 73fc668a88147e32a31ff80c
4451 grant_types: null
4452 id: 1
4453 redirect_uri: "https://mailcow.tld"
4454 scope: profile
4455 user_id: null
4456 description: OK
4457 headers: {}
4458 tags:
4459 - oAuth Clients
4460 description: Using this endpoint you can get all oAuth clients.
4461 operationId: Get oAuth Clients
4462 summary: Get oAuth Clients
4463 "/api/v1/get/policy_bl_domain/{domain}":
4464 get:
4465 parameters:
4466 - description: name of domain
4467 in: path
4468 name: domain
4469 required: true
4470 schema:
4471 type: string
4472 - description: e.g. api-key-string
4473 example: api-key-string
4474 in: header
4475 name: X-API-Key
4476 required: false
4477 schema:
4478 type: string
4479 responses:
4480 "401":
4481 $ref: "#/components/responses/Unauthorized"
4482 "200":
4483 content:
4484 application/json:
4485 examples:
4486 response:
4487 value:
4488 - object: domain.tld
4489 prefid: 2
4490 value: "*@baddomain.tld"
4491 description: OK
4492 headers: {}
4493 tags:
4494 - Domain antispam policies
4495 description: You can list all blacklist policies per domain.
4496 operationId: List blacklist domain policy
4497 summary: List blacklist domain policy
4498 "/api/v1/get/policy_wl_domain/{domain}":
4499 get:
4500 parameters:
4501 - description: name of domain
4502 in: path
4503 name: domain
4504 required: true
4505 schema:
4506 type: string
4507 - description: e.g. api-key-string
4508 example: api-key-string
4509 in: header
4510 name: X-API-Key
4511 required: false
4512 schema:
4513 type: string
4514 responses:
4515 "401":
4516 $ref: "#/components/responses/Unauthorized"
4517 "200":
4518 content:
4519 application/json:
4520 examples:
4521 response:
4522 value:
4523 - object: domain.tld
4524 prefid: 1
4525 value: "*@gooddomain.tld"
4526 description: OK
4527 headers: {}
4528 tags:
4529 - Domain antispam policies
4530 description: You can list all whitelist policies per domain.
4531 operationId: List whitelist domain policy
4532 summary: List whitelist domain policy
4533 /api/v1/get/quarantine/all:
4534 get:
4535 responses:
4536 "401":
4537 $ref: "#/components/responses/Unauthorized"
4538 "200":
4539 content:
4540 application/json:
4541 examples:
4542 response:
4543 value:
4544 created: 1572688831
4545 id: 33
4546 notified: 1
4547 qid: 8224615004C1
4548 rcpt: admin@domain.tld
4549 score: 15.48
4550 sender: bounces@send.domain.tld
4551 subject: mailcow is awesome
4552 virus_flag: 0
4553 description: OK
4554 headers: {}
4555 tags:
4556 - Quarantine
4557 description: Get all mails that are currently in Quarantine.
4558 operationId: Get mails in Quarantine
4559 summary: Get mails in Quarantine
4560 "/api/v1/get/recipient_map/{id}":
4561 get:
4562 parameters:
4563 - description: id of entry you want to get
4564 example: all
4565 in: path
4566 name: id
4567 required: true
4568 schema:
4569 enum:
4570 - all
4571 - "1"
4572 - "2"
4573 - "5"
4574 - "10"
4575 type: string
4576 - description: e.g. api-key-string
4577 example: api-key-string
4578 in: header
4579 name: X-API-Key
4580 required: false
4581 schema:
4582 type: string
4583 responses:
4584 "401":
4585 $ref: "#/components/responses/Unauthorized"
4586 "200":
4587 content:
4588 application/json:
4589 examples:
4590 response:
4591 value:
4592 - active: "1"
4593 created: "2019-10-02 22:06:29"
4594 id: 3
4595 modified: null
4596 recipient_map_new: target@mailcow.tld
4597 recipient_map_old: recipient@mailcow.tld
4598 description: OK
4599 headers: {}
4600 tags:
4601 - Address Rewriting
4602 description: Using this endpoint you can get all recipient maps.
4603 operationId: Get Recipient Map
4604 summary: Get Recipient Map
4605 "/api/v1/get/relayhost/{id}":
4606 get:
4607 parameters:
4608 - description: id of entry you want to get
4609 example: all
4610 in: path
4611 name: id
4612 required: true
4613 schema:
4614 enum:
4615 - all
4616 - "1"
4617 - "2"
4618 - "5"
4619 - "10"
4620 type: string
4621 - description: e.g. api-key-string
4622 example: api-key-string
4623 in: header
4624 name: X-API-Key
4625 required: false
4626 schema:
4627 type: string
4628 responses:
4629 "401":
4630 $ref: "#/components/responses/Unauthorized"
4631 "200":
4632 content:
4633 application/json:
4634 examples:
4635 response:
4636 value:
4637 - active: "1"
4638 hostname: "mailcow.tld:25"
4639 id: 1
4640 password: supersecurepassword
4641 password_short: tes...
4642 used_by_domains: ""
4643 username: testuser
4644 description: OK
4645 headers: {}
4646 tags:
4647 - Routing
4648 description: Using this endpoint you can get all Sender-Dependent Transports.
4649 operationId: Get Sender-Dependent Transports
4650 summary: Get Sender-Dependent Transports
4651 /api/v1/get/resource/all:
4652 get:
4653 responses:
4654 "401":
4655 $ref: "#/components/responses/Unauthorized"
4656 "200":
4657 content:
4658 application/json:
4659 examples:
4660 response:
4661 value:
4662 - active: "1"
4663 description: test
4664 domain: mailcow.tld
4665 kind: location
4666 local_part: test
4667 multiple_bookings: 0
4668 name: test@mailcow.tld
4669 description: OK
4670 headers: {}
4671 tags:
4672 - Resources
4673 description: Using this endpoint you can get all Resources.
4674 operationId: Get Resources
4675 summary: Get Resources
4676 "/api/v1/get/rl-mbox/{mailbox}":
4677 get:
4678 parameters:
4679 - description: name of mailbox or all
4680 in: path
4681 name: mailbox
4682 required: true
4683 schema:
4684 type: string
4685 - description: e.g. api-key-string
4686 example: api-key-string
4687 in: header
4688 name: X-API-Key
4689 required: false
4690 schema:
4691 type: string
4692 responses:
4693 "401":
4694 $ref: "#/components/responses/Unauthorized"
4695 "200":
4696 content:
4697 application/json:
4698 examples:
4699 response:
4700 value:
4701 - frame: s
4702 mailbox: leon@mailcow.tld
4703 value: "5"
4704 - frame: s
4705 mailbox: lisa@mailcow.tld
4706 value: "3"
4707 description: OK
4708 headers: {}
4709 tags:
4710 - Ratelimits
4711 description: >-
4712 Using this endpoint you can get the ratelimits for a certain mailbox.
4713 You can use all for all mailboxes.
4714 operationId: Get mailbox ratelimits
4715 summary: Get mailbox ratelimits
4716 "/api/v1/get/rl-domain/{domain}":
4717 get:
4718 parameters:
4719 - description: name of domain or all
4720 in: path
4721 name: domain
4722 required: true
4723 schema:
4724 type: string
4725 - description: e.g. api-key-string
4726 example: api-key-string
4727 in: header
4728 name: X-API-Key
4729 required: false
4730 schema:
4731 type: string
4732 responses:
4733 "401":
4734 $ref: "#/components/responses/Unauthorized"
4735 "200":
4736 content:
4737 application/json:
4738 examples:
4739 response:
4740 value:
4741 - frame: s
4742 domain: domain.tld
4743 value: "5"
4744 - frame: s
4745 mailbox: domain2.tld
4746 value: "3"
4747 description: OK
4748 headers: {}
4749 tags:
4750 - Ratelimits
4751 description: >-
4752 Using this endpoint you can get the ratelimits for a certain domains.
4753 You can use all for all domain.
4754 operationId: Get domain ratelimits
4755 summary: Get domain ratelimits
4756 /api/v1/edit/rl-mbox/:
4757 post:
4758 responses:
4759 "401":
4760 $ref: "#/components/responses/Unauthorized"
4761 "200":
4762 content:
4763 application/json:
4764 examples:
4765 response:
4766 value:
4767 - type: success
4768 log:
4769 - ratelimit
4770 - edit
4771 - mailbox
4772 - object:
4773 - info@domain.tld
4774 rl_value: "10"
4775 rl_frame: h
4776 msg:
4777 - rl_saved
4778 - info@domain.tld
4779 schema:
4780 properties:
4781 log:
4782 description: contains request object
4783 items: {}
4784 type: array
4785 msg:
4786 items: {}
4787 type: array
4788 type:
4789 enum:
4790 - success
4791 - danger
4792 - error
4793 type: string
4794 type: object
4795 description: OK
4796 headers: {}
4797 tags:
4798 - Ratelimits
4799 description: >-
4800 Using this endpoint you can edit the ratelimits for a certain mailbox.
4801 operationId: Edit mailbox ratelimits
4802 requestBody:
4803 content:
4804 application/json:
4805 schema:
4806 example:
4807 attr:
4808 rl_vlaue: "10"
4809 rl_frame: "h"
4810 items:
4811 - info@domain.tld
4812 properties:
4813 attr:
4814 properties:
4815 rl_frame:
4816 description: contains the frame for the ratelimit h,s,m
4817 type: string
4818 rl_vlaue:
4819 description: contains the rate for the ratelimit 10,20,50,1
4820 type: number
4821 type: object
4822 items:
4823 description: contains list of mailboxes you want to edit the ratelimit of
4824 type: object
4825 type: object
4826 summary: Edit mailbox ratelimits
4827 /api/v1/edit/rl-domain/:
4828 post:
4829 responses:
4830 "401":
4831 $ref: "#/components/responses/Unauthorized"
4832 "200":
4833 content:
4834 application/json:
4835 examples:
4836 response:
4837 value:
4838 - type: success
4839 - log:
4840 - ratelimit
4841 - edit
4842 - domain
4843 - object:
4844 - domain.tld
4845 rl_value: "50"
4846 rl_frame: "h"
4847 msg:
4848 - rl_saved
4849 - domain.tld
4850 schema:
4851 properties:
4852 log:
4853 description: contains request object
4854 items: {}
4855 type: array
4856 msg:
4857 items: {}
4858 type: array
4859 type:
4860 enum:
4861 - success
4862 - danger
4863 - error
4864 type: string
4865 type: object
4866 description: OK
4867 headers: {}
4868 tags:
4869 - Ratelimits
4870 description: >-
4871 Using this endpoint you can edit the ratelimits for a certain domains.
4872 operationId: Edit domain ratelimits
4873 requestBody:
4874 content:
4875 application/json:
4876 schema:
4877 example:
4878 attr:
4879 rl_vlaue: "10"
4880 rl_frame: "h"
4881 items:
4882 - domain.tld
4883 properties:
4884 attr:
4885 properties:
4886 rl_frame:
4887 description: contains the frame for the ratelimit h,s,m
4888 type: string
4889 rl_vlaue:
4890 description: contains the rate for the ratelimit 10,20,50,1
4891 type: number
4892 type: object
4893 items:
4894 description: contains list of domains you want to edit the ratelimit of
4895 type: object
4896 type: object
4897 summary: Edit domain ratelimits
4898 /api/v1/get/status/containers:
4899 get:
4900 responses:
4901 "401":
4902 $ref: "#/components/responses/Unauthorized"
4903 "200":
4904 content:
4905 application/json:
4906 examples:
4907 response:
4908 value:
4909 acme-mailcow:
4910 container: acme-mailcow
4911 image: "mailcow/acme:1.63"
4912 started_at: "2019-12-22T21:00:08.270660275Z"
4913 state: running
4914 type: info
4915 clamd-mailcow:
4916 container: clamd-mailcow
4917 image: "mailcow/clamd:1.35"
4918 started_at: "2019-12-22T21:00:01.622856172Z"
4919 state: running
4920 type: info
4921 dockerapi-mailcow:
4922 container: dockerapi-mailcow
4923 image: "mailcow/dockerapi:1.36"
4924 started_at: "2019-12-22T20:59:59.984797808Z"
4925 state: running
4926 type: info
4927 dovecot-mailcow:
4928 container: dovecot-mailcow
4929 image: "mailcow/dovecot:1.104"
4930 started_at: "2019-12-22T21:00:08.988680259Z"
4931 state: running
4932 type: info
4933 ipv6nat-mailcow:
4934 container: ipv6nat-mailcow
4935 image: robbertkl/ipv6nat
4936 started_at: "2019-12-22T21:06:37.273225445Z"
4937 state: running
4938 type: info
4939 memcached-mailcow:
4940 container: memcached-mailcow
4941 image: "memcached:alpine"
4942 started_at: "2019-12-22T20:59:58.0907785Z"
4943 state: running
4944 type: info
4945 mysql-mailcow:
4946 container: mysql-mailcow
4947 image: "mariadb:10.3"
4948 started_at: "2019-12-22T21:00:02.201937528Z"
4949 state: running
4950 type: info
4951 netfilter-mailcow:
4952 container: netfilter-mailcow
4953 image: "mailcow/netfilter:1.31"
4954 started_at: "2019-12-22T21:00:09.851559297Z"
4955 state: running
4956 type: info
4957 nginx-mailcow:
4958 container: nginx-mailcow
4959 image: "nginx:mainline-alpine"
4960 started_at: "2019-12-22T21:00:12.9843038Z"
4961 state: running
4962 type: info
4963 olefy-mailcow:
4964 container: olefy-mailcow
4965 image: "mailcow/olefy:1.2"
4966 started_at: "2019-12-22T20:59:59.676259274Z"
4967 state: running
4968 type: info
4969 php-fpm-mailcow:
4970 container: php-fpm-mailcow
4971 image: "mailcow/phpfpm:1.55"
4972 started_at: "2019-12-22T21:00:00.955808957Z"
4973 state: running
4974 type: info
4975 postfix-mailcow:
4976 container: postfix-mailcow
4977 image: "mailcow/postfix:1.44"
4978 started_at: "2019-12-22T21:00:07.186717617Z"
4979 state: running
4980 type: info
4981 redis-mailcow:
4982 container: redis-mailcow
4983 image: "redis:5-alpine"
4984 started_at: "2019-12-22T20:59:56.827166834Z"
4985 state: running
4986 type: info
4987 rspamd-mailcow:
4988 container: rspamd-mailcow
4989 image: "mailcow/rspamd:1.56"
4990 started_at: "2019-12-22T21:00:12.456075355Z"
4991 state: running
4992 type: info
4993 sogo-mailcow:
4994 container: sogo-mailcow
4995 image: "mailcow/sogo:1.65"
4996 started_at: "2019-12-22T20:59:58.382274592Z"
4997 state: running
4998 type: info
4999 solr-mailcow:
5000 container: solr-mailcow
5001 image: "mailcow/solr:1.7"
5002 started_at: "2019-12-22T20:59:59.635413798Z"
5003 state: running
5004 type: info
5005 unbound-mailcow:
5006 container: unbound-mailcow
5007 image: "mailcow/unbound:1.10"
5008 started_at: "2019-12-22T20:59:58.760595825Z"
5009 state: running
5010 type: info
5011 watchdog-mailcow:
5012 container: watchdog-mailcow
5013 image: "mailcow/watchdog:1.65"
5014 started_at: "2019-12-22T20:59:56.028660382Z"
5015 state: running
5016 type: info
5017 description: OK
5018 headers: {}
5019 tags:
5020 - Status
5021 description: >-
5022 Using this endpoint you can get the status of all containers and when
5023 hey where started and a few other details.
5024 operationId: Get container status
5025 summary: Get container status
5026 /api/v1/get/status/solr:
5027 get:
5028 responses:
5029 "401":
5030 $ref: "#/components/responses/Unauthorized"
5031 "200":
5032 content:
5033 application/json:
5034 examples:
5035 response:
5036 value:
5037 solr_documents: null
5038 solr_enabled: false
5039 solr_size: null
5040 type: info
5041 description: OK
5042 headers: {}
5043 tags:
5044 - Status
5045 description: >-
5046 Using this endpoint you can get the status of all containers and when
5047 hey where started and a few other details.
5048 operationId: Get solr status
5049 summary: Get solr status
5050 /api/v1/get/status/vmail:
5051 get:
5052 responses:
5053 "401":
5054 $ref: "#/components/responses/Unauthorized"
5055 "200":
5056 content:
5057 application/json:
5058 examples:
5059 response:
5060 value:
5061 disk: /dev/mapper/mail--vg-root
5062 total: 41G
5063 type: info
5064 used: 11G
5065 used_percent: 28%
5066 description: OK
5067 headers: {}
5068 tags:
5069 - Status
5070 description: >-
5071 Using this endpoint you can get the status of the vmail and the amount
5072 of used storage.
5073 operationId: Get vmail status
5074 summary: Get vmail status
5075 /api/v1/get/syncjobs/all/no_log:
5076 get:
5077 responses:
5078 "401":
5079 $ref: "#/components/responses/Unauthorized"
5080 "200":
5081 content:
5082 application/json:
5083 examples:
5084 response:
5085 value:
5086 - active: "1"
5087 authmd51: 0
5088 authmech1: PLAIN
5089 automap: 1
5090 created: "2019-05-22 11:37:25"
5091 custom_params: ""
5092 delete1: 0
5093 delete2: 0
5094 delete2duplicates: 1
5095 domain2: ""
5096 enc1: TLS
5097 exclude: (?i)spam|(?i)junk
5098 host1: imap.server.tld
5099 id: 1
5100 is_running: 0
5101 last_run: "2019-05-22 11:40:02"
5102 log: ""
5103 maxage: 0
5104 maxbytespersecond: "0"
5105 mins_interval: "20"
5106 modified: "2019-05-22 11:40:02"
5107 port1: 993
5108 regextrans2: ""
5109 skipcrossduplicates: 0
5110 subfolder2: External
5111 subscribeall: 1
5112 timeout1: 600
5113 timeout2: 600
5114 user1: username
5115 user2: mailbox@domain.tld
5116 description: OK
5117 headers: {}
5118 tags:
5119 - Sync jobs
5120 description: You can list all syn jobs existing in system.
5121 operationId: Get sync jobs
5122 summary: Get sync jobs
5123 "/api/v1/get/tls-policy-map/{id}":
5124 get:
5125 parameters:
5126 - description: id of entry you want to get
5127 example: all
5128 in: path
5129 name: id
5130 required: true
5131 schema:
5132 enum:
5133 - all
5134 - "1"
5135 - "2"
5136 - "5"
5137 - "10"
5138 type: string
5139 - description: e.g. api-key-string
5140 example: api-key-string
5141 in: header
5142 name: X-API-Key
5143 required: false
5144 schema:
5145 type: string
5146 responses:
5147 "401":
5148 $ref: "#/components/responses/Unauthorized"
5149 "200":
5150 content:
5151 application/json:
5152 examples:
5153 response:
5154 value:
5155 - parameters: ""
5156 active: "1"
5157 created: "2019-10-03 08:42:12"
5158 dest: mailcow.tld
5159 id: 1
5160 modified: null
5161 policy: encrypt
5162 description: OK
5163 headers: {}
5164 tags:
5165 - Outgoing TLS Policy Map Overrides
5166 description: Using this endpoint you can get all TLS policy map override maps.
5167 operationId: Get TLS Policy Map
5168 summary: Get TLS Policy Map
5169 "/api/v1/get/transport/{id}":
5170 get:
5171 parameters:
5172 - description: id of entry you want to get
5173 example: all
5174 in: path
5175 name: id
5176 required: true
5177 schema:
5178 enum:
5179 - all
5180 - "1"
5181 - "2"
5182 - "5"
5183 - "10"
5184 type: string
5185 - description: e.g. api-key-string
5186 example: api-key-string
5187 in: header
5188 name: X-API-Key
5189 required: false
5190 schema:
5191 type: string
5192 responses:
5193 "401":
5194 $ref: "#/components/responses/Unauthorized"
5195 "200":
5196 content:
5197 application/json:
5198 examples:
5199 response:
5200 value:
5201 - active: "1"
5202 destination: example.org
5203 id: 1
5204 lookup_mx: "0"
5205 nexthop: "host:25"
5206 password: supersecurepw
5207 password_short: sup...
5208 username: testuser
5209 description: OK
5210 headers: {}
5211 tags:
5212 - Routing
5213 description: Using this endpoint you can get all Transport Maps.
5214 operationId: Get Transport Maps
5215 summary: Get Transport Maps
5216 /api/v1/edit/spam-score/:
5217 post:
5218 responses:
5219 "401":
5220 $ref: "#/components/responses/Unauthorized"
5221 "200":
5222 content:
5223 application/json:
5224 examples:
5225 response:
5226 value:
5227 - type: success
5228 log:
5229 - mailbox
5230 - edit
5231 - spam_score
5232 - username:
5233 - info@domain.tld
5234 spam_score: "8,15"
5235 msg:
5236 - mailbox_modified
5237 - info@domain.tld
5238 schema:
5239 properties:
5240 log:
5241 description: contains request object
5242 items: {}
5243 type: array
5244 msg:
5245 items: {}
5246 type: array
5247 type:
5248 enum:
5249 - success
5250 - danger
5251 - error
5252 type: string
5253 type: object
5254 description: OK
5255 headers: {}
5256 tags:
5257 - Mailboxes
5258 description: >-
5259 Using this endpoint you can edit the spam filter score for a certain mailbox.
5260 operationId: Edit mailbox spam filter score
5261 requestBody:
5262 content:
5263 application/json:
5264 schema:
5265 example:
5266 - items:
5267 - info@domain.tld
5268 attr:
5269 spam_score: "8,15"
5270 summary: Edit mailbox spam filter score
5271
5272tags:
5273 - name: Domains
5274 description: You can create antispam whitelist and blacklist policies
5275 - name: Domain antispam policies
5276 description: You can edit the Domain Antispam policies
5277 - name: Mailboxes
5278 description: You can manage mailboxes
5279 - name: Aliases
5280 description: You can manage aliases
5281 - name: Sync jobs
5282 description: Using Syncjobs you can sync your mails with other email servers
5283 - name: Fordwarding Hosts
5284 description: Forwarding Hosts enable you to send mail using a relay
5285 - name: Logs
5286 description: Get all mailcow system logs
5287 - name: Queue Manager
5288 description: Manage the postfix mail queue
5289 - name: Quarantine
5290 description: Check what emails went to quarantine
5291 - name: Fail2Ban
5292 description: Manage the Netfilter fail2ban options
5293 - name: DKIM
5294 description: Manage DKIM keys
5295 - name: Domain admin
5296 description: Create or udpdate domain admin users
5297 - name: Address Rewriting
5298 description: Create BCC maps or recipient maps
5299 - name: Outgoing TLS Policy Map Overrides
5300 description: Force global TLS policys
5301 - name: oAuth Clients
5302 description: Use mailcow as a oAuth server
5303 - name: Routing
5304 description: Define your own email routes
5305 - name: Resources
5306 description: Manage ressources
5307 - name: App Passwords
5308 description: Create mailbox app passwords
5309 - name: Status
5310 description: Get the status of your cow
5311 - name: Ratelimits
5312 description: Edit domain ratelimits