openapi: 3.2.0 info: title: Cpanel User Data API version: 11.137.9999.106 contact: email: cs@cpanel.net name: WebPros International, LLC url: https://cpanel.net/support/ license: name: cPanel License url: https://cpanel.net/legal-notices/ termsOfService: https://cpanel.net/legal-notices/ x-api-evangelist-provenance: 'Harvested verbatim from cPanel''s developer portal on 2026-09-05 via the MCP tool get-full-api-description at https://api.docs.cpanel.net/mcp. ONE mechanical change was made before storage: example values containing PEM private-key or certificate blocks, and AWS-access-key-shaped example strings, were replaced with REDACTED_* placeholders so the file can be stored in a public git repository without tripping secret scanning. No path, operation, parameter, schema or description was altered, added or removed.' description: 'Operations tagged UserData across 2 of this provider''s published API definitions: cpanel-uapi-openapi.yml, cpanel-whm-api-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - description: A server running cPanel. url: https://{host}:{port}/execute variables: host: default: cpanel-server.tld description: The hostname of a server running cPanel. port: default: '2083' description: The cPanel port. - description: A server running WHM. url: https://{host}:{port}/json-api variables: host: default: whm-server.tld description: The hostname of a server running WHM. port: default: '2087' description: The WHM port. security: - BasicAuth: [] tags: - description: The UserData module for cPanel UAPI. name: User Data paths: /UserData/get_scoped_userdata: get: x-readonly: false x-rollback: none description: This function returns all userdata key/value pairs for a given scope. operationId: UserData-get_scoped_userdata parameters: - description: The scope name whose userdata you wish to retrieve. in: query name: scope required: true schema: example: example_scope type: string responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: get_scoped_userdata type: string module: description: The name of the module called. example: UserData type: string result: properties: data: description: The requested scoped userdata mapping. example: theme: dark items_per_page: '50' show_help_tour: '0' type: object additionalProperties: description: A stored value associated with a key in the scope. type: string errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: {} status: description: '* `1` — Success. * `0` — Failed. Check the `errors` field for more details.' enum: - 1 - 0 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running an API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Return scoped userdata mapping tags: - User Data x-codeSamples: - label: CLI lang: Shell source: 'uapi --output=jsonpretty \ --user=username \ UserData \ get_scoped_userdata \ scope=ui_prefs ' - label: URL lang: HTTP source: 'https://hostname.example.com:2083/cpsess##########/execute/UserData/get_scoped_userdata?scope=ui_prefs ' - label: LiveAPI Perl lang: Perl source: "use strict;\nuse Cpanel::LiveAPI ();\nmy $cpanel = Cpanel::LiveAPI->new();\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\nmy $response = $cpanel->uapi(\n q/UserData/,\n q/get_scoped_userdata/,\n q/scope=ui_prefs/,\n);\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n print to_json($data);\n}\nelse {\n print to_json($response->{cpanelresult}{result}{errors});\n}\n$cpanel->end();\nsub to_json { require JSON; JSON->new->pretty->encode($_[0]) }\n" - label: LiveAPI PHP lang: PHP source: "uapi('UserData', 'get_scoped_userdata', array('scope' => 'ui_prefs'));\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n print json_encode($data, JSON_PRETTY_PRINT);\n} else {\n print json_encode($response['cpanelresult']['result']['errors'], JSON_PRETTY_PRINT);\n}\n$cpanel->end();" x-cpanel-api-version: UAPI x-cpanel-available-version: '11.32' servers: - description: A server running cPanel. url: https://{host}:{port}/execute variables: host: default: cpanel-server.tld description: The hostname of a server running cPanel. port: default: '2083' description: The cPanel port. /UserData/set_scoped_userdata: get: x-readonly: false x-rollback: none description: This function sets (creates or updates) a userdata key/value pair within a specified scope and returns the full updated mapping for that scope. operationId: UserData-set_scoped_userdata parameters: - description: The scope name to modify. in: query name: scope required: true schema: type: string example: example_scope - description: 'A json string to save to the specified scope. **Note:** The "json" argument cannot be used with the "key" or "value" arguments.' in: query name: json required: false schema: type: string example: '{"theme":"dark"}' - description: 'The userdata key to set. **Note:** The "json" argument cannot be used with the "key" or "value" arguments.' in: query name: key required: false schema: type: string example: theme - description: 'The value to assign to the key. **Note:** The "json" argument cannot be used with the "key" or "value" arguments.' in: query name: value required: false schema: type: string example: dark responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: set_scoped_userdata type: string module: description: The name of the module called. example: UserData type: string result: properties: data: description: The updated scoped userdata mapping after the key/value was set. example: theme: dark items_per_page: '50' show_help_tour: '0' type: object additionalProperties: description: A stored value associated with a key in the scope. type: string errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: {} status: description: '* `1` — Success. * `0` — Failed. Check the `errors` field for more details.' enum: - 1 - 0 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running an API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Set scoped userdata key/value tags: - User Data x-codeSamples: - label: CLI lang: Shell source: 'uapi --output=jsonpretty \ --user=username \ UserData \ set_scoped_userdata \ scope=ui_prefs \ key=theme \ value=dark ' - label: URL lang: HTTP source: 'https://hostname.example.com:2083/cpsess##########/execute/UserData/set_scoped_userdata?scope=ui_prefs&key=theme&value=dark ' - label: LiveAPI Perl lang: Perl source: "use strict;\nuse Cpanel::LiveAPI ();\nmy $cpanel = Cpanel::LiveAPI->new();\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\nmy $response = $cpanel->uapi(\n q/UserData/,\n q/set_scoped_userdata/,\n q/scope=ui_prefs/,\n q/key=theme/,\n q/value=dark/,\n);\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n print to_json($data);\n}\nelse {\n print to_json($response->{cpanelresult}{result}{errors});\n}\n$cpanel->end();\nsub to_json { require JSON; JSON->new->pretty->encode($_[0]) }\n" - label: LiveAPI PHP lang: PHP source: "uapi('UserData', 'set_scoped_userdata', array('scope' => 'ui_prefs', 'key' => 'theme', 'value' => 'dark'));\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n print json_encode($data, JSON_PRETTY_PRINT);\n} else {\n print json_encode($response['cpanelresult']['result']['errors'], JSON_PRETTY_PRINT);\n}\n$cpanel->end();" x-cpanel-api-version: UAPI x-cpanel-available-version: '11.32' servers: - description: A server running cPanel. url: https://{host}:{port}/execute variables: host: default: cpanel-server.tld description: The hostname of a server running cPanel. port: default: '2083' description: The cPanel port. /get_scoped_userdata: get: description: This function retrieves all userdata key/value pairs within the specified scope. operationId: getGetScopedUserdata parameters: - description: The scope name whose userdata you wish to retrieve. in: query name: scope required: true schema: example: example_scope type: string responses: '200': description: HTTP Request was successful. content: application/json: schema: type: object properties: data: type: object description: A mapping of userdata keys to their string values for the given scope. additionalProperties: type: string example: theme: dark items_per_page: '50' metadata: properties: command: type: string example: get_scoped_userdata description: The method name called. reason: type: string example: OK description: 'The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds.' result: type: integer enum: - 0 - 1 example: 1 description: '* `1` - Success * `0` - Failed. Check the `reason` field for more details.' version: type: integer example: 1 description: The version of the API function. summary: Get scoped userdata tags: - User Data x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n get_scoped_userdata \\\n scope='example_scope'" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/get_scoped_userdata?api.version=1&scope=example_scope x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '86' x-operation-id-source: normalized x-operation-id-original: UserData-get_scoped_userdata servers: - description: A server running WHM. url: https://{host}:{port}/json-api variables: host: default: whm-server.tld description: The hostname of a server running WHM. port: default: '2087' description: The WHM port. /set_scoped_userdata: get: description: This function sets (creates or updates) a userdata key/value pair within the specified scope and returns the full updated mapping. operationId: getSetScopedUserdata parameters: - description: The scope name to modify. in: query name: scope required: true schema: example: example_scope type: string - description: 'A json string to save to the specified scope. **Note:** The "json" argument cannot be used with the "key" or "value" arguments.' in: query name: json required: false schema: type: string example: '{"theme":"dark"}' - description: 'The userdata key to set. **Note:** The "json" argument cannot be used with the "key" or "value" arguments.' in: query name: key required: false schema: example: theme type: string - description: 'The value to assign to the key. **Note:** The "json" argument cannot be used with the "key" or "value" arguments.' in: query name: value required: false schema: example: dark type: string responses: '200': description: HTTP Request was successful. content: application/json: schema: type: object properties: data: type: object description: The updated mapping of all userdata in the scope. additionalProperties: type: string example: theme: dark items_per_page: '50' metadata: properties: command: type: string example: set_scoped_userdata description: The method name called. reason: type: string example: OK description: 'The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds.' result: type: integer enum: - 0 - 1 example: 1 description: '* `1` - Success * `0` - Failed. Check the `reason` field for more details.' version: type: integer example: 1 description: The version of the API function. summary: Set scoped userdata tags: - User Data x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n set_scoped_userdata \\\n scope='example_scope' \\\n key='theme' \\\n value='dark'" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/set_scoped_userdata?api.version=1&scope=example_scope&key=theme&value=dark x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '86' x-operation-id-source: normalized x-operation-id-original: UserData-set_scoped_userdata servers: - description: A server running WHM. url: https://{host}:{port}/json-api variables: host: default: whm-server.tld description: The hostname of a server running WHM. port: default: '2087' description: The WHM port. components: securitySchemes: BasicAuth: scheme: basic type: http externalDocs: url: https://cpanel.net/developers/ x-refined-from: - cpanel-uapi-openapi.yml - cpanel-whm-api-openapi.yml x-tagGroups: - name: API Development Tools tags: - API Token Management - Batch - SSE Task Management - URL Parsing - name: Authentication tags: - External Authentication - Two-Factor Settings - name: Backup Information tags: - BackupInfo - BackupInfo Status - name: Block Ip Addresses tags: - Block IP - name: Commerce Integration tags: - Market Integration - SSL Certificates - name: Contact Information tags: - Contact Information - name: cPanel Account tags: - Account Enhancements - Account Information - Account Management - AuditLog - Contact Information - cPanel Features - Disk Quotas - DomainRecommendations - Personalization - Resource Usage and Statistics - Subaccount Management - Team Roles - Team Users - name: cPanel Account Backups tags: - Backup - File Restoration - name: cPanel Plugin Framework tags: - Formbricks - Plugins - name: cPanel Theme Management tags: - Application Information - Brand Management - Branding Files - Browser Cache Management - Language - Theme Settings - name: Directory Management tags: - Directory Indexes - Directory Privacy - Directory Protection - name: DNS tags: - DNS - DNS Information - DNS Security - Dynamic DNS - Email DNS Settings - ZoneEdit - name: Domain tags: - Domain - name: Domain Management tags: - AddonDomain - Direct Link Protection (Hotlink) - Domain - Domain Information - Domain Redirection - DomainLookup - Park - SubDomain - Virtual Host Information - name: Domains tags: - Subdomains - name: Email tags: - Email Accounts - Email Filtering - Email Forwarding - Email Server Information - Email Suspensions - Mail Server Information - Mailbox Management - Mailing Lists - Signing and Encryption (GnuPG Keys) - Spam Filtering (Greylisting) - Spam Management - Spam Prevention (BoxTrapper) - Webmail Applications - Webmail Sessions - name: Extract Information tags: - ExtractInfo - ExtractInfo Status - name: File Manager tags: - Trash - name: Files tags: - FTP Accounts - FTP Server Settings - Image Tools - Jodit - Manage Files - Manage Files - WebDisk Settings - name: GIT Management tags: - Deployment Settings - Repository Management - name: InProductSurvey tags: - InProductSurvey - name: MySQL and MariaDB tags: - Database Information - Database Management - Remote Databases - User Management - name: Notifications tags: - Pushbullet - name: Optional Applications tags: - Antivirus Protection (ClamAV) - Calendar and Contacts (DAV) - Calendar and Contacts Server - WordPress Manager Backups - name: PostgreSQL tags: - PostgreSQL Database Management - PostgreSQL User Management - name: Retrieve bandwidth information tags: - Bandwidth - name: Security tags: - Known SSH Hosts Management - Login Information - name: Server Information tags: - cPanel Server Information - Notifications - Password Strength - SSH - WebPros MCP - WebProsMCP - name: ServiceProxy tags: - ServiceProxy - name: Site Quality Monitoring tags: - SiteQuality - name: SSL Certificates tags: - Auto-generated SSL Certificates - cPanel Account SSL Management - SNI Email Settings - SSL Certificate Management - Verify Domain Ownership - name: Statistics tags: - Domain Statistics - Weblog Settings - name: UserData tags: - UserData - name: Web Server Configuration tags: - EA4 - EasyApache Settings - PHP - name: Web Server Management tags: - Application Manager - ModSecurity - NginxCaching - PHP Settings - Web Apps - name: Website Configuration tags: - Handler Management - Logs - Mime Type Management - Nova - Site Information - Site Installation - Sitejet - WPX