cPanel C Cs API

The CCS module for UAPI.

Operations 5

GET /CCS/add_delegate Add calendar delegation #
GET /CCS/list_delegates List cPanel account's calendar delegates #
GET /CCS/list_users List cPanel account's calendar users #
GET /CCS/remove_delegate Remove calendar delegation #
GET /CCS/update_delegate Update calendar delegation #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/cpanel-c-cs-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

cpanel-c-cs-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: cs@cpanel.net
    name: WebPros International, LLC
    url: https://cpanel.net/support/
  description: UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings.
  license:
    name: cPanel License
    url: https://cpanel.net/legal-notices/
  termsOfService: https://cpanel.net/legal-notices/
  title: cPanel U CCS API
  version: 11.137.9999.106
  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.'
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.
security:
- BasicAuth: []
tags:
- description: The CCS module for UAPI.
  name: C Cs
paths:
  /CCS/add_delegate:
    get:
      x-readonly: false
      x-rollback: none
      description: 'This function delegates a user''s calendar to another user.


        **Note:**


        You **must** install the Calendar and Contacts Server cPanel plugin to access this API function.'
      operationId: CCS-add_delegate
      parameters:
      - description: The user to whom you wish to delegate the calendar.
        in: query
        name: delegatee
        required: true
        schema:
          example: delegatee@cptest.test
          format: email
          type: string
      - description: The calendar's owner.
        in: query
        name: delegator
        required: true
        schema:
          example: delegator@cptest.test
          format: email
          type: string
      - description: 'Whether the delegatee will only have read-only access on the calendar.

          * `1` - Read-only access.

          * `0` - Full access.'
        in: query
        name: readonly
        required: false
        schema:
          default: 0
          enum:
          - 1
          - 0
          example: 1
          type: integer
      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: add_delegate
                    type: string
                  module:
                    description: The name of the module called.
                    example: CCS
                    type: string
                  result:
                    properties:
                      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:
                        - 0
                        - 1
                        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 a API.
                        example: null
                        items:
                          type: string
                        type:
                        - array
                        - 'null'
                    type: object
                type: object
          description: HTTP Request was successful.
      summary: Add calendar delegation
      tags:
      - C Cs
      x-codeSamples:
      - label: CLI
        lang: Shell
        source: "uapi --output=jsonpretty \\\n  --user=username \\\n  CCS \\\n  add_delegate \\\n  delegator='delegator@cptest.test' \\\n  delegatee='delegatee@cptest.test'\n"
      - label: URL
        lang: HTTP
        source: https://hostname.example.com:2083/cpsess##########/execute/CCS/add_delegate?delegator=delegator%40cptest.test&delegatee=delegatee%40cptest.test
      - label: LiveAPI Perl
        lang: Perl
        source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# <theme-name> is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/<theme-name>\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file CCS_add_delegate.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend/<theme-name>/\n#    to .../frontend/<theme-name>/api_examples/CCS_add_delegate.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n    q/CCS/,\n    q/add_delegate/,\n    {\n        'delegator' => 'delegator@cptest.test',\n        'delegatee' => 'delegatee@cptest.test',\n    }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n    my $data = $response->{cpanelresult}{result}{data};\n    # Do something with the $data\n    # So you can see the data shape we print it here.\n    print to_json($data);\n}\nelse {\n    # Report errors:\n    print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n    require JSON;\n    my $str = JSON->new->pretty->encode($_[0]);\n    return $str;\n}\n"
      - label: LiveAPI PHP
        lang: PHP
        source: "<?php\n//--------------------------------------------------------------------------------------\n// Instructions:\n//--------------------------------------------------------------------------------------\n// <theme-name> is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/<theme-name>\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file CCS_add_delegate.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend/<theme-name>/\n//    to .../frontend/<theme-name>/api_examples/CCS_add_delegate.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n    'CCS',\n    'add_delegate',\n    array (\n        'delegator' => 'delegator@cptest.test',\n        'delegatee' => 'delegatee@cptest.test',\n    )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n    $data = $response['cpanelresult']['result']['data'];\n    // Do something with the $data\n    // So you can see the data shape we print it here.\n    print to_json($data);\n}\nelse {\n    // Report errors:\n    print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n    return json_encode($data, JSON_PRETTY_PRINT);\n}"
      x-cpanel-api-version: UAPI
      x-cpanel-available-version: cPanel 90
      x-cpanel-minimum-compatible-version: 80
      x-cpanel-rpm: cpanel-ccs-calendarserver
      x-cpanel-rpm-version: 69
  /CCS/list_delegates:
    get:
      x-readonly: true
      description: 'This function lists all calendar delegates on the cPanel account.


        **Note:**


        You **must** install the Calendar and Contacts Server cPanel plugin to access this API function.'
      operationId: CCS-list_delegates
      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: list_delegates
                    type: string
                  module:
                    description: The name of the module called.
                    example: CCS
                    type: string
                  result:
                    properties:
                      data:
                        description: An array of objects that contain Calendars and Contacts Server calendar delegation information.
                        items:
                          properties:
                            delegatee:
                              description: The user with delegation rights.
                              example: delegatee@cptest.test
                              format: email
                              type: string
                            delegator:
                              description: The calendar's owner.
                              example: delegator@cptest.test
                              format: email
                              type: string
                            read_only:
                              description: 'Whether the delegatee has read-only access on the calendar.

                                * `1` - Read-only access.

                                * `0` - Full access.'
                              enum:
                              - 1
                              - 0
                              example: 1
                              type: integer
                          type: object
                        type:
                        - array
                        - 'null'
                      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:
                        - 0
                        - 1
                        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 a API.
                        example: null
                        items:
                          type: string
                        type:
                        - array
                        - 'null'
                    type: object
                type: object
          description: HTTP Request was successful.
      summary: List cPanel account's calendar delegates
      tags:
      - C Cs
      x-codeSamples:
      - label: CLI
        lang: Shell
        source: "uapi --output=jsonpretty \\\n  --user=username \\\n  CCS \\\n  list_delegates\n"
      - label: URL
        lang: HTTP
        source: https://hostname.example.com:2083/cpsess##########/execute/CCS/list_delegates
      - label: LiveAPI Perl
        lang: Perl
        source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# <theme-name> is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/<theme-name>\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file CCS_list_delegates.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend/<theme-name>/\n#    to .../frontend/<theme-name>/api_examples/CCS_list_delegates.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n    q/CCS/,\n    q/list_delegates/\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n    my $data = $response->{cpanelresult}{result}{data};\n    foreach my $item (@{$data}) {\n        # Do something with the $item\n    }\n\n    # So you can see the data shape we print it here.\n    print to_json($data);\n}\nelse {\n    # Report errors:\n    print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n    require JSON;\n    my $str = JSON->new->pretty->encode($_[0]);\n    return $str;\n}\n"
      - label: LiveAPI PHP
        lang: PHP
        source: "<?php\n//--------------------------------------------------------------------------------------\n// Instructions:\n//--------------------------------------------------------------------------------------\n// <theme-name> is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/<theme-name>\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file CCS_list_delegates.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend/<theme-name>/\n//    to .../frontend/<theme-name>/api_examples/CCS_list_delegates.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n    'CCS',\n    'list_delegates'\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n    $data = $response['cpanelresult']['result']['data'];\n    foreach ($data as $item) {\n        // Do something with the $item\n    }\n\n    // So you can see the data shape we print it here.\n    print to_json($data);\n}\nelse {\n    // Report errors:\n    print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n    return json_encode($data, JSON_PRETTY_PRINT);\n}"
      x-cpanel-api-version: UAPI
      x-cpanel-available-version: cPanel 90
  /CCS/list_users:
    get:
      x-readonly: true
      description: 'This function lists all calendar users on the cPanel account.


        **Note:**


        You **must** install the Calendar and Contacts Server cPanel plugin to access this API function.'
      operationId: CCS-list_users
      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: list_users
                    type: string
                  module:
                    description: The name of the module called.
                    example: CCS
                    type: string
                  result:
                    properties:
                      data:
                        additionalProperties:
                          description: The user account's [universally unique identifier](https://en.wikipedia.org/wiki/Universally_unique_identifier) (UUID). The user account's name is the return's name.
                        example:
                          user1@example.com: 0882362A-0B98-11E8-BAF5-D988266709C1
                          user2@example.com: 96F1EB2F-A501-11EA-A3EF-A553B2E4FFA8
                          user3@example.com: 195C8A51-E1B3-11E6-8715-F54FA4E00DDD
                          user4@example.com: 028F4AB1-0F1A-11E7-AEC7-E08FECEC8036
                        type: object
                      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:
                        - 0
                        - 1
                        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 a API.
                        example: null
                        items:
                          type: string
                        type:
                        - array
                        - 'null'
                    type: object
                type: object
          description: HTTP Request was successful.
      summary: List cPanel account's calendar users
      tags:
      - C Cs
      x-codeSamples:
      - label: CLI
        lang: Shell
        source: "uapi --output=jsonpretty \\\n  --user=username \\\n  CCS \\\n  list_users\n"
      - label: URL
        lang: HTTP
        source: https://hostname.example.com:2083/cpsess##########/execute/CCS/list_users
      - label: LiveAPI Perl
        lang: Perl
        source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# <theme-name> is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/<theme-name>\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file CCS_list_users.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend/<theme-name>/\n#    to .../frontend/<theme-name>/api_examples/CCS_list_users.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n    q/CCS/,\n    q/list_users/\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n    my $data = $response->{cpanelresult}{result}{data};\n    # Do something with the $data\n    # So you can see the data shape we print it here.\n    print to_json($data);\n}\nelse {\n    # Report errors:\n    print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n    require JSON;\n    my $str = JSON->new->pretty->encode($_[0]);\n    return $str;\n}\n"
      - label: LiveAPI PHP
        lang: PHP
        source: "<?php\n//--------------------------------------------------------------------------------------\n// Instructions:\n//--------------------------------------------------------------------------------------\n// <theme-name> is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/<theme-name>\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file CCS_list_users.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend/<theme-name>/\n//    to .../frontend/<theme-name>/api_examples/CCS_list_users.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n    'CCS',\n    'list_users'\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n    $data = $response['cpanelresult']['result']['data'];\n    // Do something with the $data\n    // So you can see the data shape we print it here.\n    print to_json($data);\n}\nelse {\n    // Report errors:\n    print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n    return json_encode($data, JSON_PRETTY_PRINT);\n}"
      x-cpanel-api-version: UAPI
      x-cpanel-available-version: cPanel 90
  /CCS/remove_delegate:
    get:
      x-readonly: false
      x-rollback: none
      description: 'This function removes a delegate from another user''s calendar.


        **Note:**


        You **must** install the Calendar and Contacts Server cPanel plugin to access this API function.'
      operationId: CCS-remove_delegate
      parameters:
      - description: The user from whom you wish to remove delegation rights.
        in: query
        name: delegatee
        required: true
        schema:
          example: user2@example.com
          format: email
          type: string
      - description: The calendar's owner.
        in: query
        name: delegator
        required: true
        schema:
          example: user1@example.com
          format: email
          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: remove_delegate
                    type: string
                  module:
                    description: The name of the module called.
                    example: CCS
                    type: string
                  result:
                    properties:
                      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:
                        - 0
                        - 1
                        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 a API.
                        example: null
                        items:
                          type: string
                        type:
                        - array
                        - 'null'
                    type: object
                type: object
          description: HTTP Request was successful.
      summary: Remove calendar delegation
      tags:
      - C Cs
      x-codeSamples:
      - label: CLI
        lang: Shell
        source: "uapi --output=jsonpretty \\\n  --user=username \\\n  CCS \\\n  remove_delegate \\\n  delegator='user1@example.com' \\\n  delegatee='user2@example.com'\n"
      - label: URL
        lang: HTTP
        source: https://hostname.example.com:2083/cpsess##########/execute/CCS/remove_delegate?delegator=user1%40example.com&delegatee=user2%40example.com
      - label: LiveAPI Perl
        lang: Perl
        source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# <theme-name> is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/<theme-name>\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file CCS_remove_delegate.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend/<theme-name>/\n#    to .../frontend/<theme-name>/api_examples/CCS_remove_delegate.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n    q/CCS/,\n    q/remove_delegate/,\n    {\n        'delegator' => 'user1@example.com',\n        'delegatee' => 'user2@example.com',\n    }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n    my $data = $response->{cpanelresult}{result}{data};\n    # Do something with the $data\n    # So you can see the data shape we print it here.\n    print to_json($data);\n}\nelse {\n    # Report errors:\n    print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n    require JSON;\n    my $str = JSON->new->pretty->encode($_[0]);\n    return $str;\n}\n"
      - label: LiveAPI PHP
        lang: PHP
        source: "<?php\n//--------------------------------------------------------------------------------------\n// Instructions:\n//--------------------------------------------------------------------------------------\n// <theme-name> is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/<theme-name>\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file CCS_remove_delegate.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend/<theme-name>/\n//    to .../frontend/<theme-name>/api_examples/CCS_remove_delegate.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n    'CCS',\n    'remove_delegate',\n    array (\n        'delegator' => 'user1@example.com',\n        'delegatee' => 'user2@example.com',\n    )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n    $data = $response['cpanelresult']['result']['data'];\n    // Do something with the $data\n    // So you can see the data shape we print it here.\n    print to_json($data);\n}\nelse {\n    // Report errors:\n    print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n    return json_encode($data, JSON_PRETTY_PRINT);\n}"
      x-cpanel-api-version: UAPI
      x-cpanel-available-version: cPanel 90
  /CCS/update_delegate:
    get:
      x-readonly: false
      x-rollback: none
      description: 'This function updates the delegation of a user''s calendar to another user.


        **Note:**


        You **must** install the Calendar and Contacts Server cPanel plugin to access this API function.'
      operationId: CCS-update_delegate
      parameters:
      - description: The user to whom you delegated the calendar.
        in: query
        name: delegatee
        required: true
        schema:
          example: user2@example.com
          format: email
          type: string
      - description: The calendar's owner.
        in: query
        name: delegator
        

# --- truncated at 32 KB (42 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/cpanel/refs/heads/main/openapi/cpanel-c-cs-api-openapi.yml