openapi.yaml 200 KB

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