{"id":2856,"date":"2025-06-18T16:29:46","date_gmt":"2025-06-18T16:29:46","guid":{"rendered":"https:\/\/pheonixsolutions.com\/knowledge-base\/?p=2856"},"modified":"2025-06-18T16:30:27","modified_gmt":"2025-06-18T16:30:27","slug":"how-to-create-an-email-account-via-cpanel-cli-uapi","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/06\/18\/how-to-create-an-email-account-via-cpanel-cli-uapi\/","title":{"rendered":"How to Create an Email Account via cPanel CLI (UAPI)"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Introduction<\/h3>\n\n\n\n<p>Managing email accounts via the command line can significantly streamline server administration tasks. cPanel provides a powerful API called UAPI, which allows administrators to create email accounts without using the cPanel web interface. This method is ideal for automation, scripting, or simply performing actions more efficiently through SSH.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Prerequisites<\/h3>\n\n\n\n<p>(i) Root SSH access to the cPanel server<\/p>\n\n\n\n<p>(ii) cPanel user already exists<\/p>\n\n\n\n<p>(iii) Domain name already added to the cPanel account<\/p>\n\n\n\n<p>(iv) cPanel version 11.42+ (UAPI support)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Implementation<\/h2>\n\n\n\n<p>Step 1: Log in as root or a privileged user:<\/p>\n\n\n\n<p>$ ssh root@your-server-ip<\/p>\n\n\n\n<p>Step 2: Identify the cPanel Username<\/p>\n\n\n\n<p>$ grep &#8216;DOMAIN&#8217; \/var\/cpanel\/users\/*<\/p>\n\n\n\n<p>Replace  Domain with the actual domain. It will show the cPanel user.<\/p>\n\n\n\n<p>Step3: Run the UAPI Command<\/p>\n\n\n\n<p>$ uapi &#8211;user=CPANEL_USERNAME Email add_pop \\<br>email=&#8217;EMAIL_USERNAME&#8217; \\<br>domain=&#8217;DOMAIN_NAME&#8217; \\<br>password=&#8217;EMAIL_PASSWORD&#8217; \\<br>quota=QUOTA_IN_MB<\/p>\n\n\n\n<p>Step 4: Confirm the Email Account Was Created<\/p>\n\n\n\n<p>$ uapi &#8211;user=demoacct Email list_pops<\/p>\n\n\n\n<p>Step 5: Test Login<\/p>\n\n\n\n<p>Test the login via Webmail or use the credentials in an email client to verify it&#8217;s working.<\/p>\n\n\n\n<p>Webmail URL format: https:\/\/yourdomain.com\/webmail<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusion<\/h3>\n\n\n\n<p>Using the cPanel UAPI from the command line provides a fast, reliable way to manage email accounts without relying on the GUI. Whether you&#8217;re scripting repetitive tasks or working on a headless server, this method gives you precise control with minimal overhead<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Managing email accounts via the command line can significantly streamline server administration tasks. cPanel provides a powerful API called UAPI, which allows administrators to create email accounts without using the cPanel web interface. This method is ideal for automation, scripting, or simply performing actions more efficiently through SSH. Prerequisites (i) Root SSH access to ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/06\/18\/how-to-create-an-email-account-via-cpanel-cli-uapi\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[33],"tags":[203],"class_list":["post-2856","post","type-post","status-publish","format-standard","hentry","category-whm","tag-cpanel-cli-uapi"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Create an Email Account via cPanel CLI (UAPI) - PheonixSolutions Knowledge-Base<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/06\/18\/how-to-create-an-email-account-via-cpanel-cli-uapi\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create an Email Account via cPanel CLI (UAPI) - PheonixSolutions Knowledge-Base\" \/>\n<meta property=\"og:description\" content=\"Introduction Managing email accounts via the command line can significantly streamline server administration tasks. cPanel provides a powerful API called UAPI, which allows administrators to create email accounts without using the cPanel web interface. This method is ideal for automation, scripting, or simply performing actions more efficiently through SSH. Prerequisites (i) Root SSH access to ..Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/06\/18\/how-to-create-an-email-account-via-cpanel-cli-uapi\/\" \/>\n<meta property=\"og:site_name\" content=\"PheonixSolutions Knowledge-Base\" \/>\n<meta property=\"article:published_time\" content=\"2025-06-18T16:29:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-18T16:30:27+00:00\" \/>\n<meta name=\"author\" content=\"meenakshi k\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"meenakshi k\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/06\\\/18\\\/how-to-create-an-email-account-via-cpanel-cli-uapi\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/06\\\/18\\\/how-to-create-an-email-account-via-cpanel-cli-uapi\\\/\"},\"author\":{\"name\":\"meenakshi k\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/baf2a3c7578108699459ee9dfee7211f\"},\"headline\":\"How to Create an Email Account via cPanel CLI (UAPI)\",\"datePublished\":\"2025-06-18T16:29:46+00:00\",\"dateModified\":\"2025-06-18T16:30:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/06\\\/18\\\/how-to-create-an-email-account-via-cpanel-cli-uapi\\\/\"},\"wordCount\":232,\"commentCount\":0,\"keywords\":[\"cPanel CLI (UAPI)\"],\"articleSection\":[\"WHM\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/06\\\/18\\\/how-to-create-an-email-account-via-cpanel-cli-uapi\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/06\\\/18\\\/how-to-create-an-email-account-via-cpanel-cli-uapi\\\/\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/06\\\/18\\\/how-to-create-an-email-account-via-cpanel-cli-uapi\\\/\",\"name\":\"How to Create an Email Account via cPanel CLI (UAPI) - PheonixSolutions Knowledge-Base\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#website\"},\"datePublished\":\"2025-06-18T16:29:46+00:00\",\"dateModified\":\"2025-06-18T16:30:27+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/baf2a3c7578108699459ee9dfee7211f\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/06\\\/18\\\/how-to-create-an-email-account-via-cpanel-cli-uapi\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/06\\\/18\\\/how-to-create-an-email-account-via-cpanel-cli-uapi\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/06\\\/18\\\/how-to-create-an-email-account-via-cpanel-cli-uapi\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Create an Email Account via cPanel CLI (UAPI)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#website\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/\",\"name\":\"PheonixSolutions Knowledge-Base\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/baf2a3c7578108699459ee9dfee7211f\",\"name\":\"meenakshi k\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/17c0a3923b9a31a41d8de2fdc928e514efe879fe17b6e5d2814b7f81ed2356e5?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/17c0a3923b9a31a41d8de2fdc928e514efe879fe17b6e5d2814b7f81ed2356e5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/17c0a3923b9a31a41d8de2fdc928e514efe879fe17b6e5d2814b7f81ed2356e5?s=96&d=mm&r=g\",\"caption\":\"meenakshi k\"},\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/author\\\/meenakshi\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Create an Email Account via cPanel CLI (UAPI) - PheonixSolutions Knowledge-Base","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/06\/18\/how-to-create-an-email-account-via-cpanel-cli-uapi\/","og_locale":"en_US","og_type":"article","og_title":"How to Create an Email Account via cPanel CLI (UAPI) - PheonixSolutions Knowledge-Base","og_description":"Introduction Managing email accounts via the command line can significantly streamline server administration tasks. cPanel provides a powerful API called UAPI, which allows administrators to create email accounts without using the cPanel web interface. This method is ideal for automation, scripting, or simply performing actions more efficiently through SSH. Prerequisites (i) Root SSH access to ..Read more","og_url":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/06\/18\/how-to-create-an-email-account-via-cpanel-cli-uapi\/","og_site_name":"PheonixSolutions Knowledge-Base","article_published_time":"2025-06-18T16:29:46+00:00","article_modified_time":"2025-06-18T16:30:27+00:00","author":"meenakshi k","twitter_card":"summary_large_image","twitter_misc":{"Written by":"meenakshi k","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/06\/18\/how-to-create-an-email-account-via-cpanel-cli-uapi\/#article","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/06\/18\/how-to-create-an-email-account-via-cpanel-cli-uapi\/"},"author":{"name":"meenakshi k","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/baf2a3c7578108699459ee9dfee7211f"},"headline":"How to Create an Email Account via cPanel CLI (UAPI)","datePublished":"2025-06-18T16:29:46+00:00","dateModified":"2025-06-18T16:30:27+00:00","mainEntityOfPage":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/06\/18\/how-to-create-an-email-account-via-cpanel-cli-uapi\/"},"wordCount":232,"commentCount":0,"keywords":["cPanel CLI (UAPI)"],"articleSection":["WHM"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/06\/18\/how-to-create-an-email-account-via-cpanel-cli-uapi\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/06\/18\/how-to-create-an-email-account-via-cpanel-cli-uapi\/","url":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/06\/18\/how-to-create-an-email-account-via-cpanel-cli-uapi\/","name":"How to Create an Email Account via cPanel CLI (UAPI) - PheonixSolutions Knowledge-Base","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#website"},"datePublished":"2025-06-18T16:29:46+00:00","dateModified":"2025-06-18T16:30:27+00:00","author":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/baf2a3c7578108699459ee9dfee7211f"},"breadcrumb":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/06\/18\/how-to-create-an-email-account-via-cpanel-cli-uapi\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/06\/18\/how-to-create-an-email-account-via-cpanel-cli-uapi\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/06\/18\/how-to-create-an-email-account-via-cpanel-cli-uapi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pheonixsolutions.com\/knowledge-base\/"},{"@type":"ListItem","position":2,"name":"How to Create an Email Account via cPanel CLI (UAPI)"}]},{"@type":"WebSite","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#website","url":"https:\/\/pheonixsolutions.com\/knowledge-base\/","name":"PheonixSolutions Knowledge-Base","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pheonixsolutions.com\/knowledge-base\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/baf2a3c7578108699459ee9dfee7211f","name":"meenakshi k","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/17c0a3923b9a31a41d8de2fdc928e514efe879fe17b6e5d2814b7f81ed2356e5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/17c0a3923b9a31a41d8de2fdc928e514efe879fe17b6e5d2814b7f81ed2356e5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/17c0a3923b9a31a41d8de2fdc928e514efe879fe17b6e5d2814b7f81ed2356e5?s=96&d=mm&r=g","caption":"meenakshi k"},"url":"https:\/\/pheonixsolutions.com\/knowledge-base\/author\/meenakshi\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/2856","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/comments?post=2856"}],"version-history":[{"count":2,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/2856\/revisions"}],"predecessor-version":[{"id":2858,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/2856\/revisions\/2858"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=2856"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/categories?post=2856"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/tags?post=2856"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}