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