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