openapi.yaml 167 KB

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