openapi.yaml 165 KB

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