openapi.yaml 172 KB

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