openapi.yaml 178 KB

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