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