openapi.yaml 173 KB

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