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