openapi.yaml 165 KB

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