openapi.yaml 174 KB

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