openapi.yaml 155 KB

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