openapi.yaml 164 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211
  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/{mailbox}":
  3510. get:
  3511. parameters:
  3512. - description: mailbox of entry you want to get
  3513. example: hello@mailcow.email
  3514. in: path
  3515. name: mailbox
  3516. required: true
  3517. schema:
  3518. enum:
  3519. - hello@mailcow.email
  3520. type: string
  3521. - description: e.g. api-key-string
  3522. example: api-key-string
  3523. in: header
  3524. name: X-API-Key
  3525. required: false
  3526. schema:
  3527. type: string
  3528. responses:
  3529. "401":
  3530. $ref: "#/components/responses/Unauthorized"
  3531. "200":
  3532. content:
  3533. application/json:
  3534. examples:
  3535. response:
  3536. value:
  3537. - active: "1"
  3538. created: "2019-12-21 16:04:55"
  3539. domain: mailcow.email
  3540. id: 2
  3541. mailbox: hello@mailcow.email
  3542. modified: null
  3543. name: emclient
  3544. description: OK
  3545. headers: {}
  3546. tags:
  3547. - App Passwords
  3548. description: >-
  3549. Using this endpoint you can get all app passwords from a specific
  3550. mailbox.
  3551. operationId: Get App Password
  3552. summary: Get App Password
  3553. "/api/v1/get/bcc/{id}":
  3554. get:
  3555. parameters:
  3556. - description: id of entry you want to get
  3557. example: all
  3558. in: path
  3559. name: id
  3560. required: true
  3561. schema:
  3562. enum:
  3563. - all
  3564. - "1"
  3565. - "2"
  3566. - "5"
  3567. - "10"
  3568. type: string
  3569. - description: e.g. api-key-string
  3570. example: api-key-string
  3571. in: header
  3572. name: X-API-Key
  3573. required: false
  3574. schema:
  3575. type: string
  3576. responses:
  3577. "401":
  3578. $ref: "#/components/responses/Unauthorized"
  3579. "200":
  3580. content:
  3581. application/json:
  3582. examples:
  3583. response:
  3584. value:
  3585. - active: "1"
  3586. bcc_dest: bcc@awesomecow.tld
  3587. created: "2019-10-02 21:44:34"
  3588. domain: mailcow.tld
  3589. id: 3
  3590. local_dest: "@mailcow.tld"
  3591. modified: null
  3592. type: sender
  3593. description: OK
  3594. headers: {}
  3595. tags:
  3596. - Address Rewriting
  3597. description: Using this endpoint you can get all BCC maps.
  3598. operationId: Get BCC Map
  3599. summary: Get BCC Map
  3600. "/api/v1/get/dkim/{domain}":
  3601. get:
  3602. parameters:
  3603. - description: name of domain
  3604. in: path
  3605. name: domain
  3606. required: true
  3607. schema:
  3608. type: string
  3609. - description: e.g. api-key-string
  3610. example: api-key-string
  3611. in: header
  3612. name: X-API-Key
  3613. required: false
  3614. schema:
  3615. type: string
  3616. responses:
  3617. "401":
  3618. $ref: "#/components/responses/Unauthorized"
  3619. "200":
  3620. content:
  3621. application/json:
  3622. examples:
  3623. response:
  3624. value:
  3625. dkim_selector: dkim
  3626. dkim_txt: >-
  3627. v=DKIM1;k=rsa;t=s;s=email;p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA21tUSjyasQy/hJmVjPnlRGfzx6TPhYj8mXY9DVOzSAE64Gddw/GnE/GcCR6WXNT23u9q4zPnz1IPoNt5kFOps8vg/iNqrcH++494noaZuYyFPPFnebkfryO4EvEyxC/c66qts+gnOUml+M8uv5WObBJld2gG12jLwFM0263J/N6J8LuUsaXOB2uCIfx8Nf4zjuJ6Ieez2uyHNK5dXjDLfKA4mTr+EEK6W6e34M4KN1liWM6r9Oy5S1FlLrD42VpURxxBZtBiEtaJPEKSQuk6GQz8ihu7W20Yr53tyCdaORu8dhxXVUWVf+GjuuMEdAmQCjYkarXdYCrt56Psw703kwIDAQAB
  3628. length: "2048"
  3629. privkey: ""
  3630. pubkey: >-
  3631. MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA21tUSjyasQy/hJmVjPnlRGfzx6TPhYj8mXY9DVOzSAE64Gddw/GnE/GcCR6WXNT23u9q4zPnz1IPoNt5kFOps8vg/iNqrcH++494noaZuYyFPPFnebkfryO4EvEyxC/c66qts+gnOUml+M8uv5WObBJld2gG12jLwFM0263J/N6J8LuUsaXOB2uCIfx8Nf4zjuJ6Ieez2uyHNK5dXjDLfKA4mTr+EEK6W6e34M4KN1liWM6r9Oy5S1FlLrD42VpURxxBZtBiEtaJPEKSQuk6GQz8ihu7W20Yr53tyCdaORu8dhxXVUWVf+GjuuMEdAmQCjYkarXdYCrt56Psw703kwIDAQAB
  3632. description: OK
  3633. headers: {}
  3634. tags:
  3635. - DKIM
  3636. description: >-
  3637. Using this endpoint you can get the DKIM public key for a specific
  3638. domain.
  3639. operationId: Get DKIM Key
  3640. summary: Get DKIM Key
  3641. /api/v1/get/domain-admin/all:
  3642. get:
  3643. responses:
  3644. "401":
  3645. $ref: "#/components/responses/Unauthorized"
  3646. "200":
  3647. content:
  3648. application/json:
  3649. examples:
  3650. response:
  3651. value:
  3652. - active: "1"
  3653. created: "2019-10-02 10:29:41"
  3654. selected_domains:
  3655. - mailcow.tld
  3656. tfa_active: "0"
  3657. unselected_domains:
  3658. - awesomemailcow.de
  3659. - mailcowisgreat.de
  3660. username: testadmin
  3661. description: OK
  3662. headers: {}
  3663. tags:
  3664. - Domain admin
  3665. description: ""
  3666. operationId: Get Domain Admins
  3667. summary: Get Domain Admins
  3668. "/api/v1/get/domain/{id}":
  3669. get:
  3670. parameters:
  3671. - description: id of entry you want to get
  3672. example: all
  3673. in: path
  3674. name: id
  3675. required: true
  3676. schema:
  3677. enum:
  3678. - all
  3679. - mailcow.tld
  3680. type: string
  3681. - description: e.g. api-key-string
  3682. example: api-key-string
  3683. in: header
  3684. name: X-API-Key
  3685. required: false
  3686. schema:
  3687. type: string
  3688. responses:
  3689. "401":
  3690. $ref: "#/components/responses/Unauthorized"
  3691. "200":
  3692. content:
  3693. application/json:
  3694. examples:
  3695. response:
  3696. value:
  3697. - active: "1"
  3698. aliases_in_domain: 0
  3699. aliases_left: 400
  3700. backupmx: "0"
  3701. bytes_total: "5076666944"
  3702. def_new_mailbox_quota: 3221225472
  3703. def_quota_for_mbox: 3221225472
  3704. description: Some description
  3705. domain_name: domain.tld
  3706. gal: "0"
  3707. max_new_mailbox_quota: 10737418240
  3708. max_num_aliases_for_domain: 400
  3709. max_num_mboxes_for_domain: 10
  3710. max_quota_for_domain: 10737418240
  3711. max_quota_for_mbox: 10737418240
  3712. mboxes_in_domain: 0
  3713. mboxes_left: 10
  3714. msgs_total: "172440"
  3715. quota_used_in_domain: "0"
  3716. relay_all_recipients: "0"
  3717. relayhost: "0"
  3718. rl: false
  3719. - active: "1"
  3720. aliases_in_domain: 0
  3721. aliases_left: 400
  3722. backupmx: "1"
  3723. bytes_total: "5076666944"
  3724. def_new_mailbox_quota: 3221225472
  3725. def_quota_for_mbox: 3221225472
  3726. description: domain description
  3727. domain_name: domain2.tld
  3728. gal: "0"
  3729. max_new_mailbox_quota: 10737418240
  3730. max_num_aliases_for_domain: 400
  3731. max_num_mboxes_for_domain: 10
  3732. max_quota_for_domain: 10737418240
  3733. max_quota_for_mbox: 10737418240
  3734. mboxes_in_domain: 0
  3735. mboxes_left: 10
  3736. msgs_total: "172440"
  3737. quota_used_in_domain: "0"
  3738. relay_all_recipients: "0"
  3739. relayhost: "0"
  3740. rl: false
  3741. description: OK
  3742. headers: {}
  3743. tags:
  3744. - Domains
  3745. description: You can list all domains existing in system.
  3746. operationId: Get domains
  3747. summary: Get domains
  3748. /api/v1/get/fail2ban:
  3749. get:
  3750. responses:
  3751. "401":
  3752. $ref: "#/components/responses/Unauthorized"
  3753. "200":
  3754. content:
  3755. application/json:
  3756. examples:
  3757. response:
  3758. value:
  3759. ban_time: 604800
  3760. blacklist: |-
  3761. 45.82.153.37/32
  3762. 92.118.38.52/32
  3763. max_attempts: 1
  3764. netban_ipv4: 32
  3765. netban_ipv6: 128
  3766. perm_bans:
  3767. - 45.82.153.37/32
  3768. - 92.118.38.52/32
  3769. retry_window: 7200
  3770. whitelist: 1.1.1.1
  3771. description: OK
  3772. headers: {}
  3773. tags:
  3774. - Fail2Ban
  3775. description: Gets the current Fail2Ban configuration.
  3776. operationId: Get Fail2Ban Config
  3777. summary: Get Fail2Ban Config
  3778. /api/v1/get/fwdhost/all:
  3779. get:
  3780. responses:
  3781. "401":
  3782. $ref: "#/components/responses/Unauthorized"
  3783. "200":
  3784. content:
  3785. application/json:
  3786. examples:
  3787. response:
  3788. value:
  3789. - host: 5.1.76.202
  3790. keep_spam: "yes"
  3791. source: hosted.mailcow.de
  3792. - host: "2a00:f820:417::202"
  3793. keep_spam: "yes"
  3794. source: hosted.mailcow.de
  3795. description: OK
  3796. headers: {}
  3797. tags:
  3798. - Fordwarding Hosts
  3799. description: You can list all Forwarding Hosts in your mailcow.
  3800. operationId: Get Forwarding Hosts
  3801. summary: Get Forwarding Hosts
  3802. "/api/v1/get/logs/acme/{count}":
  3803. get:
  3804. parameters:
  3805. - description: Number of logs to return
  3806. in: path
  3807. name: count
  3808. required: true
  3809. schema:
  3810. type: number
  3811. - description: e.g. api-key-string
  3812. example: api-key-string
  3813. in: header
  3814. name: X-API-Key
  3815. required: false
  3816. schema:
  3817. type: string
  3818. responses:
  3819. "401":
  3820. $ref: "#/components/responses/Unauthorized"
  3821. "200":
  3822. content:
  3823. application/json:
  3824. examples:
  3825. response:
  3826. value:
  3827. - message: >-
  3828. Certificate validation done, neither changed nor due for
  3829. renewal, sleeping for another day.
  3830. time: "1569927728"
  3831. description: OK
  3832. headers: {}
  3833. tags:
  3834. - Logs
  3835. description: >-
  3836. This Api endpoint lists all ACME logs from issued Lets Enctypts
  3837. certificates.
  3838. Tip: You can limit how many logs you want to get by using `/<count>` at
  3839. the end of the api url.
  3840. operationId: Get ACME logs
  3841. summary: Get ACME logs
  3842. "/api/v1/get/logs/api/{count}":
  3843. get:
  3844. parameters:
  3845. - description: Number of logs to return
  3846. in: path
  3847. name: count
  3848. required: true
  3849. schema:
  3850. type: number
  3851. - description: e.g. api-key-string
  3852. example: api-key-string
  3853. in: header
  3854. name: X-API-Key
  3855. required: false
  3856. schema:
  3857. type: string
  3858. responses:
  3859. "401":
  3860. $ref: "#/components/responses/Unauthorized"
  3861. "200":
  3862. content:
  3863. application/json:
  3864. examples:
  3865. response:
  3866. value:
  3867. - data: ""
  3868. method: GET
  3869. remote: 1.1.1.1
  3870. time: 1569939001
  3871. uri: /api/v1/get/logs/api/2
  3872. description: OK
  3873. headers: {}
  3874. tags:
  3875. - Logs
  3876. description: >-
  3877. This Api endpoint lists all Api logs.
  3878. Tip: You can limit how many logs you want to get by using `/<count>` at
  3879. the end of the api url.
  3880. operationId: Get Api logs
  3881. summary: Get Api logs
  3882. "/api/v1/get/logs/autodiscover/{count}":
  3883. get:
  3884. parameters:
  3885. - description: Number of logs to return
  3886. in: path
  3887. name: count
  3888. required: true
  3889. schema:
  3890. type: number
  3891. - description: e.g. api-key-string
  3892. example: api-key-string
  3893. in: header
  3894. name: X-API-Key
  3895. required: false
  3896. schema:
  3897. type: string
  3898. responses:
  3899. "401":
  3900. $ref: "#/components/responses/Unauthorized"
  3901. "200":
  3902. content:
  3903. application/json:
  3904. examples:
  3905. response:
  3906. value:
  3907. - service: activesync
  3908. time: 1569684212
  3909. ua: >-
  3910. Microsoft Office/16.0 (Windows NT 6.2; MAPICPL
  3911. 16.0.11328; Pro)
  3912. user: awesome@mailcow.de
  3913. description: OK
  3914. headers: {}
  3915. tags:
  3916. - Logs
  3917. description: >-
  3918. This Api endpoint lists all Autodiscover logs.
  3919. Tip: You can limit how many logs you want to get by using `/<count>` at
  3920. the end of the api url.
  3921. operationId: Get Autodiscover logs
  3922. summary: Get Autodiscover logs
  3923. "/api/v1/get/logs/dovecot/{count}":
  3924. get:
  3925. parameters:
  3926. - description: Number of logs to return
  3927. in: path
  3928. name: count
  3929. required: true
  3930. schema:
  3931. type: number
  3932. - description: e.g. api-key-string
  3933. example: api-key-string
  3934. in: header
  3935. name: X-API-Key
  3936. required: false
  3937. schema:
  3938. type: string
  3939. responses:
  3940. "401":
  3941. $ref: "#/components/responses/Unauthorized"
  3942. "200":
  3943. content:
  3944. application/json:
  3945. examples:
  3946. response:
  3947. value:
  3948. - message: >-
  3949. managesieve-login: Disconnected (no auth attempts in 0
  3950. secs): user=<>, rip=172.22.1.3, lip=172.22.1.250
  3951. priority: info
  3952. program: dovecot
  3953. time: "1569938740"
  3954. description: OK
  3955. headers: {}
  3956. tags:
  3957. - Logs
  3958. description: >-
  3959. This Api endpoint lists all Dovecot logs.
  3960. Tip: You can limit how many logs you want to get by using `/<count>` at
  3961. the end of the api url.
  3962. operationId: Get Dovecot logs
  3963. summary: Get Dovecot logs
  3964. "/api/v1/get/logs/netfilter/{count}":
  3965. get:
  3966. parameters:
  3967. - description: Number of logs to return
  3968. in: path
  3969. name: count
  3970. required: true
  3971. schema:
  3972. type: number
  3973. - description: e.g. api-key-string
  3974. example: api-key-string
  3975. in: header
  3976. name: X-API-Key
  3977. required: false
  3978. schema:
  3979. type: string
  3980. responses:
  3981. "401":
  3982. $ref: "#/components/responses/Unauthorized"
  3983. "200":
  3984. content:
  3985. application/json:
  3986. examples:
  3987. response:
  3988. value:
  3989. - message: "Whitelist was changed, it has 1 entries"
  3990. priority: info
  3991. time: 1569754911
  3992. - message: Add host/network 1.1.1.1/32 to blacklist
  3993. priority: crit
  3994. time: 1569754911
  3995. description: OK
  3996. headers: {}
  3997. tags:
  3998. - Logs
  3999. description: >-
  4000. This Api endpoint lists all Netfilter logs.
  4001. Tip: You can limit how many logs you want to get by using `/<count>` at
  4002. the end of the api url.
  4003. operationId: Get Netfilter logs
  4004. summary: Get Netfilter logs
  4005. "/api/v1/get/logs/postfix/{count}":
  4006. get:
  4007. parameters:
  4008. - description: Number of logs to return
  4009. in: path
  4010. name: count
  4011. required: true
  4012. schema:
  4013. type: number
  4014. - description: e.g. api-key-string
  4015. example: api-key-string
  4016. in: header
  4017. name: X-API-Key
  4018. required: false
  4019. schema:
  4020. type: string
  4021. responses:
  4022. "401":
  4023. $ref: "#/components/responses/Unauthorized"
  4024. "200":
  4025. content:
  4026. application/json:
  4027. examples:
  4028. response:
  4029. value:
  4030. - message: "EF1711500458: removed"
  4031. priority: info
  4032. program: postfix/qmgr
  4033. time: "1569937433"
  4034. description: OK
  4035. headers: {}
  4036. tags:
  4037. - Logs
  4038. description: >-
  4039. This Api endpoint lists all Postfix logs.
  4040. Tip: You can limit how many logs you want to get by using `/<count>` at
  4041. the end of the api url.
  4042. operationId: Get Postfix logs
  4043. summary: Get Postfix logs
  4044. "/api/v1/get/logs/ratelimited/{count}":
  4045. get:
  4046. parameters:
  4047. - description: Number of logs to return
  4048. in: path
  4049. name: count
  4050. required: true
  4051. schema:
  4052. type: number
  4053. - description: e.g. api-key-string
  4054. example: api-key-string
  4055. in: header
  4056. name: X-API-Key
  4057. required: false
  4058. schema:
  4059. type: string
  4060. responses:
  4061. "401":
  4062. $ref: "#/components/responses/Unauthorized"
  4063. "200":
  4064. content:
  4065. application/json:
  4066. examples:
  4067. response:
  4068. value:
  4069. - from: awesome@mailcow.email
  4070. header_from: '"Awesome" <awesome@mailcow.email>'
  4071. header_subject: Mailcow is amazing
  4072. ip: 172.22.1.248
  4073. message_id: 6a-5d892500-7-240abd80@90879116
  4074. qid: E3CF91500458
  4075. rcpt: hello@mailcow.email
  4076. rl_hash: RLsdz3tuabozgd4oacbdh8kc78
  4077. rl_info: mailcow(RLsdz3tuabozgd4oacbdh8kc78)
  4078. rl_name: mailcow
  4079. time: 1569269003
  4080. user: awesome@mailcow.email
  4081. description: OK
  4082. headers: {}
  4083. tags:
  4084. - Logs
  4085. description: >-
  4086. This Api endpoint lists all Ratelimit logs.
  4087. Tip: You can limit how many logs you want to get by using `/<count>` at
  4088. the end of the api url.
  4089. operationId: Get Ratelimit logs
  4090. summary: Get Ratelimit logs
  4091. "/api/v1/get/logs/rspamd-history/{count}":
  4092. get:
  4093. parameters:
  4094. - description: Number of logs to return
  4095. in: path
  4096. name: count
  4097. required: true
  4098. schema:
  4099. type: number
  4100. - description: e.g. api-key-string
  4101. example: api-key-string
  4102. in: header
  4103. name: X-API-Key
  4104. required: false
  4105. schema:
  4106. type: string
  4107. responses:
  4108. "401":
  4109. $ref: "#/components/responses/Unauthorized"
  4110. "200":
  4111. description: OK
  4112. headers: {}
  4113. tags:
  4114. - Logs
  4115. description: >-
  4116. This Api endpoint lists all Rspamd logs.
  4117. Tip: You can limit how many logs you want to get by using `/<count>` at
  4118. the end of the api url.
  4119. operationId: Get Rspamd logs
  4120. summary: Get Rspamd logs
  4121. "/api/v1/get/logs/sogo/{count}":
  4122. get:
  4123. parameters:
  4124. - description: Number of logs to return
  4125. in: path
  4126. name: count
  4127. required: true
  4128. schema:
  4129. type: number
  4130. - description: e.g. api-key-string
  4131. example: api-key-string
  4132. in: header
  4133. name: X-API-Key
  4134. required: false
  4135. schema:
  4136. type: string
  4137. responses:
  4138. "401":
  4139. $ref: "#/components/responses/Unauthorized"
  4140. "200":
  4141. content:
  4142. application/json:
  4143. examples:
  4144. response:
  4145. value:
  4146. - message: >-
  4147. [109]:
  4148. mailcowdockerized_watchdog-mailcow_1.mailcowdockerized_mailcow-network
  4149. "GET /SOGo.index/ HTTP/1.1" 200 2531/0 0.005 - - 0
  4150. priority: notice
  4151. program: sogod
  4152. time: "1569938874"
  4153. description: OK
  4154. headers: {}
  4155. tags:
  4156. - Logs
  4157. description: >-
  4158. This Api endpoint lists all SOGo logs.
  4159. Tip: You can limit how many logs you want to get by using `/<count>` at
  4160. the end of the api url.
  4161. operationId: Get SOGo logs
  4162. summary: Get SOGo logs
  4163. "/api/v1/get/logs/watchdog/{count}":
  4164. get:
  4165. parameters:
  4166. - description: Number of logs to return
  4167. in: path
  4168. name: count
  4169. required: true
  4170. schema:
  4171. type: number
  4172. - description: e.g. api-key-string
  4173. example: api-key-string
  4174. in: header
  4175. name: X-API-Key
  4176. required: false
  4177. schema:
  4178. type: string
  4179. responses:
  4180. "401":
  4181. $ref: "#/components/responses/Unauthorized"
  4182. "200":
  4183. content:
  4184. application/json:
  4185. examples:
  4186. response:
  4187. value:
  4188. - hpdiff: "0"
  4189. hpnow: "1"
  4190. hptotal: "1"
  4191. lvl: "100"
  4192. service: Fail2ban
  4193. time: "1569938958"
  4194. - hpdiff: "0"
  4195. hpnow: "5"
  4196. hptotal: "5"
  4197. lvl: "100"
  4198. service: Rspamd
  4199. time: "1569938956"
  4200. description: OK
  4201. headers: {}
  4202. tags:
  4203. - Logs
  4204. description: >-
  4205. This Api endpoint lists all Watchdog logs.
  4206. Tip: You can limit how many logs you want to get by using `/<count>` at
  4207. the end of the api url.
  4208. operationId: Get Watchdog logs
  4209. summary: Get Watchdog logs
  4210. "/api/v1/get/mailbox/{id}":
  4211. get:
  4212. parameters:
  4213. - description: id of entry you want to get
  4214. example: all
  4215. in: path
  4216. name: id
  4217. required: true
  4218. schema:
  4219. enum:
  4220. - all
  4221. - user@domain.tld
  4222. type: string
  4223. - description: e.g. api-key-string
  4224. example: api-key-string
  4225. in: header
  4226. name: X-API-Key
  4227. required: false
  4228. schema:
  4229. type: string
  4230. responses:
  4231. "401":
  4232. $ref: "#/components/responses/Unauthorized"
  4233. "200":
  4234. content:
  4235. application/json:
  4236. examples:
  4237. response:
  4238. value:
  4239. - active: "1"
  4240. attributes:
  4241. force_pw_update: "0"
  4242. mailbox_format: "maildir:"
  4243. quarantine_notification: never
  4244. sogo_access: "1"
  4245. tls_enforce_in: "0"
  4246. tls_enforce_out: "0"
  4247. domain: doman3.tld
  4248. is_relayed: 0
  4249. local_part: info
  4250. max_new_quota: 10737418240
  4251. messages: 0
  4252. name: Full name
  4253. percent_class: success
  4254. percent_in_use: 0
  4255. quota: 3221225472
  4256. quota_used: 0
  4257. rl: false
  4258. spam_aliases: 0
  4259. username: info@doman3.tld
  4260. description: OK
  4261. headers: {}
  4262. tags:
  4263. - Mailboxes
  4264. description: You can list all mailboxes existing in system.
  4265. operationId: Get mailboxes
  4266. summary: Get mailboxes
  4267. /api/v1/get/mailq/all:
  4268. get:
  4269. responses:
  4270. "401":
  4271. $ref: "#/components/responses/Unauthorized"
  4272. "200":
  4273. content:
  4274. application/json:
  4275. examples:
  4276. response:
  4277. value:
  4278. - arrival_time: 1570091234
  4279. message_size: 1848
  4280. queue_id: B98C6260CA1
  4281. queue_name: incoming
  4282. recipients:
  4283. - recipient@awesomecow.tld
  4284. sender: sender@mailcow.tld
  4285. description: OK
  4286. headers: {}
  4287. tags:
  4288. - Queue Manager
  4289. description: Get the current mail queue and everything it contains.
  4290. operationId: Get Queue
  4291. summary: Get Queue
  4292. "/api/v1/get/oauth2-client/{id}":
  4293. get:
  4294. parameters:
  4295. - description: id of entry you want to get
  4296. example: all
  4297. in: path
  4298. name: id
  4299. required: true
  4300. schema:
  4301. enum:
  4302. - all
  4303. - "1"
  4304. - "2"
  4305. - "5"
  4306. - "10"
  4307. type: string
  4308. - description: e.g. api-key-string
  4309. example: api-key-string
  4310. in: header
  4311. name: X-API-Key
  4312. required: false
  4313. schema:
  4314. type: string
  4315. responses:
  4316. "401":
  4317. $ref: "#/components/responses/Unauthorized"
  4318. "200":
  4319. content:
  4320. application/json:
  4321. examples:
  4322. response:
  4323. value:
  4324. - client_id: 17c76aaa88c0
  4325. client_secret: 73fc668a88147e32a31ff80c
  4326. grant_types: null
  4327. id: 1
  4328. redirect_uri: "https://mailcow.tld"
  4329. scope: profile
  4330. user_id: null
  4331. description: OK
  4332. headers: {}
  4333. tags:
  4334. - oAuth Clients
  4335. description: Using this endpoint you can get all oAuth clients.
  4336. operationId: Get oAuth Clients
  4337. summary: Get oAuth Clients
  4338. "/api/v1/get/policy_bl_domain/{domain}":
  4339. get:
  4340. parameters:
  4341. - description: name of domain
  4342. in: path
  4343. name: domain
  4344. required: true
  4345. schema:
  4346. type: string
  4347. - description: e.g. api-key-string
  4348. example: api-key-string
  4349. in: header
  4350. name: X-API-Key
  4351. required: false
  4352. schema:
  4353. type: string
  4354. responses:
  4355. "401":
  4356. $ref: "#/components/responses/Unauthorized"
  4357. "200":
  4358. content:
  4359. application/json:
  4360. examples:
  4361. response:
  4362. value:
  4363. - object: domain.tld
  4364. prefid: 2
  4365. value: "*@baddomain.tld"
  4366. description: OK
  4367. headers: {}
  4368. tags:
  4369. - Domain antispam policies
  4370. description: You can list all blacklist policies per domain.
  4371. operationId: List blacklist domain policy
  4372. summary: List blacklist domain policy
  4373. "/api/v1/get/policy_wl_domain/{domain}":
  4374. get:
  4375. parameters:
  4376. - description: name of domain
  4377. in: path
  4378. name: domain
  4379. required: true
  4380. schema:
  4381. type: string
  4382. - description: e.g. api-key-string
  4383. example: api-key-string
  4384. in: header
  4385. name: X-API-Key
  4386. required: false
  4387. schema:
  4388. type: string
  4389. responses:
  4390. "401":
  4391. $ref: "#/components/responses/Unauthorized"
  4392. "200":
  4393. content:
  4394. application/json:
  4395. examples:
  4396. response:
  4397. value:
  4398. - object: domain.tld
  4399. prefid: 1
  4400. value: "*@gooddomain.tld"
  4401. description: OK
  4402. headers: {}
  4403. tags:
  4404. - Domain antispam policies
  4405. description: You can list all whitelist policies per domain.
  4406. operationId: List whitelist domain policy
  4407. summary: List whitelist domain policy
  4408. /api/v1/get/quarantine/all:
  4409. get:
  4410. responses:
  4411. "401":
  4412. $ref: "#/components/responses/Unauthorized"
  4413. "200":
  4414. content:
  4415. application/json:
  4416. examples:
  4417. response:
  4418. value:
  4419. created: 1572688831
  4420. id: 33
  4421. notified: 1
  4422. qid: 8224615004C1
  4423. rcpt: admin@domain.tld
  4424. score: 15.48
  4425. sender: bounces@send.domain.tld
  4426. subject: mailcow is awesome
  4427. virus_flag: 0
  4428. description: OK
  4429. headers: {}
  4430. tags:
  4431. - Quarantine
  4432. description: Get all mails that are currently in Quarantine.
  4433. operationId: Get mails in Quarantine
  4434. summary: Get mails in Quarantine
  4435. "/api/v1/get/recipient_map/{id}":
  4436. get:
  4437. parameters:
  4438. - description: id of entry you want to get
  4439. example: all
  4440. in: path
  4441. name: id
  4442. required: true
  4443. schema:
  4444. enum:
  4445. - all
  4446. - "1"
  4447. - "2"
  4448. - "5"
  4449. - "10"
  4450. type: string
  4451. - description: e.g. api-key-string
  4452. example: api-key-string
  4453. in: header
  4454. name: X-API-Key
  4455. required: false
  4456. schema:
  4457. type: string
  4458. responses:
  4459. "401":
  4460. $ref: "#/components/responses/Unauthorized"
  4461. "200":
  4462. content:
  4463. application/json:
  4464. examples:
  4465. response:
  4466. value:
  4467. - active: "1"
  4468. created: "2019-10-02 22:06:29"
  4469. id: 3
  4470. modified: null
  4471. recipient_map_new: target@mailcow.tld
  4472. recipient_map_old: recipient@mailcow.tld
  4473. description: OK
  4474. headers: {}
  4475. tags:
  4476. - Address Rewriting
  4477. description: Using this endpoint you can get all recipient maps.
  4478. operationId: Get Recipient Map
  4479. summary: Get Recipient Map
  4480. "/api/v1/get/relayhost/{id}":
  4481. get:
  4482. parameters:
  4483. - description: id of entry you want to get
  4484. example: all
  4485. in: path
  4486. name: id
  4487. required: true
  4488. schema:
  4489. enum:
  4490. - all
  4491. - "1"
  4492. - "2"
  4493. - "5"
  4494. - "10"
  4495. type: string
  4496. - description: e.g. api-key-string
  4497. example: api-key-string
  4498. in: header
  4499. name: X-API-Key
  4500. required: false
  4501. schema:
  4502. type: string
  4503. responses:
  4504. "401":
  4505. $ref: "#/components/responses/Unauthorized"
  4506. "200":
  4507. content:
  4508. application/json:
  4509. examples:
  4510. response:
  4511. value:
  4512. - active: "1"
  4513. hostname: "mailcow.tld:25"
  4514. id: 1
  4515. password: supersecurepassword
  4516. password_short: tes...
  4517. used_by_domains: ""
  4518. username: testuser
  4519. description: OK
  4520. headers: {}
  4521. tags:
  4522. - Routing
  4523. description: Using this endpoint you can get all Sender-Dependent Transports.
  4524. operationId: Get Sender-Dependent Transports
  4525. summary: Get Sender-Dependent Transports
  4526. /api/v1/get/resource/all:
  4527. get:
  4528. responses:
  4529. "401":
  4530. $ref: "#/components/responses/Unauthorized"
  4531. "200":
  4532. content:
  4533. application/json:
  4534. examples:
  4535. response:
  4536. value:
  4537. - active: "1"
  4538. description: test
  4539. domain: mailcow.tld
  4540. kind: location
  4541. local_part: test
  4542. multiple_bookings: 0
  4543. name: test@mailcow.tld
  4544. description: OK
  4545. headers: {}
  4546. tags:
  4547. - Resources
  4548. description: Using this endpoint you can get all Resources.
  4549. operationId: Get Resources
  4550. summary: Get Resources
  4551. "/api/v1/get/rl-mbox/{mailbox}":
  4552. get:
  4553. parameters:
  4554. - description: name of mailbox or all
  4555. in: path
  4556. name: mailbox
  4557. required: true
  4558. schema:
  4559. type: string
  4560. - description: e.g. api-key-string
  4561. example: api-key-string
  4562. in: header
  4563. name: X-API-Key
  4564. required: false
  4565. schema:
  4566. type: string
  4567. responses:
  4568. "401":
  4569. $ref: "#/components/responses/Unauthorized"
  4570. "200":
  4571. content:
  4572. application/json:
  4573. examples:
  4574. response:
  4575. value:
  4576. - frame: s
  4577. mailbox: leon@mailcow.tld
  4578. value: "5"
  4579. - frame: s
  4580. mailbox: lisa@mailcow.tld
  4581. value: "3"
  4582. description: OK
  4583. headers: {}
  4584. tags:
  4585. - Ratelimits
  4586. description: >-
  4587. Using this endpoint you can get the ratelimits for a certain mailbox.
  4588. You can use all for all mailboxes.
  4589. operationId: Get mailbox ratelimits
  4590. summary: Get mailbox ratelimits
  4591. "/api/v1/get/rl-domain/{domain}":
  4592. get:
  4593. parameters:
  4594. - description: name of domain or all
  4595. in: path
  4596. name: domain
  4597. required: true
  4598. schema:
  4599. type: string
  4600. - description: e.g. api-key-string
  4601. example: api-key-string
  4602. in: header
  4603. name: X-API-Key
  4604. required: false
  4605. schema:
  4606. type: string
  4607. responses:
  4608. "401":
  4609. $ref: "#/components/responses/Unauthorized"
  4610. "200":
  4611. content:
  4612. application/json:
  4613. examples:
  4614. response:
  4615. value:
  4616. - frame: s
  4617. domain: domain.tld
  4618. value: "5"
  4619. - frame: s
  4620. mailbox: domain2.tld
  4621. value: "3"
  4622. description: OK
  4623. headers: {}
  4624. tags:
  4625. - Ratelimits
  4626. description: >-
  4627. Using this endpoint you can get the ratelimits for a certain domains.
  4628. You can use all for all domain.
  4629. operationId: Get domain ratelimits
  4630. summary: Get domain ratelimits
  4631. /api/v1/edit/rl-mbox/:
  4632. post:
  4633. responses:
  4634. "401":
  4635. $ref: "#/components/responses/Unauthorized"
  4636. "200":
  4637. content:
  4638. application/json:
  4639. examples:
  4640. response:
  4641. value:
  4642. - type: success
  4643. log:
  4644. - ratelimit
  4645. - edit
  4646. - mailbox
  4647. - object:
  4648. - info@domain.tld
  4649. rl_value: "10"
  4650. rl_frame: h
  4651. msg:
  4652. - rl_saved
  4653. - info@domain.tld
  4654. schema:
  4655. properties:
  4656. log:
  4657. description: contains request object
  4658. items: {}
  4659. type: array
  4660. msg:
  4661. items: {}
  4662. type: array
  4663. type:
  4664. enum:
  4665. - success
  4666. - danger
  4667. - error
  4668. type: string
  4669. type: object
  4670. description: OK
  4671. headers: {}
  4672. tags:
  4673. - Ratelimits
  4674. description: >-
  4675. Using this endpoint you can edit the ratelimits for a certain mailbox.
  4676. operationId: Edit mailbox ratelimits
  4677. requestBody:
  4678. content:
  4679. application/json:
  4680. schema:
  4681. example:
  4682. attr:
  4683. rl_vlaue: "10"
  4684. rl_frame: "h"
  4685. items:
  4686. - info@domain.tld
  4687. properties:
  4688. attr:
  4689. properties:
  4690. rl_frame:
  4691. description: contains the frame for the ratelimit h,s,m
  4692. type: string
  4693. rl_vlaue:
  4694. description: contains the rate for the ratelimit 10,20,50,1
  4695. type: number
  4696. type: object
  4697. items:
  4698. description: contains list of mailboxes you want to edit the ratelimit of
  4699. type: object
  4700. type: object
  4701. summary: Edit mailbox ratelimits
  4702. /api/v1/edit/rl-domain/:
  4703. post:
  4704. responses:
  4705. "401":
  4706. $ref: "#/components/responses/Unauthorized"
  4707. "200":
  4708. content:
  4709. application/json:
  4710. examples:
  4711. response:
  4712. value:
  4713. - type: success
  4714. - log:
  4715. - ratelimit
  4716. - edit
  4717. - domain
  4718. - object:
  4719. - domain.tld
  4720. rl_value: "50"
  4721. rl_frame: "h"
  4722. msg:
  4723. - rl_saved
  4724. - domain.tld
  4725. schema:
  4726. properties:
  4727. log:
  4728. description: contains request object
  4729. items: {}
  4730. type: array
  4731. msg:
  4732. items: {}
  4733. type: array
  4734. type:
  4735. enum:
  4736. - success
  4737. - danger
  4738. - error
  4739. type: string
  4740. type: object
  4741. description: OK
  4742. headers: {}
  4743. tags:
  4744. - Ratelimits
  4745. description: >-
  4746. Using this endpoint you can edit the ratelimits for a certain domains.
  4747. operationId: Edit domain ratelimits
  4748. requestBody:
  4749. content:
  4750. application/json:
  4751. schema:
  4752. example:
  4753. attr:
  4754. rl_vlaue: "10"
  4755. rl_frame: "h"
  4756. items:
  4757. - domain.tld
  4758. properties:
  4759. attr:
  4760. properties:
  4761. rl_frame:
  4762. description: contains the frame for the ratelimit h,s,m
  4763. type: string
  4764. rl_vlaue:
  4765. description: contains the rate for the ratelimit 10,20,50,1
  4766. type: number
  4767. type: object
  4768. items:
  4769. description: contains list of domains you want to edit the ratelimit of
  4770. type: object
  4771. type: object
  4772. summary: Edit domain ratelimits
  4773. /api/v1/get/status/containers:
  4774. get:
  4775. responses:
  4776. "401":
  4777. $ref: "#/components/responses/Unauthorized"
  4778. "200":
  4779. content:
  4780. application/json:
  4781. examples:
  4782. response:
  4783. value:
  4784. acme-mailcow:
  4785. container: acme-mailcow
  4786. image: "mailcow/acme:1.63"
  4787. started_at: "2019-12-22T21:00:08.270660275Z"
  4788. state: running
  4789. type: info
  4790. clamd-mailcow:
  4791. container: clamd-mailcow
  4792. image: "mailcow/clamd:1.35"
  4793. started_at: "2019-12-22T21:00:01.622856172Z"
  4794. state: running
  4795. type: info
  4796. dockerapi-mailcow:
  4797. container: dockerapi-mailcow
  4798. image: "mailcow/dockerapi:1.36"
  4799. started_at: "2019-12-22T20:59:59.984797808Z"
  4800. state: running
  4801. type: info
  4802. dovecot-mailcow:
  4803. container: dovecot-mailcow
  4804. image: "mailcow/dovecot:1.104"
  4805. started_at: "2019-12-22T21:00:08.988680259Z"
  4806. state: running
  4807. type: info
  4808. ipv6nat-mailcow:
  4809. container: ipv6nat-mailcow
  4810. image: robbertkl/ipv6nat
  4811. started_at: "2019-12-22T21:06:37.273225445Z"
  4812. state: running
  4813. type: info
  4814. memcached-mailcow:
  4815. container: memcached-mailcow
  4816. image: "memcached:alpine"
  4817. started_at: "2019-12-22T20:59:58.0907785Z"
  4818. state: running
  4819. type: info
  4820. mysql-mailcow:
  4821. container: mysql-mailcow
  4822. image: "mariadb:10.3"
  4823. started_at: "2019-12-22T21:00:02.201937528Z"
  4824. state: running
  4825. type: info
  4826. netfilter-mailcow:
  4827. container: netfilter-mailcow
  4828. image: "mailcow/netfilter:1.31"
  4829. started_at: "2019-12-22T21:00:09.851559297Z"
  4830. state: running
  4831. type: info
  4832. nginx-mailcow:
  4833. container: nginx-mailcow
  4834. image: "nginx:mainline-alpine"
  4835. started_at: "2019-12-22T21:00:12.9843038Z"
  4836. state: running
  4837. type: info
  4838. olefy-mailcow:
  4839. container: olefy-mailcow
  4840. image: "mailcow/olefy:1.2"
  4841. started_at: "2019-12-22T20:59:59.676259274Z"
  4842. state: running
  4843. type: info
  4844. php-fpm-mailcow:
  4845. container: php-fpm-mailcow
  4846. image: "mailcow/phpfpm:1.55"
  4847. started_at: "2019-12-22T21:00:00.955808957Z"
  4848. state: running
  4849. type: info
  4850. postfix-mailcow:
  4851. container: postfix-mailcow
  4852. image: "mailcow/postfix:1.44"
  4853. started_at: "2019-12-22T21:00:07.186717617Z"
  4854. state: running
  4855. type: info
  4856. redis-mailcow:
  4857. container: redis-mailcow
  4858. image: "redis:5-alpine"
  4859. started_at: "2019-12-22T20:59:56.827166834Z"
  4860. state: running
  4861. type: info
  4862. rspamd-mailcow:
  4863. container: rspamd-mailcow
  4864. image: "mailcow/rspamd:1.56"
  4865. started_at: "2019-12-22T21:00:12.456075355Z"
  4866. state: running
  4867. type: info
  4868. sogo-mailcow:
  4869. container: sogo-mailcow
  4870. image: "mailcow/sogo:1.65"
  4871. started_at: "2019-12-22T20:59:58.382274592Z"
  4872. state: running
  4873. type: info
  4874. solr-mailcow:
  4875. container: solr-mailcow
  4876. image: "mailcow/solr:1.7"
  4877. started_at: "2019-12-22T20:59:59.635413798Z"
  4878. state: running
  4879. type: info
  4880. unbound-mailcow:
  4881. container: unbound-mailcow
  4882. image: "mailcow/unbound:1.10"
  4883. started_at: "2019-12-22T20:59:58.760595825Z"
  4884. state: running
  4885. type: info
  4886. watchdog-mailcow:
  4887. container: watchdog-mailcow
  4888. image: "mailcow/watchdog:1.65"
  4889. started_at: "2019-12-22T20:59:56.028660382Z"
  4890. state: running
  4891. type: info
  4892. description: OK
  4893. headers: {}
  4894. tags:
  4895. - Status
  4896. description: >-
  4897. Using this endpoint you can get the status of all containers and when
  4898. hey where started and a few other details.
  4899. operationId: Get container status
  4900. summary: Get container status
  4901. /api/v1/get/status/solr:
  4902. get:
  4903. responses:
  4904. "401":
  4905. $ref: "#/components/responses/Unauthorized"
  4906. "200":
  4907. content:
  4908. application/json:
  4909. examples:
  4910. response:
  4911. value:
  4912. solr_documents: null
  4913. solr_enabled: false
  4914. solr_size: null
  4915. type: info
  4916. description: OK
  4917. headers: {}
  4918. tags:
  4919. - Status
  4920. description: >-
  4921. Using this endpoint you can get the status of all containers and when
  4922. hey where started and a few other details.
  4923. operationId: Get solr status
  4924. summary: Get solr status
  4925. /api/v1/get/status/vmail:
  4926. get:
  4927. responses:
  4928. "401":
  4929. $ref: "#/components/responses/Unauthorized"
  4930. "200":
  4931. content:
  4932. application/json:
  4933. examples:
  4934. response:
  4935. value:
  4936. disk: /dev/mapper/mail--vg-root
  4937. total: 41G
  4938. type: info
  4939. used: 11G
  4940. used_percent: 28%
  4941. description: OK
  4942. headers: {}
  4943. tags:
  4944. - Status
  4945. description: >-
  4946. Using this endpoint you can get the status of the vmail and the amount
  4947. of used storage.
  4948. operationId: Get vmail status
  4949. summary: Get vmail status
  4950. /api/v1/get/syncjobs/all/no_log:
  4951. get:
  4952. responses:
  4953. "401":
  4954. $ref: "#/components/responses/Unauthorized"
  4955. "200":
  4956. content:
  4957. application/json:
  4958. examples:
  4959. response:
  4960. value:
  4961. - active: "1"
  4962. authmd51: 0
  4963. authmech1: PLAIN
  4964. automap: 1
  4965. created: "2019-05-22 11:37:25"
  4966. custom_params: ""
  4967. delete1: 0
  4968. delete2: 0
  4969. delete2duplicates: 1
  4970. domain2: ""
  4971. enc1: TLS
  4972. exclude: (?i)spam|(?i)junk
  4973. host1: imap.server.tld
  4974. id: 1
  4975. is_running: 0
  4976. last_run: "2019-05-22 11:40:02"
  4977. log: ""
  4978. maxage: 0
  4979. maxbytespersecond: "0"
  4980. mins_interval: "20"
  4981. modified: "2019-05-22 11:40:02"
  4982. port1: 993
  4983. regextrans2: ""
  4984. skipcrossduplicates: 0
  4985. subfolder2: External
  4986. subscribeall: 1
  4987. timeout1: 600
  4988. timeout2: 600
  4989. user1: username
  4990. user2: mailbox@domain.tld
  4991. description: OK
  4992. headers: {}
  4993. tags:
  4994. - Sync jobs
  4995. description: You can list all syn jobs existing in system.
  4996. operationId: Get sync jobs
  4997. summary: Get sync jobs
  4998. "/api/v1/get/tls-policy-map/{id}":
  4999. get:
  5000. parameters:
  5001. - description: id of entry you want to get
  5002. example: all
  5003. in: path
  5004. name: id
  5005. required: true
  5006. schema:
  5007. enum:
  5008. - all
  5009. - "1"
  5010. - "2"
  5011. - "5"
  5012. - "10"
  5013. type: string
  5014. - description: e.g. api-key-string
  5015. example: api-key-string
  5016. in: header
  5017. name: X-API-Key
  5018. required: false
  5019. schema:
  5020. type: string
  5021. responses:
  5022. "401":
  5023. $ref: "#/components/responses/Unauthorized"
  5024. "200":
  5025. content:
  5026. application/json:
  5027. examples:
  5028. response:
  5029. value:
  5030. - parameters: ""
  5031. active: "1"
  5032. created: "2019-10-03 08:42:12"
  5033. dest: mailcow.tld
  5034. id: 1
  5035. modified: null
  5036. policy: encrypt
  5037. description: OK
  5038. headers: {}
  5039. tags:
  5040. - Outgoing TLS Policy Map Overrides
  5041. description: Using this endpoint you can get all TLS policy map override maps.
  5042. operationId: Get TLS Policy Map
  5043. summary: Get TLS Policy Map
  5044. "/api/v1/get/transport/{id}":
  5045. get:
  5046. parameters:
  5047. - description: id of entry you want to get
  5048. example: all
  5049. in: path
  5050. name: id
  5051. required: true
  5052. schema:
  5053. enum:
  5054. - all
  5055. - "1"
  5056. - "2"
  5057. - "5"
  5058. - "10"
  5059. type: string
  5060. - description: e.g. api-key-string
  5061. example: api-key-string
  5062. in: header
  5063. name: X-API-Key
  5064. required: false
  5065. schema:
  5066. type: string
  5067. responses:
  5068. "401":
  5069. $ref: "#/components/responses/Unauthorized"
  5070. "200":
  5071. content:
  5072. application/json:
  5073. examples:
  5074. response:
  5075. value:
  5076. - active: "1"
  5077. destination: example.org
  5078. id: 1
  5079. lookup_mx: "0"
  5080. nexthop: "host:25"
  5081. password: supersecurepw
  5082. password_short: sup...
  5083. username: testuser
  5084. description: OK
  5085. headers: {}
  5086. tags:
  5087. - Routing
  5088. description: Using this endpoint you can get all Transport Maps.
  5089. operationId: Get Transport Maps
  5090. summary: Get Transport Maps
  5091. /api/v1/edit/spam-score/:
  5092. post:
  5093. responses:
  5094. "401":
  5095. $ref: "#/components/responses/Unauthorized"
  5096. "200":
  5097. content:
  5098. application/json:
  5099. examples:
  5100. response:
  5101. value:
  5102. - type: success
  5103. log:
  5104. - mailbox
  5105. - edit
  5106. - spam_score
  5107. - username:
  5108. - info@domain.tld
  5109. spam_score: "8,15"
  5110. msg:
  5111. - mailbox_modified
  5112. - info@domain.tld
  5113. schema:
  5114. properties:
  5115. log:
  5116. description: contains request object
  5117. items: {}
  5118. type: array
  5119. msg:
  5120. items: {}
  5121. type: array
  5122. type:
  5123. enum:
  5124. - success
  5125. - danger
  5126. - error
  5127. type: string
  5128. type: object
  5129. description: OK
  5130. headers: {}
  5131. tags:
  5132. - Mailboxes
  5133. description: >-
  5134. Using this endpoint you can edit the spam filter score for a certain mailbox.
  5135. operationId: Edit mailbox spam filter score
  5136. requestBody:
  5137. content:
  5138. application/json:
  5139. schema:
  5140. example:
  5141. - items:
  5142. - info@domain.tld
  5143. attr:
  5144. spam_score: "8,15"
  5145. summary: Edit mailbox spam filter score
  5146. tags:
  5147. - name: Domains
  5148. description: You can create antispam whitelist and blacklist policies
  5149. - name: Domain antispam policies
  5150. description: You can edit the Domain Antispam policies
  5151. - name: Mailboxes
  5152. description: You can manage mailboxes
  5153. - name: Aliases
  5154. description: You can manage aliases
  5155. - name: Sync jobs
  5156. description: Using Syncjobs you can sync your mails with other email servers
  5157. - name: Fordwarding Hosts
  5158. description: Forwarding Hosts enable you to send mail using a relay
  5159. - name: Logs
  5160. description: Get all mailcow system logs
  5161. - name: Queue Manager
  5162. description: Manage the postfix mail queue
  5163. - name: Quarantine
  5164. description: Check what emails went to quarantine
  5165. - name: Fail2Ban
  5166. description: Manage the Netfilter fail2ban options
  5167. - name: DKIM
  5168. description: Manage DKIM keys
  5169. - name: Domain admin
  5170. description: Create or udpdate domain admin users
  5171. - name: Address Rewriting
  5172. description: Create BCC maps or recipient maps
  5173. - name: Outgoing TLS Policy Map Overrides
  5174. description: Force global TLS policys
  5175. - name: oAuth Clients
  5176. description: Use mailcow as a oAuth server
  5177. - name: Routing
  5178. description: Define your own email routes
  5179. - name: Resources
  5180. description: Manage ressources
  5181. - name: App Passwords
  5182. description: Create mailbox app passwords
  5183. - name: Status
  5184. description: Get the status of your cow
  5185. - name: Ratelimits
  5186. description: Edit domain ratelimits