openapi.yaml 181 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728
  1. openapi: 3.1.0
  2. info:
  3. description: >-
  4. mailcow is complete e-mailing solution with advanced antispam, antivirus,
  5. nice UI and API.
  6. In order to use this API you have to create a API key and add your IP
  7. address to the whitelist of allowed IPs this can be done by logging into the
  8. Mailcow UI using your admin account, then go to Configuration > Access >
  9. Edit administrator details > API. There you will find a collapsed API menu.
  10. There are two types of API keys
  11. - The read only key can only be used for all get endpoints
  12. - The read write key can be used for all endpoints
  13. title: mailcow API
  14. version: "1.0.0"
  15. servers:
  16. - url: /
  17. components:
  18. securitySchemes:
  19. ApiKeyAuth:
  20. type: apiKey
  21. in: header
  22. name: X-API-Key
  23. responses:
  24. Unauthorized:
  25. description: Unauthorized
  26. content:
  27. application/json:
  28. schema:
  29. type: object
  30. properties:
  31. type:
  32. type: string
  33. example: error
  34. msg:
  35. type: string
  36. example: authentication failed
  37. required:
  38. - type
  39. - msg
  40. security:
  41. - ApiKeyAuth: []
  42. paths:
  43. /api/v1/add/alias:
  44. post:
  45. responses:
  46. "401":
  47. $ref: "#/components/responses/Unauthorized"
  48. "200":
  49. content:
  50. application/json:
  51. examples:
  52. response:
  53. value:
  54. - log:
  55. - mailbox
  56. - add
  57. - alias
  58. - active: "1"
  59. address: 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. ban_time_increment: "1"
  3167. blacklist: "10.100.6.5/32,10.100.8.4/32"
  3168. max_attempts: "5"
  3169. max_ban_time: "86400"
  3170. netban_ipv4: "24"
  3171. netban_ipv6: "64"
  3172. retry_window: "600"
  3173. whitelist: mailcow.tld
  3174. items: none
  3175. properties:
  3176. attr:
  3177. description: array containing the fail2ban settings
  3178. properties:
  3179. backlist:
  3180. description: the backlisted ips or hostnames separated by comma
  3181. type: string
  3182. ban_time:
  3183. description: the time an ip should be banned
  3184. type: number
  3185. ban_time_increment:
  3186. description: if the time of the ban should increase each time
  3187. type: boolean
  3188. max_attempts:
  3189. description: the maximum numbe of wrong logins before a ip is banned
  3190. type: number
  3191. max_ban_time:
  3192. description: the maximum time an ip should be banned
  3193. type: number
  3194. netban_ipv4:
  3195. description: the networks mask to ban for ipv4
  3196. type: number
  3197. netban_ipv6:
  3198. description: the networks mask to ban for ipv6
  3199. type: number
  3200. retry_window:
  3201. description: >-
  3202. the maximum time in which a ip as to login with false
  3203. credentials to be banned
  3204. type: number
  3205. whitelist:
  3206. description: whitelisted ips or hostnames sepereated by comma
  3207. type: string
  3208. type: object
  3209. items:
  3210. description: has to be none
  3211. type: object
  3212. summary: Edit Fail2Ban
  3213. /api/v1/edit/mailbox:
  3214. post:
  3215. responses:
  3216. "401":
  3217. $ref: "#/components/responses/Unauthorized"
  3218. "200":
  3219. content:
  3220. application/json:
  3221. examples:
  3222. response:
  3223. value:
  3224. - log:
  3225. - mailbox
  3226. - edit
  3227. - mailbox
  3228. - active: "1"
  3229. force_pw_update: "0"
  3230. name: Full name
  3231. password: "*"
  3232. password2: "*"
  3233. quota: "3072"
  3234. sender_acl:
  3235. - default
  3236. - info@domain2.tld
  3237. - domain3.tld
  3238. - "*"
  3239. sogo_access: "1"
  3240. username:
  3241. - info@domain.tld
  3242. tags: ["tag3", "tag4"]
  3243. - null
  3244. msg:
  3245. - mailbox_modified
  3246. - info@domain.tld
  3247. type: success
  3248. schema:
  3249. properties:
  3250. log:
  3251. description: contains request object
  3252. items: {}
  3253. type: array
  3254. msg:
  3255. items: {}
  3256. type: array
  3257. type:
  3258. enum:
  3259. - success
  3260. - danger
  3261. - error
  3262. type: string
  3263. type: object
  3264. description: OK
  3265. headers: {}
  3266. tags:
  3267. - Mailboxes
  3268. description: >-
  3269. You can update one or more mailboxes per request. You can also send just
  3270. attributes you want to change
  3271. operationId: Update mailbox
  3272. requestBody:
  3273. content:
  3274. application/json:
  3275. schema:
  3276. example:
  3277. attr:
  3278. active: "1"
  3279. force_pw_update: "0"
  3280. name: Full name
  3281. password: ""
  3282. password2: ""
  3283. quota: "3072"
  3284. sender_acl:
  3285. - default
  3286. - info@domain2.tld
  3287. - domain3.tld
  3288. - "*"
  3289. sogo_access: "1"
  3290. tags: ["tag3", "tag4"]
  3291. items:
  3292. - info@domain.tld
  3293. properties:
  3294. attr:
  3295. properties:
  3296. active:
  3297. description: is mailbox active or not
  3298. type: boolean
  3299. force_pw_update:
  3300. description: force user to change password on next login
  3301. type: boolean
  3302. name:
  3303. description: Full name of the mailbox user
  3304. type: string
  3305. password2:
  3306. description: new mailbox password for confirmation
  3307. type: string
  3308. password:
  3309. description: new mailbox password
  3310. type: string
  3311. quota:
  3312. description: mailbox quota
  3313. type: number
  3314. sender_acl:
  3315. description: list of allowed send from addresses
  3316. type: object
  3317. sogo_access:
  3318. description: is access to SOGo webmail active or not
  3319. type: boolean
  3320. type: object
  3321. items:
  3322. description: contains list of mailboxes you want update
  3323. type: object
  3324. type: object
  3325. summary: Update mailbox
  3326. /api/v1/edit/mailq:
  3327. post:
  3328. responses:
  3329. "401":
  3330. $ref: "#/components/responses/Unauthorized"
  3331. "200":
  3332. content:
  3333. application/json:
  3334. examples:
  3335. response:
  3336. value:
  3337. msg: Task completed
  3338. type: success
  3339. description: OK
  3340. headers: {}
  3341. tags:
  3342. - Queue Manager
  3343. description: >-
  3344. Using this API you can flush the current mail queue. This will try to
  3345. deliver all mails currently in it.
  3346. This API uses the command: `postqueue -f`
  3347. operationId: Flush Queue
  3348. requestBody:
  3349. content:
  3350. application/json:
  3351. schema:
  3352. example:
  3353. action: flush
  3354. properties:
  3355. action:
  3356. description: use flush to flush the mail queue
  3357. type: string
  3358. type: object
  3359. summary: Flush Queue
  3360. /api/v1/edit/pushover:
  3361. post:
  3362. responses:
  3363. "401":
  3364. $ref: "#/components/responses/Unauthorized"
  3365. "200":
  3366. content:
  3367. application/json:
  3368. examples:
  3369. response:
  3370. value:
  3371. - log:
  3372. - pushover
  3373. - edit
  3374. - active: "0"
  3375. evaluate_x_prio: "0"
  3376. key: 21e8918e1jksdjcpis712
  3377. only_x_prio: "0"
  3378. sound: "pushover"
  3379. senders: ""
  3380. senders_regex: ""
  3381. text: ""
  3382. title: Mail
  3383. token: 9023e2ohcwed27d1idu2
  3384. username:
  3385. - info@domain.tld
  3386. msg: pushover_settings_edited
  3387. type: success
  3388. schema:
  3389. properties:
  3390. log:
  3391. description: contains request object
  3392. items: {}
  3393. type: array
  3394. msg:
  3395. items: {}
  3396. type: array
  3397. type:
  3398. enum:
  3399. - success
  3400. - danger
  3401. - error
  3402. type: string
  3403. type: object
  3404. description: OK
  3405. headers: {}
  3406. tags:
  3407. - Mailboxes
  3408. description: >-
  3409. Using this endpoint it is possible to update the pushover settings for
  3410. mailboxes
  3411. operationId: Update Pushover settings
  3412. requestBody:
  3413. content:
  3414. application/json:
  3415. schema:
  3416. example:
  3417. attr:
  3418. active: "0"
  3419. evaluate_x_prio: "0"
  3420. key: 21e8918e1jksdjcpis712
  3421. only_x_prio: "0"
  3422. sound: "pushover"
  3423. senders: ""
  3424. senders_regex: ""
  3425. text: ""
  3426. title: Mail
  3427. token: 9023e2ohcwed27d1idu2
  3428. items: info@domain.tld
  3429. properties:
  3430. attr:
  3431. properties:
  3432. active:
  3433. description: Enables pushover 1 disable pushover 0
  3434. type: number
  3435. evaluate_x_prio:
  3436. description: Send the Push with High priority
  3437. type: number
  3438. key:
  3439. description: Pushover key
  3440. type: string
  3441. only_x_prio:
  3442. description: Only send push for prio mails
  3443. type: number
  3444. sound:
  3445. description: Set notification sound
  3446. type: string
  3447. senders:
  3448. description: Only send push for emails from these senders
  3449. type: string
  3450. senders_regex:
  3451. description: Regex to match senders for which a push will be send
  3452. type: string
  3453. text:
  3454. description: Custom push noficiation text
  3455. type: string
  3456. title:
  3457. description: Push title
  3458. type: string
  3459. token:
  3460. description: Pushover token
  3461. type: string
  3462. type: object
  3463. items:
  3464. description: contains list of mailboxes you want to delete
  3465. type: object
  3466. type: object
  3467. summary: Update Pushover settings
  3468. /api/v1/edit/quarantine_notification:
  3469. post:
  3470. responses:
  3471. "401":
  3472. $ref: "#/components/responses/Unauthorized"
  3473. "200":
  3474. description: OK
  3475. headers: {}
  3476. tags:
  3477. - Mailboxes
  3478. description: You can update one or more mailboxes per request.
  3479. operationId: Quarantine Notifications
  3480. requestBody:
  3481. content:
  3482. application/json:
  3483. schema:
  3484. example:
  3485. attr:
  3486. quarantine_notification: hourly
  3487. items:
  3488. anyOf:
  3489. - mailbox1@domain.tld
  3490. - mailbox2@domain.tld
  3491. properties:
  3492. attr:
  3493. properties:
  3494. quarantine_notification:
  3495. description: recurrence
  3496. enum:
  3497. - hourly
  3498. - daily
  3499. - weekly
  3500. - never
  3501. type: string
  3502. type: object
  3503. items:
  3504. description: >-
  3505. contains list of mailboxes you want set qurantine
  3506. notifications
  3507. type: object
  3508. type: object
  3509. summary: Quarantine Notifications
  3510. /api/v1/edit/syncjob:
  3511. post:
  3512. responses:
  3513. "401":
  3514. $ref: "#/components/responses/Unauthorized"
  3515. "200":
  3516. content:
  3517. application/json:
  3518. examples:
  3519. response:
  3520. value:
  3521. log:
  3522. - entity
  3523. - action
  3524. - object
  3525. msg:
  3526. - message
  3527. - entity name
  3528. type: success
  3529. schema:
  3530. properties:
  3531. log:
  3532. description: contains request object
  3533. items: {}
  3534. type: array
  3535. msg:
  3536. items: {}
  3537. type: array
  3538. type:
  3539. enum:
  3540. - success
  3541. - danger
  3542. - error
  3543. type: string
  3544. type: object
  3545. description: OK
  3546. headers: {}
  3547. tags:
  3548. - Sync jobs
  3549. description: >-
  3550. You can update one or more sync jobs per request. You can also send just
  3551. attributes you want to change.
  3552. operationId: Update sync job
  3553. requestBody:
  3554. content:
  3555. application/json:
  3556. schema:
  3557. example:
  3558. attr:
  3559. active: "1"
  3560. automap: "1"
  3561. custom_params: ""
  3562. delete1: "0"
  3563. delete2: "0"
  3564. delete2duplicates: "1"
  3565. enc1: SSL
  3566. exclude: (?i)spam|(?i)junk
  3567. host1: imap.server.tld
  3568. maxage: "0"
  3569. maxbytespersecond: "0"
  3570. mins_interval: "20"
  3571. password1: supersecret
  3572. port1: "993"
  3573. skipcrossduplicates: "0"
  3574. subfolder2: External
  3575. subscribeall: "1"
  3576. timeout1: "600"
  3577. timeout2: "600"
  3578. user1: username
  3579. items: "1"
  3580. properties:
  3581. attr:
  3582. properties:
  3583. active:
  3584. description: Is sync job active
  3585. type: boolean
  3586. automap:
  3587. description: >-
  3588. Try to automap folders ("Sent items", "Sent" => "Sent"
  3589. etc.)
  3590. type: boolean
  3591. custom_params:
  3592. description: Custom parameters passed to imapsync command
  3593. type: string
  3594. delete1:
  3595. description: Delete from source when completed
  3596. type: boolean
  3597. delete2:
  3598. description: Delete messages on destination that are not on source
  3599. type: boolean
  3600. delete2duplicates:
  3601. description: Delete duplicates on destination
  3602. type: boolean
  3603. enc1:
  3604. description: Encryption
  3605. enum:
  3606. - TLS
  3607. - SSL
  3608. - PLAIN
  3609. type: string
  3610. exclude:
  3611. description: Exclude objects (regex)
  3612. type: string
  3613. host1:
  3614. description: Hostname
  3615. type: string
  3616. maxage:
  3617. description: >-
  3618. Maximum age of messages in days that will be polled from
  3619. remote (0 = ignore age)
  3620. type: number
  3621. maxbytespersecond:
  3622. description: Max. bytes per second (0 = unlimited)
  3623. type: number
  3624. mins_interval:
  3625. description: Interval (min)
  3626. type: number
  3627. password1:
  3628. description: Password
  3629. type: string
  3630. port1:
  3631. description: Port
  3632. type: string
  3633. skipcrossduplicates:
  3634. description: >-
  3635. Skip duplicate messages across folders (first come,
  3636. first serve)
  3637. type: boolean
  3638. subfolder2:
  3639. description: >-
  3640. Sync into subfolder on destination (empty = do not use
  3641. subfolder)
  3642. type: string
  3643. subscribeall:
  3644. description: Subscribe all folders
  3645. type: boolean
  3646. timeout1:
  3647. description: Timeout for connection to remote host
  3648. type: number
  3649. timeout2:
  3650. description: Timeout for connection to local host
  3651. type: number
  3652. user1:
  3653. description: Username
  3654. type: string
  3655. type: object
  3656. items:
  3657. description: contains list of aliases you want update
  3658. type: object
  3659. type: object
  3660. summary: Update sync job
  3661. /api/v1/edit/user-acl:
  3662. post:
  3663. responses:
  3664. "401":
  3665. $ref: "#/components/responses/Unauthorized"
  3666. "200":
  3667. content:
  3668. application/json:
  3669. examples:
  3670. response:
  3671. value:
  3672. - log:
  3673. - acl
  3674. - edit
  3675. - user
  3676. - user_acl:
  3677. - spam_alias
  3678. - tls_policy
  3679. - spam_score
  3680. - spam_policy
  3681. - delimiter_action
  3682. - syncjobs
  3683. - eas_reset
  3684. - quarantine
  3685. - sogo_profile_reset
  3686. - quarantine_attachments
  3687. - quarantine_notification
  3688. - app_passwds
  3689. - pushover
  3690. username:
  3691. - info@domain.tld
  3692. msg:
  3693. - acl_saved
  3694. - info@domain.tld
  3695. type: success
  3696. schema:
  3697. properties:
  3698. log:
  3699. description: contains request object
  3700. items: {}
  3701. type: array
  3702. msg:
  3703. items: {}
  3704. type: array
  3705. type:
  3706. enum:
  3707. - success
  3708. - danger
  3709. - error
  3710. type: string
  3711. type: object
  3712. description: OK
  3713. headers: {}
  3714. tags:
  3715. - Mailboxes
  3716. description: Using this endpoints its possible to update the ACL's for mailboxes
  3717. operationId: Update mailbox ACL
  3718. requestBody:
  3719. content:
  3720. application/json:
  3721. schema:
  3722. example:
  3723. attr:
  3724. user_acl:
  3725. - spam_alias
  3726. - tls_policy
  3727. - spam_score
  3728. - spam_policy
  3729. - delimiter_action
  3730. - syncjobs
  3731. - eas_reset
  3732. - quarantine
  3733. - sogo_profile_reset
  3734. - quarantine_attachments
  3735. - quarantine_notification
  3736. - app_passwds
  3737. - pushover
  3738. items: info@domain.tld
  3739. properties:
  3740. attr:
  3741. properties:
  3742. user_acl:
  3743. description: contains a list of active user acls
  3744. type: object
  3745. type: object
  3746. items:
  3747. description: contains list of mailboxes you want to delete
  3748. type: object
  3749. type: object
  3750. summary: Update mailbox ACL
  3751. "/api/v1/get/alias/{id}":
  3752. get:
  3753. parameters:
  3754. - description: id of entry you want to get
  3755. example: all
  3756. in: path
  3757. name: id
  3758. required: true
  3759. schema:
  3760. enum:
  3761. - all
  3762. - "1"
  3763. - "2"
  3764. - "5"
  3765. - "10"
  3766. type: string
  3767. - description: e.g. api-key-string
  3768. example: api-key-string
  3769. in: header
  3770. name: X-API-Key
  3771. required: false
  3772. schema:
  3773. type: string
  3774. responses:
  3775. "401":
  3776. $ref: "#/components/responses/Unauthorized"
  3777. "200":
  3778. content:
  3779. application/json:
  3780. examples:
  3781. response:
  3782. value:
  3783. - active: "1"
  3784. address: alias@domain.tld
  3785. created: "2019-04-04 19:29:49"
  3786. domain: domain.tld
  3787. goto: destination@domain.tld
  3788. id: 6
  3789. in_primary_domain: ""
  3790. is_catch_all: 0
  3791. modified: null
  3792. private_comment: null
  3793. public_comment: null
  3794. - active: "1"
  3795. address: "@domain.tld"
  3796. created: "2019-04-27 13:42:39"
  3797. domain: domain.tld
  3798. goto: destination@domain.tld
  3799. id: 10
  3800. in_primary_domain: ""
  3801. is_catch_all: 1
  3802. modified: null
  3803. private_comment: null
  3804. public_comment: null
  3805. description: OK
  3806. headers: {}
  3807. tags:
  3808. - Aliases
  3809. description: You can list mailbox aliases existing in system.
  3810. operationId: Get aliases
  3811. summary: Get aliases
  3812. "/api/v1/get/time_limited_aliases/{mailbox}":
  3813. get:
  3814. parameters:
  3815. - description: mailbox you want to get aliasses from
  3816. example: domain.tld
  3817. in: path
  3818. schema:
  3819. type: string
  3820. name: mailbox
  3821. required: true
  3822. - description: e.g. api-key-string
  3823. example: api-key-string
  3824. in: header
  3825. name: X-API-Key
  3826. required: false
  3827. schema:
  3828. type: string
  3829. responses:
  3830. "401":
  3831. $ref: "#/components/responses/Unauthorized"
  3832. "200":
  3833. content:
  3834. application/json:
  3835. examples:
  3836. response:
  3837. value:
  3838. - address: alias@domain.tld
  3839. goto: destination@domain.tld
  3840. validity: 1668251246
  3841. created: "2021-11-12 12:07:26"
  3842. modified: null
  3843. description: OK
  3844. headers: {}
  3845. tags:
  3846. - Aliases
  3847. description: You can list time limited mailbox aliases existing in system.
  3848. operationId: Get time limited aliases
  3849. summary: Get time limited aliases
  3850. "/api/v1/get/app-passwd/all/{mailbox}":
  3851. get:
  3852. parameters:
  3853. - description: mailbox of entry you want to get
  3854. example: hello@mailcow.email
  3855. in: path
  3856. name: mailbox
  3857. required: true
  3858. schema:
  3859. enum:
  3860. - hello@mailcow.email
  3861. type: string
  3862. - description: e.g. api-key-string
  3863. example: api-key-string
  3864. in: header
  3865. name: X-API-Key
  3866. required: false
  3867. schema:
  3868. type: string
  3869. responses:
  3870. "401":
  3871. $ref: "#/components/responses/Unauthorized"
  3872. "200":
  3873. content:
  3874. application/json:
  3875. examples:
  3876. response:
  3877. value:
  3878. - active: "1"
  3879. created: "2019-12-21 16:04:55"
  3880. domain: mailcow.email
  3881. id: 2
  3882. mailbox: hello@mailcow.email
  3883. modified: null
  3884. name: emclient
  3885. description: OK
  3886. headers: {}
  3887. tags:
  3888. - App Passwords
  3889. description: >-
  3890. Using this endpoint you can get all app passwords from a specific
  3891. mailbox.
  3892. operationId: Get App Password
  3893. summary: Get App Password
  3894. "/api/v1/get/bcc/{id}":
  3895. get:
  3896. parameters:
  3897. - description: id of entry you want to get
  3898. example: all
  3899. in: path
  3900. name: id
  3901. required: true
  3902. schema:
  3903. enum:
  3904. - all
  3905. - "1"
  3906. - "2"
  3907. - "5"
  3908. - "10"
  3909. type: string
  3910. - description: e.g. api-key-string
  3911. example: api-key-string
  3912. in: header
  3913. name: X-API-Key
  3914. required: false
  3915. schema:
  3916. type: string
  3917. responses:
  3918. "401":
  3919. $ref: "#/components/responses/Unauthorized"
  3920. "200":
  3921. content:
  3922. application/json:
  3923. examples:
  3924. response:
  3925. value:
  3926. - active: "1"
  3927. bcc_dest: bcc@awesomecow.tld
  3928. created: "2019-10-02 21:44:34"
  3929. domain: mailcow.tld
  3930. id: 3
  3931. local_dest: "@mailcow.tld"
  3932. modified: null
  3933. type: sender
  3934. description: OK
  3935. headers: {}
  3936. tags:
  3937. - Address Rewriting
  3938. description: Using this endpoint you can get all BCC maps.
  3939. operationId: Get BCC Map
  3940. summary: Get BCC Map
  3941. "/api/v1/get/dkim/{domain}":
  3942. get:
  3943. parameters:
  3944. - description: name of domain
  3945. in: path
  3946. name: domain
  3947. required: true
  3948. schema:
  3949. type: string
  3950. - description: e.g. api-key-string
  3951. example: api-key-string
  3952. in: header
  3953. name: X-API-Key
  3954. required: false
  3955. schema:
  3956. type: string
  3957. responses:
  3958. "401":
  3959. $ref: "#/components/responses/Unauthorized"
  3960. "200":
  3961. content:
  3962. application/json:
  3963. examples:
  3964. response:
  3965. value:
  3966. dkim_selector: dkim
  3967. dkim_txt: >-
  3968. v=DKIM1;k=rsa;t=s;s=email;p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA21tUSjyasQy/hJmVjPnlRGfzx6TPhYj8mXY9DVOzSAE64Gddw/GnE/GcCR6WXNT23u9q4zPnz1IPoNt5kFOps8vg/iNqrcH++494noaZuYyFPPFnebkfryO4EvEyxC/c66qts+gnOUml+M8uv5WObBJld2gG12jLwFM0263J/N6J8LuUsaXOB2uCIfx8Nf4zjuJ6Ieez2uyHNK5dXjDLfKA4mTr+EEK6W6e34M4KN1liWM6r9Oy5S1FlLrD42VpURxxBZtBiEtaJPEKSQuk6GQz8ihu7W20Yr53tyCdaORu8dhxXVUWVf+GjuuMEdAmQCjYkarXdYCrt56Psw703kwIDAQAB
  3969. length: "2048"
  3970. privkey: ""
  3971. pubkey: >-
  3972. MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA21tUSjyasQy/hJmVjPnlRGfzx6TPhYj8mXY9DVOzSAE64Gddw/GnE/GcCR6WXNT23u9q4zPnz1IPoNt5kFOps8vg/iNqrcH++494noaZuYyFPPFnebkfryO4EvEyxC/c66qts+gnOUml+M8uv5WObBJld2gG12jLwFM0263J/N6J8LuUsaXOB2uCIfx8Nf4zjuJ6Ieez2uyHNK5dXjDLfKA4mTr+EEK6W6e34M4KN1liWM6r9Oy5S1FlLrD42VpURxxBZtBiEtaJPEKSQuk6GQz8ihu7W20Yr53tyCdaORu8dhxXVUWVf+GjuuMEdAmQCjYkarXdYCrt56Psw703kwIDAQAB
  3973. description: OK
  3974. headers: {}
  3975. tags:
  3976. - DKIM
  3977. description: >-
  3978. Using this endpoint you can get the DKIM public key for a specific
  3979. domain.
  3980. operationId: Get DKIM Key
  3981. summary: Get DKIM Key
  3982. /api/v1/get/domain-admin/all:
  3983. get:
  3984. responses:
  3985. "401":
  3986. $ref: "#/components/responses/Unauthorized"
  3987. "200":
  3988. content:
  3989. application/json:
  3990. examples:
  3991. response:
  3992. value:
  3993. - active: "1"
  3994. created: "2019-10-02 10:29:41"
  3995. selected_domains:
  3996. - mailcow.tld
  3997. tfa_active: "0"
  3998. unselected_domains:
  3999. - awesomemailcow.de
  4000. - mailcowisgreat.de
  4001. username: testadmin
  4002. description: OK
  4003. headers: {}
  4004. tags:
  4005. - Domain admin
  4006. description: ""
  4007. operationId: Get Domain Admins
  4008. summary: Get Domain Admins
  4009. "/api/v1/get/domain/{id}":
  4010. get:
  4011. parameters:
  4012. - description: id of entry you want to get
  4013. example: all
  4014. in: path
  4015. name: id
  4016. required: true
  4017. schema:
  4018. enum:
  4019. - all
  4020. - mailcow.tld
  4021. type: string
  4022. - description: comma seperated list of tags to filter by
  4023. example: "tag1,tag2"
  4024. in: query
  4025. name: tags
  4026. required: false
  4027. schema:
  4028. type: string
  4029. - description: e.g. api-key-string
  4030. example: api-key-string
  4031. in: header
  4032. name: X-API-Key
  4033. required: false
  4034. schema:
  4035. type: string
  4036. responses:
  4037. "401":
  4038. $ref: "#/components/responses/Unauthorized"
  4039. "200":
  4040. content:
  4041. application/json:
  4042. examples:
  4043. response:
  4044. value:
  4045. - active: "1"
  4046. aliases_in_domain: 0
  4047. aliases_left: 400
  4048. backupmx: "0"
  4049. bytes_total: "5076666944"
  4050. def_new_mailbox_quota: 3221225472
  4051. def_quota_for_mbox: 3221225472
  4052. description: Some description
  4053. domain_name: domain.tld
  4054. gal: "0"
  4055. max_new_mailbox_quota: 10737418240
  4056. max_num_aliases_for_domain: 400
  4057. max_num_mboxes_for_domain: 10
  4058. max_quota_for_domain: 10737418240
  4059. max_quota_for_mbox: 10737418240
  4060. mboxes_in_domain: 0
  4061. mboxes_left: 10
  4062. msgs_total: "172440"
  4063. quota_used_in_domain: "0"
  4064. relay_all_recipients: "0"
  4065. relayhost: "0"
  4066. rl: false
  4067. tags: ["tag1", "tag2"]
  4068. - active: "1"
  4069. aliases_in_domain: 0
  4070. aliases_left: 400
  4071. backupmx: "1"
  4072. bytes_total: "5076666944"
  4073. def_new_mailbox_quota: 3221225472
  4074. def_quota_for_mbox: 3221225472
  4075. description: domain description
  4076. domain_name: domain2.tld
  4077. gal: "0"
  4078. max_new_mailbox_quota: 10737418240
  4079. max_num_aliases_for_domain: 400
  4080. max_num_mboxes_for_domain: 10
  4081. max_quota_for_domain: 10737418240
  4082. max_quota_for_mbox: 10737418240
  4083. mboxes_in_domain: 0
  4084. mboxes_left: 10
  4085. msgs_total: "172440"
  4086. quota_used_in_domain: "0"
  4087. relay_all_recipients: "0"
  4088. relayhost: "0"
  4089. rl: false
  4090. tags: ["tag3", "tag4"]
  4091. description: OK
  4092. headers: {}
  4093. tags:
  4094. - Domains
  4095. description: You can list all domains existing in system.
  4096. operationId: Get domains
  4097. summary: Get domains
  4098. /api/v1/get/fail2ban:
  4099. get:
  4100. responses:
  4101. "401":
  4102. $ref: "#/components/responses/Unauthorized"
  4103. "200":
  4104. content:
  4105. application/json:
  4106. examples:
  4107. response:
  4108. value:
  4109. ban_time: 604800
  4110. ban_time_increment: 1
  4111. blacklist: |-
  4112. 45.82.153.37/32
  4113. 92.118.38.52/32
  4114. max_attempts: 1
  4115. max_ban_time: 604800
  4116. netban_ipv4: 32
  4117. netban_ipv6: 128
  4118. perm_bans:
  4119. - 45.82.153.37/32
  4120. - 92.118.38.52/32
  4121. retry_window: 7200
  4122. whitelist: 1.1.1.1
  4123. description: OK
  4124. headers: {}
  4125. tags:
  4126. - Fail2Ban
  4127. description: Gets the current Fail2Ban configuration.
  4128. operationId: Get Fail2Ban Config
  4129. summary: Get Fail2Ban Config
  4130. /api/v1/get/fwdhost/all:
  4131. get:
  4132. responses:
  4133. "401":
  4134. $ref: "#/components/responses/Unauthorized"
  4135. "200":
  4136. content:
  4137. application/json:
  4138. examples:
  4139. response:
  4140. value:
  4141. - host: 5.1.76.202
  4142. keep_spam: "yes"
  4143. source: hosted.mailcow.de
  4144. - host: "2a00:f820:417::202"
  4145. keep_spam: "yes"
  4146. source: hosted.mailcow.de
  4147. description: OK
  4148. headers: {}
  4149. tags:
  4150. - Fordwarding Hosts
  4151. description: You can list all Forwarding Hosts in your mailcow.
  4152. operationId: Get Forwarding Hosts
  4153. summary: Get Forwarding Hosts
  4154. "/api/v1/get/logs/acme/{count}":
  4155. get:
  4156. parameters:
  4157. - description: Number of logs to return
  4158. in: path
  4159. name: count
  4160. required: true
  4161. schema:
  4162. type: number
  4163. - description: e.g. api-key-string
  4164. example: api-key-string
  4165. in: header
  4166. name: X-API-Key
  4167. required: false
  4168. schema:
  4169. type: string
  4170. responses:
  4171. "401":
  4172. $ref: "#/components/responses/Unauthorized"
  4173. "200":
  4174. content:
  4175. application/json:
  4176. examples:
  4177. response:
  4178. value:
  4179. - message: >-
  4180. Certificate validation done, neither changed nor due for
  4181. renewal, sleeping for another day.
  4182. time: "1569927728"
  4183. description: OK
  4184. headers: {}
  4185. tags:
  4186. - Logs
  4187. description: >-
  4188. This Api endpoint lists all ACME logs from issued Lets Enctypts
  4189. certificates.
  4190. Tip: You can limit how many logs you want to get by using `/<count>` at
  4191. the end of the api url.
  4192. operationId: Get ACME logs
  4193. summary: Get ACME logs
  4194. "/api/v1/get/logs/api/{count}":
  4195. get:
  4196. parameters:
  4197. - description: Number of logs to return
  4198. in: path
  4199. name: count
  4200. required: true
  4201. schema:
  4202. type: number
  4203. - description: e.g. api-key-string
  4204. example: api-key-string
  4205. in: header
  4206. name: X-API-Key
  4207. required: false
  4208. schema:
  4209. type: string
  4210. responses:
  4211. "401":
  4212. $ref: "#/components/responses/Unauthorized"
  4213. "200":
  4214. content:
  4215. application/json:
  4216. examples:
  4217. response:
  4218. value:
  4219. - data: ""
  4220. method: GET
  4221. remote: 1.1.1.1
  4222. time: 1569939001
  4223. uri: /api/v1/get/logs/api/2
  4224. description: OK
  4225. headers: {}
  4226. tags:
  4227. - Logs
  4228. description: >-
  4229. This Api endpoint lists all Api logs.
  4230. Tip: You can limit how many logs you want to get by using `/<count>` at
  4231. the end of the api url.
  4232. operationId: Get Api logs
  4233. summary: Get Api logs
  4234. "/api/v1/get/logs/autodiscover/{count}":
  4235. get:
  4236. parameters:
  4237. - description: Number of logs to return
  4238. in: path
  4239. name: count
  4240. required: true
  4241. schema:
  4242. type: number
  4243. - description: e.g. api-key-string
  4244. example: api-key-string
  4245. in: header
  4246. name: X-API-Key
  4247. required: false
  4248. schema:
  4249. type: string
  4250. responses:
  4251. "401":
  4252. $ref: "#/components/responses/Unauthorized"
  4253. "200":
  4254. content:
  4255. application/json:
  4256. examples:
  4257. response:
  4258. value:
  4259. - service: activesync
  4260. time: 1569684212
  4261. ua: >-
  4262. Microsoft Office/16.0 (Windows NT 6.2; MAPICPL
  4263. 16.0.11328; Pro)
  4264. user: awesome@mailcow.de
  4265. description: OK
  4266. headers: {}
  4267. tags:
  4268. - Logs
  4269. description: >-
  4270. This Api endpoint lists all Autodiscover logs.
  4271. Tip: You can limit how many logs you want to get by using `/<count>` at
  4272. the end of the api url.
  4273. operationId: Get Autodiscover logs
  4274. summary: Get Autodiscover logs
  4275. "/api/v1/get/logs/dovecot/{count}":
  4276. get:
  4277. parameters:
  4278. - description: Number of logs to return
  4279. in: path
  4280. name: count
  4281. required: true
  4282. schema:
  4283. type: number
  4284. - description: e.g. api-key-string
  4285. example: api-key-string
  4286. in: header
  4287. name: X-API-Key
  4288. required: false
  4289. schema:
  4290. type: string
  4291. responses:
  4292. "401":
  4293. $ref: "#/components/responses/Unauthorized"
  4294. "200":
  4295. content:
  4296. application/json:
  4297. examples:
  4298. response:
  4299. value:
  4300. - message: >-
  4301. managesieve-login: Disconnected (no auth attempts in 0
  4302. secs): user=<>, rip=172.22.1.3, lip=172.22.1.250
  4303. priority: info
  4304. program: dovecot
  4305. time: "1569938740"
  4306. description: OK
  4307. headers: {}
  4308. tags:
  4309. - Logs
  4310. description: >-
  4311. This Api endpoint lists all Dovecot logs.
  4312. Tip: You can limit how many logs you want to get by using `/<count>` at
  4313. the end of the api url.
  4314. operationId: Get Dovecot logs
  4315. summary: Get Dovecot logs
  4316. "/api/v1/get/logs/netfilter/{count}":
  4317. get:
  4318. parameters:
  4319. - description: Number of logs to return
  4320. in: path
  4321. name: count
  4322. required: true
  4323. schema:
  4324. type: number
  4325. - description: e.g. api-key-string
  4326. example: api-key-string
  4327. in: header
  4328. name: X-API-Key
  4329. required: false
  4330. schema:
  4331. type: string
  4332. responses:
  4333. "401":
  4334. $ref: "#/components/responses/Unauthorized"
  4335. "200":
  4336. content:
  4337. application/json:
  4338. examples:
  4339. response:
  4340. value:
  4341. - message: "Whitelist was changed, it has 1 entries"
  4342. priority: info
  4343. time: 1569754911
  4344. - message: Add host/network 1.1.1.1/32 to blacklist
  4345. priority: crit
  4346. time: 1569754911
  4347. description: OK
  4348. headers: {}
  4349. tags:
  4350. - Logs
  4351. description: >-
  4352. This Api endpoint lists all Netfilter logs.
  4353. Tip: You can limit how many logs you want to get by using `/<count>` at
  4354. the end of the api url.
  4355. operationId: Get Netfilter logs
  4356. summary: Get Netfilter logs
  4357. "/api/v1/get/logs/postfix/{count}":
  4358. get:
  4359. parameters:
  4360. - description: Number of logs to return
  4361. in: path
  4362. name: count
  4363. required: true
  4364. schema:
  4365. type: number
  4366. - description: e.g. api-key-string
  4367. example: api-key-string
  4368. in: header
  4369. name: X-API-Key
  4370. required: false
  4371. schema:
  4372. type: string
  4373. responses:
  4374. "401":
  4375. $ref: "#/components/responses/Unauthorized"
  4376. "200":
  4377. content:
  4378. application/json:
  4379. examples:
  4380. response:
  4381. value:
  4382. - message: "EF1711500458: removed"
  4383. priority: info
  4384. program: postfix/qmgr
  4385. time: "1569937433"
  4386. description: OK
  4387. headers: {}
  4388. tags:
  4389. - Logs
  4390. description: >-
  4391. This Api endpoint lists all Postfix logs.
  4392. Tip: You can limit how many logs you want to get by using `/<count>` at
  4393. the end of the api url.
  4394. operationId: Get Postfix logs
  4395. summary: Get Postfix logs
  4396. "/api/v1/get/logs/ratelimited/{count}":
  4397. get:
  4398. parameters:
  4399. - description: Number of logs to return
  4400. in: path
  4401. name: count
  4402. required: true
  4403. schema:
  4404. type: number
  4405. - description: e.g. api-key-string
  4406. example: api-key-string
  4407. in: header
  4408. name: X-API-Key
  4409. required: false
  4410. schema:
  4411. type: string
  4412. responses:
  4413. "401":
  4414. $ref: "#/components/responses/Unauthorized"
  4415. "200":
  4416. content:
  4417. application/json:
  4418. examples:
  4419. response:
  4420. value:
  4421. - from: awesome@mailcow.email
  4422. header_from: '"Awesome" <awesome@mailcow.email>'
  4423. header_subject: Mailcow is amazing
  4424. ip: 172.22.1.248
  4425. message_id: 6a-5d892500-7-240abd80@90879116
  4426. qid: E3CF91500458
  4427. rcpt: hello@mailcow.email
  4428. rl_hash: RLsdz3tuabozgd4oacbdh8kc78
  4429. rl_info: mailcow(RLsdz3tuabozgd4oacbdh8kc78)
  4430. rl_name: mailcow
  4431. time: 1569269003
  4432. user: awesome@mailcow.email
  4433. description: OK
  4434. headers: {}
  4435. tags:
  4436. - Logs
  4437. description: >-
  4438. This Api endpoint lists all Ratelimit logs.
  4439. Tip: You can limit how many logs you want to get by using `/<count>` at
  4440. the end of the api url.
  4441. operationId: Get Ratelimit logs
  4442. summary: Get Ratelimit logs
  4443. "/api/v1/get/logs/rspamd-history/{count}":
  4444. get:
  4445. parameters:
  4446. - description: Number of logs to return
  4447. in: path
  4448. name: count
  4449. required: true
  4450. schema:
  4451. type: number
  4452. - description: e.g. api-key-string
  4453. example: api-key-string
  4454. in: header
  4455. name: X-API-Key
  4456. required: false
  4457. schema:
  4458. type: string
  4459. responses:
  4460. "401":
  4461. $ref: "#/components/responses/Unauthorized"
  4462. "200":
  4463. description: OK
  4464. headers: {}
  4465. tags:
  4466. - Logs
  4467. description: >-
  4468. This Api endpoint lists all Rspamd logs.
  4469. Tip: You can limit how many logs you want to get by using `/<count>` at
  4470. the end of the api url.
  4471. operationId: Get Rspamd logs
  4472. summary: Get Rspamd logs
  4473. "/api/v1/get/logs/sogo/{count}":
  4474. get:
  4475. parameters:
  4476. - description: Number of logs to return
  4477. in: path
  4478. name: count
  4479. required: true
  4480. schema:
  4481. type: number
  4482. - description: e.g. api-key-string
  4483. example: api-key-string
  4484. in: header
  4485. name: X-API-Key
  4486. required: false
  4487. schema:
  4488. type: string
  4489. responses:
  4490. "401":
  4491. $ref: "#/components/responses/Unauthorized"
  4492. "200":
  4493. content:
  4494. application/json:
  4495. examples:
  4496. response:
  4497. value:
  4498. - message: >-
  4499. [109]:
  4500. mailcowdockerized_watchdog-mailcow_1.mailcowdockerized_mailcow-network
  4501. "GET /SOGo.index/ HTTP/1.1" 200 2531/0 0.005 - - 0
  4502. priority: notice
  4503. program: sogod
  4504. time: "1569938874"
  4505. description: OK
  4506. headers: {}
  4507. tags:
  4508. - Logs
  4509. description: >-
  4510. This Api endpoint lists all SOGo logs.
  4511. Tip: You can limit how many logs you want to get by using `/<count>` at
  4512. the end of the api url.
  4513. operationId: Get SOGo logs
  4514. summary: Get SOGo logs
  4515. "/api/v1/get/logs/watchdog/{count}":
  4516. get:
  4517. parameters:
  4518. - description: Number of logs to return
  4519. in: path
  4520. name: count
  4521. required: true
  4522. schema:
  4523. type: number
  4524. - description: e.g. api-key-string
  4525. example: api-key-string
  4526. in: header
  4527. name: X-API-Key
  4528. required: false
  4529. schema:
  4530. type: string
  4531. responses:
  4532. "401":
  4533. $ref: "#/components/responses/Unauthorized"
  4534. "200":
  4535. content:
  4536. application/json:
  4537. examples:
  4538. response:
  4539. value:
  4540. - hpdiff: "0"
  4541. hpnow: "1"
  4542. hptotal: "1"
  4543. lvl: "100"
  4544. service: Fail2ban
  4545. time: "1569938958"
  4546. - hpdiff: "0"
  4547. hpnow: "5"
  4548. hptotal: "5"
  4549. lvl: "100"
  4550. service: Rspamd
  4551. time: "1569938956"
  4552. description: OK
  4553. headers: {}
  4554. tags:
  4555. - Logs
  4556. description: >-
  4557. This Api endpoint lists all Watchdog logs.
  4558. Tip: You can limit how many logs you want to get by using `/<count>` at
  4559. the end of the api url.
  4560. operationId: Get Watchdog logs
  4561. summary: Get Watchdog logs
  4562. "/api/v1/get/mailbox/{id}":
  4563. get:
  4564. parameters:
  4565. - description: id of entry you want to get
  4566. example: all
  4567. in: path
  4568. name: id
  4569. required: true
  4570. schema:
  4571. enum:
  4572. - all
  4573. - user@domain.tld
  4574. type: string
  4575. - description: comma seperated list of tags to filter by
  4576. example: "tag1,tag2"
  4577. in: query
  4578. name: tags
  4579. required: false
  4580. schema:
  4581. type: string
  4582. - description: e.g. api-key-string
  4583. example: api-key-string
  4584. in: header
  4585. name: X-API-Key
  4586. required: false
  4587. schema:
  4588. type: string
  4589. responses:
  4590. "401":
  4591. $ref: "#/components/responses/Unauthorized"
  4592. "200":
  4593. content:
  4594. application/json:
  4595. examples:
  4596. response:
  4597. value:
  4598. - active: "1"
  4599. attributes:
  4600. force_pw_update: "0"
  4601. mailbox_format: "maildir:"
  4602. quarantine_notification: never
  4603. sogo_access: "1"
  4604. tls_enforce_in: "0"
  4605. tls_enforce_out: "0"
  4606. domain: doman3.tld
  4607. is_relayed: 0
  4608. local_part: info
  4609. max_new_quota: 10737418240
  4610. messages: 0
  4611. name: Full name
  4612. percent_class: success
  4613. percent_in_use: 0
  4614. quota: 3221225472
  4615. quota_used: 0
  4616. rl: false
  4617. spam_aliases: 0
  4618. username: info@doman3.tld
  4619. tags: ["tag1", "tag2"]
  4620. description: OK
  4621. headers: {}
  4622. tags:
  4623. - Mailboxes
  4624. description: You can list all mailboxes existing in system.
  4625. operationId: Get mailboxes
  4626. summary: Get mailboxes
  4627. /api/v1/get/mailq/all:
  4628. get:
  4629. responses:
  4630. "401":
  4631. $ref: "#/components/responses/Unauthorized"
  4632. "200":
  4633. content:
  4634. application/json:
  4635. examples:
  4636. response:
  4637. value:
  4638. - arrival_time: 1570091234
  4639. message_size: 1848
  4640. queue_id: B98C6260CA1
  4641. queue_name: incoming
  4642. recipients:
  4643. - recipient@awesomecow.tld
  4644. sender: sender@mailcow.tld
  4645. description: OK
  4646. headers: {}
  4647. tags:
  4648. - Queue Manager
  4649. description: Get the current mail queue and everything it contains.
  4650. operationId: Get Queue
  4651. summary: Get Queue
  4652. "/api/v1/get/oauth2-client/{id}":
  4653. get:
  4654. parameters:
  4655. - description: id of entry you want to get
  4656. example: all
  4657. in: path
  4658. name: id
  4659. required: true
  4660. schema:
  4661. enum:
  4662. - all
  4663. - "1"
  4664. - "2"
  4665. - "5"
  4666. - "10"
  4667. type: string
  4668. - description: e.g. api-key-string
  4669. example: api-key-string
  4670. in: header
  4671. name: X-API-Key
  4672. required: false
  4673. schema:
  4674. type: string
  4675. responses:
  4676. "401":
  4677. $ref: "#/components/responses/Unauthorized"
  4678. "200":
  4679. content:
  4680. application/json:
  4681. examples:
  4682. response:
  4683. value:
  4684. - client_id: 17c76aaa88c0
  4685. client_secret: 73fc668a88147e32a31ff80c
  4686. grant_types: null
  4687. id: 1
  4688. redirect_uri: "https://mailcow.tld"
  4689. scope: profile
  4690. user_id: null
  4691. description: OK
  4692. headers: {}
  4693. tags:
  4694. - oAuth Clients
  4695. description: Using this endpoint you can get all oAuth clients.
  4696. operationId: Get oAuth Clients
  4697. summary: Get oAuth Clients
  4698. "/api/v1/get/policy_bl_domain/{domain}":
  4699. get:
  4700. parameters:
  4701. - description: name of domain
  4702. in: path
  4703. name: domain
  4704. required: true
  4705. schema:
  4706. type: string
  4707. - description: e.g. api-key-string
  4708. example: api-key-string
  4709. in: header
  4710. name: X-API-Key
  4711. required: false
  4712. schema:
  4713. type: string
  4714. responses:
  4715. "401":
  4716. $ref: "#/components/responses/Unauthorized"
  4717. "200":
  4718. content:
  4719. application/json:
  4720. examples:
  4721. response:
  4722. value:
  4723. - object: domain.tld
  4724. prefid: 2
  4725. value: "*@baddomain.tld"
  4726. description: OK
  4727. headers: {}
  4728. tags:
  4729. - Domain antispam policies
  4730. description: You can list all blacklist policies per domain.
  4731. operationId: List blacklist domain policy
  4732. summary: List blacklist domain policy
  4733. "/api/v1/get/policy_wl_domain/{domain}":
  4734. get:
  4735. parameters:
  4736. - description: name of domain
  4737. in: path
  4738. name: domain
  4739. required: true
  4740. schema:
  4741. type: string
  4742. - description: e.g. api-key-string
  4743. example: api-key-string
  4744. in: header
  4745. name: X-API-Key
  4746. required: false
  4747. schema:
  4748. type: string
  4749. responses:
  4750. "401":
  4751. $ref: "#/components/responses/Unauthorized"
  4752. "200":
  4753. content:
  4754. application/json:
  4755. examples:
  4756. response:
  4757. value:
  4758. - object: domain.tld
  4759. prefid: 1
  4760. value: "*@gooddomain.tld"
  4761. description: OK
  4762. headers: {}
  4763. tags:
  4764. - Domain antispam policies
  4765. description: You can list all whitelist policies per domain.
  4766. operationId: List whitelist domain policy
  4767. summary: List whitelist domain policy
  4768. /api/v1/get/quarantine/all:
  4769. get:
  4770. responses:
  4771. "401":
  4772. $ref: "#/components/responses/Unauthorized"
  4773. "200":
  4774. content:
  4775. application/json:
  4776. examples:
  4777. response:
  4778. value:
  4779. created: 1572688831
  4780. id: 33
  4781. notified: 1
  4782. qid: 8224615004C1
  4783. rcpt: admin@domain.tld
  4784. score: 15.48
  4785. sender: bounces@send.domain.tld
  4786. subject: mailcow is awesome
  4787. virus_flag: 0
  4788. description: OK
  4789. headers: {}
  4790. tags:
  4791. - Quarantine
  4792. description: Get all mails that are currently in Quarantine.
  4793. operationId: Get mails in Quarantine
  4794. summary: Get mails in Quarantine
  4795. "/api/v1/get/recipient_map/{id}":
  4796. get:
  4797. parameters:
  4798. - description: id of entry you want to get
  4799. example: all
  4800. in: path
  4801. name: id
  4802. required: true
  4803. schema:
  4804. enum:
  4805. - all
  4806. - "1"
  4807. - "2"
  4808. - "5"
  4809. - "10"
  4810. type: string
  4811. - description: e.g. api-key-string
  4812. example: api-key-string
  4813. in: header
  4814. name: X-API-Key
  4815. required: false
  4816. schema:
  4817. type: string
  4818. responses:
  4819. "401":
  4820. $ref: "#/components/responses/Unauthorized"
  4821. "200":
  4822. content:
  4823. application/json:
  4824. examples:
  4825. response:
  4826. value:
  4827. - active: "1"
  4828. created: "2019-10-02 22:06:29"
  4829. id: 3
  4830. modified: null
  4831. recipient_map_new: target@mailcow.tld
  4832. recipient_map_old: recipient@mailcow.tld
  4833. description: OK
  4834. headers: {}
  4835. tags:
  4836. - Address Rewriting
  4837. description: Using this endpoint you can get all recipient maps.
  4838. operationId: Get Recipient Map
  4839. summary: Get Recipient Map
  4840. "/api/v1/get/relayhost/{id}":
  4841. get:
  4842. parameters:
  4843. - description: id of entry you want to get
  4844. example: all
  4845. in: path
  4846. name: id
  4847. required: true
  4848. schema:
  4849. enum:
  4850. - all
  4851. - "1"
  4852. - "2"
  4853. - "5"
  4854. - "10"
  4855. type: string
  4856. - description: e.g. api-key-string
  4857. example: api-key-string
  4858. in: header
  4859. name: X-API-Key
  4860. required: false
  4861. schema:
  4862. type: string
  4863. responses:
  4864. "401":
  4865. $ref: "#/components/responses/Unauthorized"
  4866. "200":
  4867. content:
  4868. application/json:
  4869. examples:
  4870. response:
  4871. value:
  4872. - active: "1"
  4873. hostname: "mailcow.tld:25"
  4874. id: 1
  4875. password: supersecurepassword
  4876. password_short: tes...
  4877. used_by_domains: ""
  4878. username: testuser
  4879. description: OK
  4880. headers: {}
  4881. tags:
  4882. - Routing
  4883. description: Using this endpoint you can get all Sender-Dependent Transports.
  4884. operationId: Get Sender-Dependent Transports
  4885. summary: Get Sender-Dependent Transports
  4886. /api/v1/get/resource/all:
  4887. get:
  4888. responses:
  4889. "401":
  4890. $ref: "#/components/responses/Unauthorized"
  4891. "200":
  4892. content:
  4893. application/json:
  4894. examples:
  4895. response:
  4896. value:
  4897. - active: "1"
  4898. description: test
  4899. domain: mailcow.tld
  4900. kind: location
  4901. local_part: test
  4902. multiple_bookings: 0
  4903. name: test@mailcow.tld
  4904. description: OK
  4905. headers: {}
  4906. tags:
  4907. - Resources
  4908. description: Using this endpoint you can get all Resources.
  4909. operationId: Get Resources
  4910. summary: Get Resources
  4911. "/api/v1/get/rl-mbox/{mailbox}":
  4912. get:
  4913. parameters:
  4914. - description: name of mailbox or all
  4915. in: path
  4916. name: mailbox
  4917. required: true
  4918. schema:
  4919. type: string
  4920. - description: e.g. api-key-string
  4921. example: api-key-string
  4922. in: header
  4923. name: X-API-Key
  4924. required: false
  4925. schema:
  4926. type: string
  4927. responses:
  4928. "401":
  4929. $ref: "#/components/responses/Unauthorized"
  4930. "200":
  4931. content:
  4932. application/json:
  4933. examples:
  4934. response:
  4935. value:
  4936. - frame: s
  4937. mailbox: leon@mailcow.tld
  4938. value: "5"
  4939. - frame: s
  4940. mailbox: lisa@mailcow.tld
  4941. value: "3"
  4942. description: OK
  4943. headers: {}
  4944. tags:
  4945. - Ratelimits
  4946. description: >-
  4947. Using this endpoint you can get the ratelimits for a certain mailbox.
  4948. You can use all for all mailboxes.
  4949. operationId: Get mailbox ratelimits
  4950. summary: Get mailbox ratelimits
  4951. "/api/v1/get/rl-domain/{domain}":
  4952. get:
  4953. parameters:
  4954. - description: name of domain or all
  4955. in: path
  4956. name: domain
  4957. required: true
  4958. schema:
  4959. type: string
  4960. - description: e.g. api-key-string
  4961. example: api-key-string
  4962. in: header
  4963. name: X-API-Key
  4964. required: false
  4965. schema:
  4966. type: string
  4967. responses:
  4968. "401":
  4969. $ref: "#/components/responses/Unauthorized"
  4970. "200":
  4971. content:
  4972. application/json:
  4973. examples:
  4974. response:
  4975. value:
  4976. - frame: s
  4977. domain: domain.tld
  4978. value: "5"
  4979. - frame: s
  4980. mailbox: domain2.tld
  4981. value: "3"
  4982. description: OK
  4983. headers: {}
  4984. tags:
  4985. - Ratelimits
  4986. description: >-
  4987. Using this endpoint you can get the ratelimits for a certain domains.
  4988. You can use all for all domain.
  4989. operationId: Get domain ratelimits
  4990. summary: Get domain ratelimits
  4991. /api/v1/edit/rl-mbox/:
  4992. post:
  4993. responses:
  4994. "401":
  4995. $ref: "#/components/responses/Unauthorized"
  4996. "200":
  4997. content:
  4998. application/json:
  4999. examples:
  5000. response:
  5001. value:
  5002. - type: success
  5003. log:
  5004. - ratelimit
  5005. - edit
  5006. - mailbox
  5007. - object:
  5008. - info@domain.tld
  5009. rl_value: "10"
  5010. rl_frame: h
  5011. msg:
  5012. - rl_saved
  5013. - info@domain.tld
  5014. schema:
  5015. properties:
  5016. log:
  5017. description: contains request object
  5018. items: {}
  5019. type: array
  5020. msg:
  5021. items: {}
  5022. type: array
  5023. type:
  5024. enum:
  5025. - success
  5026. - danger
  5027. - error
  5028. type: string
  5029. type: object
  5030. description: OK
  5031. headers: {}
  5032. tags:
  5033. - Ratelimits
  5034. description: >-
  5035. Using this endpoint you can edit the ratelimits for a certain mailbox.
  5036. operationId: Edit mailbox ratelimits
  5037. requestBody:
  5038. content:
  5039. application/json:
  5040. schema:
  5041. example:
  5042. attr:
  5043. rl_value: "10"
  5044. rl_frame: "h"
  5045. items:
  5046. - info@domain.tld
  5047. properties:
  5048. attr:
  5049. properties:
  5050. rl_frame:
  5051. description: contains the frame for the ratelimit h,s,m
  5052. type: string
  5053. rl_value:
  5054. description: contains the rate for the ratelimit 10,20,50,1
  5055. type: number
  5056. type: object
  5057. items:
  5058. description: contains list of mailboxes you want to edit the ratelimit of
  5059. type: object
  5060. type: object
  5061. summary: Edit mailbox ratelimits
  5062. /api/v1/edit/rl-domain/:
  5063. post:
  5064. responses:
  5065. "401":
  5066. $ref: "#/components/responses/Unauthorized"
  5067. "200":
  5068. content:
  5069. application/json:
  5070. examples:
  5071. response:
  5072. value:
  5073. - type: success
  5074. - log:
  5075. - ratelimit
  5076. - edit
  5077. - domain
  5078. - object:
  5079. - domain.tld
  5080. rl_value: "50"
  5081. rl_frame: "h"
  5082. msg:
  5083. - rl_saved
  5084. - domain.tld
  5085. schema:
  5086. properties:
  5087. log:
  5088. description: contains request object
  5089. items: {}
  5090. type: array
  5091. msg:
  5092. items: {}
  5093. type: array
  5094. type:
  5095. enum:
  5096. - success
  5097. - danger
  5098. - error
  5099. type: string
  5100. type: object
  5101. description: OK
  5102. headers: {}
  5103. tags:
  5104. - Ratelimits
  5105. description: >-
  5106. Using this endpoint you can edit the ratelimits for a certain domains.
  5107. operationId: Edit domain ratelimits
  5108. requestBody:
  5109. content:
  5110. application/json:
  5111. schema:
  5112. example:
  5113. attr:
  5114. rl_value: "10"
  5115. rl_frame: "h"
  5116. items:
  5117. - domain.tld
  5118. properties:
  5119. attr:
  5120. properties:
  5121. rl_frame:
  5122. description: contains the frame for the ratelimit h,s,m
  5123. type: string
  5124. rl_value:
  5125. description: contains the rate for the ratelimit 10,20,50,1
  5126. type: number
  5127. type: object
  5128. items:
  5129. description: contains list of domains you want to edit the ratelimit of
  5130. type: object
  5131. type: object
  5132. summary: Edit domain ratelimits
  5133. /api/v1/get/status/containers:
  5134. get:
  5135. responses:
  5136. "401":
  5137. $ref: "#/components/responses/Unauthorized"
  5138. "200":
  5139. content:
  5140. application/json:
  5141. examples:
  5142. response:
  5143. value:
  5144. acme-mailcow:
  5145. container: acme-mailcow
  5146. image: "mailcow/acme:1.63"
  5147. started_at: "2019-12-22T21:00:08.270660275Z"
  5148. state: running
  5149. type: info
  5150. clamd-mailcow:
  5151. container: clamd-mailcow
  5152. image: "mailcow/clamd:1.35"
  5153. started_at: "2019-12-22T21:00:01.622856172Z"
  5154. state: running
  5155. type: info
  5156. dockerapi-mailcow:
  5157. container: dockerapi-mailcow
  5158. image: "mailcow/dockerapi:1.36"
  5159. started_at: "2019-12-22T20:59:59.984797808Z"
  5160. state: running
  5161. type: info
  5162. dovecot-mailcow:
  5163. container: dovecot-mailcow
  5164. image: "mailcow/dovecot:1.104"
  5165. started_at: "2019-12-22T21:00:08.988680259Z"
  5166. state: running
  5167. type: info
  5168. ipv6nat-mailcow:
  5169. container: ipv6nat-mailcow
  5170. image: robbertkl/ipv6nat
  5171. started_at: "2019-12-22T21:06:37.273225445Z"
  5172. state: running
  5173. type: info
  5174. memcached-mailcow:
  5175. container: memcached-mailcow
  5176. image: "memcached:alpine"
  5177. started_at: "2019-12-22T20:59:58.0907785Z"
  5178. state: running
  5179. type: info
  5180. mysql-mailcow:
  5181. container: mysql-mailcow
  5182. image: "mariadb:10.3"
  5183. started_at: "2019-12-22T21:00:02.201937528Z"
  5184. state: running
  5185. type: info
  5186. netfilter-mailcow:
  5187. container: netfilter-mailcow
  5188. image: "mailcow/netfilter:1.31"
  5189. started_at: "2019-12-22T21:00:09.851559297Z"
  5190. state: running
  5191. type: info
  5192. nginx-mailcow:
  5193. container: nginx-mailcow
  5194. image: "nginx:mainline-alpine"
  5195. started_at: "2019-12-22T21:00:12.9843038Z"
  5196. state: running
  5197. type: info
  5198. olefy-mailcow:
  5199. container: olefy-mailcow
  5200. image: "mailcow/olefy:1.2"
  5201. started_at: "2019-12-22T20:59:59.676259274Z"
  5202. state: running
  5203. type: info
  5204. php-fpm-mailcow:
  5205. container: php-fpm-mailcow
  5206. image: "mailcow/phpfpm:1.55"
  5207. started_at: "2019-12-22T21:00:00.955808957Z"
  5208. state: running
  5209. type: info
  5210. postfix-mailcow:
  5211. container: postfix-mailcow
  5212. image: "mailcow/postfix:1.44"
  5213. started_at: "2019-12-22T21:00:07.186717617Z"
  5214. state: running
  5215. type: info
  5216. redis-mailcow:
  5217. container: redis-mailcow
  5218. image: "redis:5-alpine"
  5219. started_at: "2019-12-22T20:59:56.827166834Z"
  5220. state: running
  5221. type: info
  5222. rspamd-mailcow:
  5223. container: rspamd-mailcow
  5224. image: "mailcow/rspamd:1.56"
  5225. started_at: "2019-12-22T21:00:12.456075355Z"
  5226. state: running
  5227. type: info
  5228. sogo-mailcow:
  5229. container: sogo-mailcow
  5230. image: "mailcow/sogo:1.65"
  5231. started_at: "2019-12-22T20:59:58.382274592Z"
  5232. state: running
  5233. type: info
  5234. solr-mailcow:
  5235. container: solr-mailcow
  5236. image: "mailcow/solr:1.7"
  5237. started_at: "2019-12-22T20:59:59.635413798Z"
  5238. state: running
  5239. type: info
  5240. unbound-mailcow:
  5241. container: unbound-mailcow
  5242. image: "mailcow/unbound:1.10"
  5243. started_at: "2019-12-22T20:59:58.760595825Z"
  5244. state: running
  5245. type: info
  5246. watchdog-mailcow:
  5247. container: watchdog-mailcow
  5248. image: "mailcow/watchdog:1.65"
  5249. started_at: "2019-12-22T20:59:56.028660382Z"
  5250. state: running
  5251. type: info
  5252. description: OK
  5253. headers: {}
  5254. tags:
  5255. - Status
  5256. description: >-
  5257. Using this endpoint you can get the status of all containers and when
  5258. hey where started and a few other details.
  5259. operationId: Get container status
  5260. summary: Get container status
  5261. /api/v1/get/status/solr:
  5262. get:
  5263. responses:
  5264. "401":
  5265. $ref: "#/components/responses/Unauthorized"
  5266. "200":
  5267. content:
  5268. application/json:
  5269. examples:
  5270. response:
  5271. value:
  5272. solr_documents: null
  5273. solr_enabled: false
  5274. solr_size: null
  5275. type: info
  5276. description: OK
  5277. headers: {}
  5278. tags:
  5279. - Status
  5280. description: >-
  5281. Using this endpoint you can get the status of all containers and when
  5282. hey where started and a few other details.
  5283. operationId: Get solr status
  5284. summary: Get solr status
  5285. /api/v1/get/status/vmail:
  5286. get:
  5287. responses:
  5288. "401":
  5289. $ref: "#/components/responses/Unauthorized"
  5290. "200":
  5291. content:
  5292. application/json:
  5293. examples:
  5294. response:
  5295. value:
  5296. disk: /dev/mapper/mail--vg-root
  5297. total: 41G
  5298. type: info
  5299. used: 11G
  5300. used_percent: 28%
  5301. description: OK
  5302. headers: {}
  5303. tags:
  5304. - Status
  5305. description: >-
  5306. Using this endpoint you can get the status of the vmail and the amount
  5307. of used storage.
  5308. operationId: Get vmail status
  5309. summary: Get vmail status
  5310. /api/v1/get/status/version:
  5311. get:
  5312. responses:
  5313. "401":
  5314. $ref: "#/components/responses/Unauthorized"
  5315. "200":
  5316. content:
  5317. application/json:
  5318. examples:
  5319. response:
  5320. value:
  5321. version: "2022-04"
  5322. description: OK
  5323. headers: {}
  5324. tags:
  5325. - Status
  5326. description: >-
  5327. Using this endpoint you can get the current running release of this
  5328. instance.
  5329. operationId: Get version status
  5330. summary: Get version status
  5331. /api/v1/get/syncjobs/all/no_log:
  5332. get:
  5333. responses:
  5334. "401":
  5335. $ref: "#/components/responses/Unauthorized"
  5336. "200":
  5337. content:
  5338. application/json:
  5339. examples:
  5340. response:
  5341. value:
  5342. - active: "1"
  5343. authmd51: 0
  5344. authmech1: PLAIN
  5345. automap: 1
  5346. created: "2019-05-22 11:37:25"
  5347. custom_params: ""
  5348. delete1: 0
  5349. delete2: 0
  5350. delete2duplicates: 1
  5351. domain2: ""
  5352. enc1: TLS
  5353. exclude: (?i)spam|(?i)junk
  5354. host1: imap.server.tld
  5355. id: 1
  5356. is_running: 0
  5357. last_run: "2019-05-22 11:40:02"
  5358. log: ""
  5359. maxage: 0
  5360. maxbytespersecond: "0"
  5361. mins_interval: "20"
  5362. modified: "2019-05-22 11:40:02"
  5363. port1: 993
  5364. regextrans2: ""
  5365. skipcrossduplicates: 0
  5366. subfolder2: External
  5367. subscribeall: 1
  5368. timeout1: 600
  5369. timeout2: 600
  5370. user1: username
  5371. user2: mailbox@domain.tld
  5372. description: OK
  5373. headers: {}
  5374. tags:
  5375. - Sync jobs
  5376. description: You can list all syn jobs existing in system.
  5377. operationId: Get sync jobs
  5378. summary: Get sync jobs
  5379. "/api/v1/get/tls-policy-map/{id}":
  5380. get:
  5381. parameters:
  5382. - description: id of entry you want to get
  5383. example: all
  5384. in: path
  5385. name: id
  5386. required: true
  5387. schema:
  5388. enum:
  5389. - all
  5390. - "1"
  5391. - "2"
  5392. - "5"
  5393. - "10"
  5394. type: string
  5395. - description: e.g. api-key-string
  5396. example: api-key-string
  5397. in: header
  5398. name: X-API-Key
  5399. required: false
  5400. schema:
  5401. type: string
  5402. responses:
  5403. "401":
  5404. $ref: "#/components/responses/Unauthorized"
  5405. "200":
  5406. content:
  5407. application/json:
  5408. examples:
  5409. response:
  5410. value:
  5411. - parameters: ""
  5412. active: "1"
  5413. created: "2019-10-03 08:42:12"
  5414. dest: mailcow.tld
  5415. id: 1
  5416. modified: null
  5417. policy: encrypt
  5418. description: OK
  5419. headers: {}
  5420. tags:
  5421. - Outgoing TLS Policy Map Overrides
  5422. description: Using this endpoint you can get all TLS policy map override maps.
  5423. operationId: Get TLS Policy Map
  5424. summary: Get TLS Policy Map
  5425. "/api/v1/get/transport/{id}":
  5426. get:
  5427. parameters:
  5428. - description: id of entry you want to get
  5429. example: all
  5430. in: path
  5431. name: id
  5432. required: true
  5433. schema:
  5434. enum:
  5435. - all
  5436. - "1"
  5437. - "2"
  5438. - "5"
  5439. - "10"
  5440. type: string
  5441. - description: e.g. api-key-string
  5442. example: api-key-string
  5443. in: header
  5444. name: X-API-Key
  5445. required: false
  5446. schema:
  5447. type: string
  5448. responses:
  5449. "401":
  5450. $ref: "#/components/responses/Unauthorized"
  5451. "200":
  5452. content:
  5453. application/json:
  5454. examples:
  5455. response:
  5456. value:
  5457. - active: "1"
  5458. destination: example.org
  5459. id: 1
  5460. lookup_mx: "0"
  5461. nexthop: "host:25"
  5462. password: supersecurepw
  5463. password_short: sup...
  5464. username: testuser
  5465. description: OK
  5466. headers: {}
  5467. tags:
  5468. - Routing
  5469. description: Using this endpoint you can get all Transport Maps.
  5470. operationId: Get Transport Maps
  5471. summary: Get Transport Maps
  5472. /api/v1/edit/spam-score/:
  5473. post:
  5474. responses:
  5475. "401":
  5476. $ref: "#/components/responses/Unauthorized"
  5477. "200":
  5478. content:
  5479. application/json:
  5480. examples:
  5481. response:
  5482. value:
  5483. - type: success
  5484. log:
  5485. - mailbox
  5486. - edit
  5487. - spam_score
  5488. - username:
  5489. - info@domain.tld
  5490. spam_score: "8,15"
  5491. msg:
  5492. - mailbox_modified
  5493. - info@domain.tld
  5494. schema:
  5495. properties:
  5496. log:
  5497. description: contains request object
  5498. items: {}
  5499. type: array
  5500. msg:
  5501. items: {}
  5502. type: array
  5503. type:
  5504. enum:
  5505. - success
  5506. - danger
  5507. - error
  5508. type: string
  5509. type: object
  5510. description: OK
  5511. headers: {}
  5512. tags:
  5513. - Mailboxes
  5514. description: >-
  5515. Using this endpoint you can edit the spam filter score for a certain mailbox.
  5516. operationId: Edit mailbox spam filter score
  5517. requestBody:
  5518. content:
  5519. application/json:
  5520. schema:
  5521. example:
  5522. - items:
  5523. - info@domain.tld
  5524. attr:
  5525. spam_score: "8,15"
  5526. summary: Edit mailbox spam filter score
  5527. "/api/v1/get/mailbox/all/{domain}":
  5528. get:
  5529. parameters:
  5530. - description: name of domain
  5531. in: path
  5532. name: domain
  5533. required: false
  5534. schema:
  5535. type: string
  5536. - description: e.g. api-key-string
  5537. example: api-key-string
  5538. in: header
  5539. name: X-API-Key
  5540. required: false
  5541. schema:
  5542. type: string
  5543. responses:
  5544. "401":
  5545. $ref: "#/components/responses/Unauthorized"
  5546. "200":
  5547. content:
  5548. application/json:
  5549. examples:
  5550. response:
  5551. value:
  5552. - active: "1"
  5553. attributes:
  5554. force_pw_update: "0"
  5555. mailbox_format: "maildir:"
  5556. quarantine_notification: never
  5557. sogo_access: "1"
  5558. tls_enforce_in: "0"
  5559. tls_enforce_out: "0"
  5560. domain: domain3.tld
  5561. is_relayed: 0
  5562. local_part: info
  5563. max_new_quota: 10737418240
  5564. messages: 0
  5565. name: Full name
  5566. percent_class: success
  5567. percent_in_use: 0
  5568. quota: 3221225472
  5569. quota_used: 0
  5570. rl: false
  5571. spam_aliases: 0
  5572. username: info@domain3.tld
  5573. tags: ["tag1", "tag2"]
  5574. description: OK
  5575. headers: {}
  5576. tags:
  5577. - Mailboxes
  5578. description: You can list all mailboxes existing in system for a specific domain.
  5579. operationId: Get mailboxes of a domain
  5580. summary: Get mailboxes of a domain
  5581. /api/v1/edit/cors:
  5582. post:
  5583. responses:
  5584. "401":
  5585. $ref: "#/components/responses/Unauthorized"
  5586. "200":
  5587. content:
  5588. application/json:
  5589. examples:
  5590. response:
  5591. value:
  5592. - type: "success"
  5593. log: ["cors", "edit", {"allowed_origins": ["*", "mail.mailcow.tld"], "allowed_methods": ["POST", "GET", "DELETE", "PUT"]}]
  5594. msg: "cors_headers_edited"
  5595. description: OK
  5596. headers: { }
  5597. tags:
  5598. - Cross-Origin Resource Sharing (CORS)
  5599. description: >-
  5600. This endpoint allows you to manage Cross-Origin Resource Sharing (CORS) settings for the API.
  5601. CORS is a security feature implemented by web browsers to prevent unauthorized cross-origin requests.
  5602. By editing the CORS settings, you can specify which domains and which methods are permitted to access the API resources from outside the mailcow domain.
  5603. operationId: Edit Cross-Origin Resource Sharing (CORS) settings
  5604. requestBody:
  5605. content:
  5606. application/json:
  5607. schema:
  5608. example:
  5609. attr:
  5610. allowed_origins: ["*", "mail.mailcow.tld"]
  5611. allowed_methods: ["POST", "GET", "DELETE", "PUT"]
  5612. properties:
  5613. attr:
  5614. type: object
  5615. properties:
  5616. allowed_origins:
  5617. type: array
  5618. items:
  5619. type: string
  5620. allowed_methods:
  5621. type: array
  5622. items:
  5623. type: string
  5624. summary: Edit Cross-Origin Resource Sharing (CORS) settings
  5625. "/api/v1/get/spam-score/{mailbox}":
  5626. get:
  5627. parameters:
  5628. - description: name of mailbox or empty for current user - admin user will retrieve the global spam filter score
  5629. in: path
  5630. name: mailbox
  5631. required: true
  5632. schema:
  5633. type: string
  5634. - description: e.g. api-key-string
  5635. example: api-key-string
  5636. in: header
  5637. name: X-API-Key
  5638. required: false
  5639. schema:
  5640. type: string
  5641. responses:
  5642. "401":
  5643. $ref: "#/components/responses/Unauthorized"
  5644. "200":
  5645. content:
  5646. application/json:
  5647. examples:
  5648. response:
  5649. value:
  5650. spam_score: "8,15"
  5651. description: OK
  5652. headers: {}
  5653. tags:
  5654. - Mailboxes
  5655. description: >-
  5656. Using this endpoint you can get the global spam filter score or the spam filter score of a certain mailbox.
  5657. operationId: Get mailbox or global spam filter score
  5658. summary: Get mailbox or global spam filter score
  5659. tags:
  5660. - name: Domains
  5661. description: You can create antispam whitelist and blacklist policies
  5662. - name: Domain antispam policies
  5663. description: You can edit the Domain Antispam policies
  5664. - name: Mailboxes
  5665. description: You can manage mailboxes
  5666. - name: Aliases
  5667. description: You can manage aliases
  5668. - name: Sync jobs
  5669. description: Using Syncjobs you can sync your mails with other email servers
  5670. - name: Fordwarding Hosts
  5671. description: Forwarding Hosts enable you to send mail using a relay
  5672. - name: Logs
  5673. description: Get all mailcow system logs
  5674. - name: Queue Manager
  5675. description: Manage the postfix mail queue
  5676. - name: Quarantine
  5677. description: Check what emails went to quarantine
  5678. - name: Fail2Ban
  5679. description: Manage the Netfilter fail2ban options
  5680. - name: DKIM
  5681. description: Manage DKIM keys
  5682. - name: Domain admin
  5683. description: Create or udpdate domain admin users
  5684. - name: Single Sign-On
  5685. description: Issue tokens for users
  5686. - name: Address Rewriting
  5687. description: Create BCC maps or recipient maps
  5688. - name: Outgoing TLS Policy Map Overrides
  5689. description: Force global TLS policys
  5690. - name: oAuth Clients
  5691. description: Use mailcow as a oAuth server
  5692. - name: Routing
  5693. description: Define your own email routes
  5694. - name: Resources
  5695. description: Manage ressources
  5696. - name: App Passwords
  5697. description: Create mailbox app passwords
  5698. - name: Status
  5699. description: Get the status of your cow
  5700. - name: Ratelimits
  5701. description: Edit domain ratelimits
  5702. - name: Cross-Origin Resource Sharing (CORS)
  5703. description: Manage Cross-Origin Resource Sharing (CORS) settings