20i Reseller API

FORMAT: 1A

HOST: https://api.20i.com/

# 20i.com Reseller API

The 20i Reseller API gives you access to all the features and functionality of StackCP, allowing you to create a hosting control panel from scratch or integrate external services such as WHMCS. This is for advanced users and the support we provide for the Reseller API is service-based only.

Where a URL needs an ID, this is typically an ID that you would get in the list method, but for some types alternative references may be supported:

domain: The domain name

package: A domain name on the package

reseller: * to indicate yourself

In general you should use the allocated ID instead as that will be more reliable for cases like moving names between packages.

POSTs to approporiate endpoints can be either plain form (application/x-www-form-urlencoded or multipart/form-data) encoded as with PHP's http_build_query() or a JSON object (application/json).

For example, to add a new web site, a form-style request could look like this:

    POST /reseller/*/addWeb HTTP/1.1
    Host: api.20i.com
    Authorization: Bearer ZTRkNGZkMzFhNTJkY2FlMwo=
    Content-Type: application/x-www-form-urlencoded

    type=1234&domain_name=example.org&extra_domain_names[]=example.net&documentRoots[example.org]=public_html

Or in JSON:

    POST /reseller/*/addWeb HTTP/1.1
    Host: api.20i.com
    Authorization: Bearer ZTRkNGZkMzFhNTJkY2FlMwo=
    Content-Type: application/json

    {
      "type": "1234",
      "domain_name": "example.org",
      "extra_domain_names": ["example.net"],
      "documentRoots": {
        "example.org": "public_html"
      }
    }

Example Script: This PHP script is an example of how to just get code working and using the 20i Reseller API, download the [20i Module](https://my.20i.com/composer/api-modules-1.0.6.zip) and unzip the archive. Then create a test.php file with the following. When you run this code your should see all your package types dumped to the output window.

    <?php

    include('lib/TwentyI/API/REST.php');
    include('lib/TwentyI/API/Services.php');

    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $packageTypes = $services_api->getWithFields("/reseller/*/packageTypes");
    trigger_error( print_r($packageTypes,true) );

Account & Settings

Account Balance

/reseller/{resellerId}/accountBalance
GETRetreive Account Balance

The "Retrieve Account Balance" API endpoint allows you to retrieve the balance data of your reseller account in 20i. This API call is used to obtain information about the current available balance in your account.

Upon successful execution of the API call, the response will return an array containing the account balance data, including the current balance available in your reseller account.

Please note that this API endpoint is designed to provide access to the account balance information within the 20i platform. It allows you to retrieve the current available balance, which can be useful for monitoring and managing your reseller account's financial status.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/reseller/{resellerId}/accountBalance");
  • resellerIdrequirednumberYour reseller ID.
Headers

Authorization: Bearer token



+ Body

{

balance: "string"

}

Reseller Settings

/reseller/{resellerId}
POSTSet/Update reseller settings

The "Set/Update reseller settings" API endpoint allows you to update the settings of a reseller account using the 20i API. This API call is used to modify various settings related to the reseller account.

To update the reseller settings, you need to provide the following parameters in the request payload:

malwareEmails: A boolean value indicating whether the reseller has opted into receiving malware-related emails.

malwareEmailsStackCpUsers: A boolean value indicating whether the associated StackCP users of the reseller have opted into receiving malware-related emails.

migrationCompleteEmails: A boolean value indicating whether the reseller has opted into receiving emails notifying them about completed migrations.

domainAutoRenewDefault: A boolean value indicating the default auto-renewal behavior for domains. If set to true, domains will be set to auto-renew; if set to false, domains will be set to cancel upon renewal.

Upon successful execution of the API call, the response will return a boolean value indicating whether any of the settings were successfully saved. If at least one setting was modified and saved, the response will be true.

It's important to note that these settings are specific to the reseller account and will affect the behavior of the associated reseller features and services.

Please ensure that you review the API documentation for more detailed information on the parameters and their usage.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}", [
            "malwareEmails" => true,
            "malwareEmailsStackCpUsers" => true,
            "migrationCompleteEmails" => true,
            "domainAutoRenewDefault" => true
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • malwareEmailsrequiredbooleanwhether opted into malware emails
  • malwareEmailsStackCpUsersrequiredbooleanwhether opted into malware emails for associated StackCP users
  • migrationCompleteEmailsrequiredbooleanWether opted into migration complete emails
  • domainAutoRenewDefaultrequiredbooleanTrue to auto renew, false to cancel on renewal
Headers

Authorization: Bearer token

+ Body

{
malwareEmails: true,
malwareEmailsStackCpUsers: true,
migrationCompleteEmails: true,
domainAutoRenewDefault: true
}

+ Body

true

Services

/reseller/{resellerId}/serviceChangeData
GETRetrieve Known Service Change Requests

The "Retrieve Known Service Change Requests" API endpoint allows you to retrieve the known service change requests and their current status.

A service change request refers to the process of moving a package from one service level, such as "linux", to another service level, such as "windows".

This API call provides information about the existing service change requests and their relevant details.

The response from this API call will be an array of objects, where each object represents a service change request. Each object contains the following information:

id: The unique identifier of the service change request.

name: The name associated with the service change request.

jobId: The job ID associated with the service change request.

status: The current status of the service change request.

oldServiceLevel: The previous service level of the package.

newServiceLevel: The new service level to which the package is being moved.

packageId: The ID of the package undergoing the service level change.

resellerId: (Optional) The ID of the reseller associated with the service change request.

newPackageBundleTypeId: (Optional) The ID of the new package bundle type.

createdAt: (Optional) The timestamp indicating when the service change request was created.

updatedAt: (Optional) The timestamp indicating the last update time of the service change request.

Please note that this API endpoint is designed to provide access to the known service change requests and their corresponding details within the 20i platform.

It allows you to retrieve information about the service level changes that have been requested or are in progress.

This API endpoint falls under the "Services" section and serves as a means to retrieve the known service change requests and their current status.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/reseller/{resellerId}/serviceChangeData");
  • resellerIdrequirednumberYour reseller ID.
Headers

Authorization: Bearer token



+ Body

[

{

id: "string",

name: "string",

jobId: "string",

status: "string",

oldServiceLevel: "string",

newServiceLevel: "string",

packageId: "string",

resellerId: "string",

newPackageBundleTypeId: "string",

createdAt: "string",

updatedAt: "string"

}

]

Order & Renew Services

Order Domain Name

/reseller/{resellerId}/addDomain
POSTRegister a Domain Name

Registers a new domain name and charges the registration fee to your account balance.

Domain privacy can be added in the same request via `privacyService`.

**Warning:** Non-ASCII domain names will be rejected. Internationalised
domain names (IDNs) are not supported.
**Note (`.uk` privacy):** For `.uk` domains, `privacyService` is a
chargeable add-on and is distinct from simply suppressing WHOIS disclosure.
**Note (CA domains):** Set `caRegistryAgreement: true` only after the
registry agreements have been presented to and accepted by the registrant.
**Note see contact attribute for extension registry-specific contact data
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/addDomain", [
            "name" => "string",
            "caRegistryAgreement" => true,
            "contact" => [
                "organisation" => "string",
                "name" => "string",
                "address" => "string",
                "telephone" => "string",
                "email" => "string",
                "cc" => "string",
                "pc" => "string",
                "sp" => "string",
                "city" => "string",
                "extension" => [
                    "type" => "string",
                    "trad-name" => "string",
                    "co-no" => "string",
                    "language" => "string",
                    "cro-number" => "string",
                    "nationality-code" => "string",
                    "reg_code" => "string",
                    "country_of_citizenship" => "string",
                    "eligibility_type" => "string",
                    "eligibility_name" => "string",
                    "eligibility_id_type" => "string",
                    "eligibility_id" => "string",
                    "registrant_id_type" => "string",
                    "registrant_id" => "string",
                    "policy_reason" => "string",
                    "es_id_type" => "string",
                    "es_id_number" => "string",
                    "date_of_birth" => "string",
                    "registrant_vat_id" => "string",
                    "registration_number" => "string",
                    "tax_number" => "string",
                    "br_register_number" => "string",
                    "fax" => "string"
                ]
            ],
            "limits" => [
            ],
            "otherContacts" => [
                "(type)" => [
                    "name" => "string",
                    "organisation" => "string",
                    "address" => "string",
                    "city" => "string",
                    "sp" => "string",
                    "pc" => "string",
                    "cc" => "string",
                    "telephone" => "string",
                    "email" => "string",
                    "extension" => [
                    ]
                ]
            ],
            "nameservers" => ["string"],
            "privacyService" => true,
            "stackUser" => "string"
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • namerequiredstringThe domain name to register. Must be ASCII only.
  • caRegistryAgreementoptionalboolean,nullableIf registry agreementshave been shown and agreed to
  • contactrequiredobjectThis is slightly different from updating domain

contacts, as noted.

- `organisation` (string,required) - As $org when updatingdomain contacts

- `name` (string,required) - As updating domain contacts

- `address` (string,required) - Newline-separated lines withpossible trailling commas. At most 3 lines are

allowed.

- `telephone` (string,required) - As $voice when updatingdomain contacts

- `email` (string,required) - As updating domain contacts

- `cc` (string,required) - As updating domain contacts

- `pc` (string,required) - As updating domain contacts

- `sp` (string,nullable) - As updating domain contacts

- `city` (string,required) - As updating domain contacts

- `extension` (object,nullable) - Registry-specific contact data. Required fields depend on the TLD.

- `type` (string,nullable) - Registrant type. Required for `.uk` family(Nominet: `IND`, `LTD`, `PLC`, `PTNR`, `LLP`, `SCH`, `RCHAR`,

`GOV`, `CRC`, `STAT`, `OTHER`), `.ie` (Titan), and most Tucows

ccTLDs. How the value is forwarded to the registry depends on

the TLD: `.ca` uses `legal_type`; `.au`/`.com.au`/`.org.au` use

`eligibility_type`; `.dk` normalises to `"individual"` or

`"business"`; `.es` uses `es_id_type`; `.us` uses `app_purpose`;

`.cl`, `.de`, `.fi`, `.hu`, `.lv`, `.mx`, `.my`, `.nu`, `.pt`,

`.com.pt`, `.re`, `.ro`, `.com.ro`, `.se`, `.za`, `.co.za` use

`registrant_type`; all other Tucows TLDs use `entity_type`.

- `trad-name` (string,nullable) - (`.uk` family) Trading name whendifferent from the registered organisation name

- `co-no` (string,nullable) - (`.uk` family and Tucows) Companyregistration number. Ignored for Nominet when `type` is `OTHER`.

- `language` (string,nullable) - (`.ie` and Tucows) Language code,e.g. `"EN"`. Uppercased automatically.

- `cro-number` (string,nullable) - (`.ie` and Tucows) CRO number

- `nationality-code` (string,nullable) - (Tucows) Nationality code

- `reg_code` (string,nullable) - (Tucows) Registration code

- `country_of_citizenship` (string,nullable) - (Tucows) Country ofcitizenship

- `eligibility_type` (string,nullable) - (`.au` family) auDA eligibilitycategory

- `eligibility_name` (string,nullable) - (`.au` family) Eligibilityentity name

- `eligibility_id_type` (string,nullable) - (`.au` family) EligibilityID type

- `eligibility_id` (string,nullable) - (`.au` family) Eligibility ID

- `registrant_id_type` (string,nullable) - (`.au` family) RegistrantID type

- `registrant_id` (string,nullable) - (`.au` family) Registrant ID

- `policy_reason` (string,nullable) - (`.au` family) Policy reason code

- `es_id_type` (string,nullable) - (`.es`) Spanish identity document type

- `es_id_number` (string,nullable) - (`.es`) Spanish identity documentnumber

- `date_of_birth` (string,nullable) - (`.fi`) Registrant date of birth

- `registrant_vat_id` (string,nullable) - (`.se`, `.ro`, `.hu`) VAT ID

- `registration_number` (string,nullable) - (`.se`, `.ro`) Companyregistration number

- `tax_number` (string,nullable) - (Tucows) Tax number

- `br_register_number` (string,nullable) - (`.com.br`) CPF or CNPJ

- `fax` (string,nullable) - (`.no` and other Tucows TLDs) Fax number}

+ `limits` (object,nullable) - A limit code to value map, see domain limits

+ `otherContacts` (object,nullable) -

- ``type`` (object,required) - These may be ignored for some transfers.

- `name` (string,required) -

- `organisation` (string,required) -

- `address` (string,required) - Newline-separated lines withpossible trailling commas. At most 3 lines are

allowed.

- `city` (string,required) -

- `sp` (string,required) -

- `pc` (string,required) -

- `cc` (string,required) - Country in ISO3166-alpha2 format

- `telephone` (string,required) -

- `email` (string,required) -

- `extension` (object,nullable) - As updating domain contacts

+ `nameservers` (array[string],nullable) - Nameserver hostnames, eg "ns.example.org". Otherwise you

get defaults.

Ignored for UK transfers.

+ `privacyService` (boolean,required) - If true, this will add domain privacy toyour order. This may not be applicable to some TLDs. Please

note that for .UK this is a chargeable service which is

different from turning off disclosure.

+ `stackUser` (string,nullable) - A stack user to grant access to, eg."stack-user:123"

Headers

Authorization: Bearer token

+ Body

{
name: "string",
caRegistryAgreement: true,
contact:{
organisation: "string",
name: "string",
address: "string",
telephone: "string",
email: "string",
cc: "string",
pc: "string",
sp: "string",
city: "string",
extension:{
type: "string",
trad-name: "string",
co-no: "string",
language: "string",
cro-number: "string",
nationality-code: "string",
reg_code: "string",
country_of_citizenship: "string",
eligibility_type: "string",
eligibility_name: "string",
eligibility_id_type: "string",
eligibility_id: "string",
registrant_id_type: "string",
registrant_id: "string",
policy_reason: "string",
es_id_type: "string",
es_id_number: "string",
date_of_birth: "string",
registrant_vat_id: "string",
registration_number: "string",
tax_number: "string",
br_register_number: "string",
fax: "string"
}
},
limits:{
},
otherContacts:{
(type):{
name: "string",
organisation: "string",
address: "string",
city: "string",
sp: "string",
pc: "string",
cc: "string",
telephone: "string",
email: "string",
extension:{
}
}
},
nameservers: ["string"],
privacyService: true,
stackUser: "string"
}

+ Body

true

Order Managed VPS

/reseller/{resellerId}/addManagedVps
POSTOrder a Managed VPS

Orders a new Managed VPS and charges your account balance.

Returns the new Managed VPS ID on success.

**Warning:** This charges your account balance immediately.
If you have insufficient funds the call will fail and no service will be created.
**Note:** Valid product spec identifiers and OS codes can be retrieved
from the product catalogue endpoints.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/addManagedVps", [
            "configuration" => [
                "Name" => "string",
                "ApplicationId" => "string",
                "location" => "string"
            ],
            "options" => [
                "os" => "string"
            ],
            "periodMonths" => 1,
            "type" => "string",
            "forUser" => "string"
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • configurationrequiredobject

- `Name` (string,required) - Display name for the Managed VPS

- `ApplicationId` (string,required) - Application ID to pre-install on provisioning

- `location` (string,required) - Data centre location, e.g. `"dc_location-lhr"`

+ `options` (object,required) -

- `os` (string,required) - Operating system code to install

+ `periodMonths` (number,required) - Billing period. Either `1` (monthly) or `12` (annual).

+ `type` (string,required) - Product spec identifier, e.g. `"web-managedvps1set1"`

+ `forUser` (string,nullable) - Stack user tuple to assign the server to,e.g. `"stack-user:113"`

Headers

Authorization: Bearer token

+ Body

{
configuration:{
Name: "string",
ApplicationId: "string",
location: "string"
},
options:{
os: "string"
},
periodMonths: 1,
type: "string",
forUser: "string"
}

+ Body

true

Order MSSQL Databases

/reseller/{resellerId}/addMssql
POSTOrder an MSSQL Database

Orders one MSSQL database allowance and charges your account balance.

Once ordered, the allowance must be assigned to a hosting package before it can be used.

**Warning:** This charges your account balance immediately.
If you have insufficient funds the call will fail and no service will be created.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/addMssql", [
    ]);
  • resellerIdrequirednumberYour reseller ID.
Headers

Authorization: Bearer token

+ Body

{
}

+ Body

true

Order Premium Mailbox

/reseller/{resellerId}/addPremiumMailbox
POSTOrder Premium Mailbox

Orders a Premium Mailbox and charges your account balance.

Returns the new mailbox ID on success.

**Warning:** This charges your account balance immediately.
If you have insufficient funds the call will fail and no service will be created.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/addPremiumMailbox", [
            "configuration" => [
                "id" => "string",
                "local" => "string",
                "domain" => "string"
            ],
            "forUser" => "string"
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • configurationrequiredobject

- `id` (string,required) - The existing mailbox ID to upgrade, e.g. `"m11111"`

- `local` (string,required) - The local part of the mailbox address (before the `@`)

- `domain` (string,required) - The domain part of the mailbox address (after the `@`)

+ `forUser` (string,nullable) - Stack user tuple to assign the mailbox to,e.g. `"stack-user:123"`

Headers

Authorization: Bearer token

+ Body

{
configuration:{
id: "string",
local: "string",
domain: "string"
},
forUser: "string"
}

+ Body

string

Order SSL Certificates

/reseller/{resellerId}/addTlsCertificate
POSTOrder an SSL Certificate

Orders a TLS certificate and charges your account balance.

Returns the new certificate service ID on success.

**Warning:** This charges your account balance immediately.
If you have insufficient funds the call will fail and no service will be created.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/addTlsCertificate", [
            "class-code" => "string",
            "name" => "string",
            "periodMonths" => 1,
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • class-coderequiredstringThe certificate product type. One of:`tucows-rapidssl` (Simple SSL),

`tucows-rapidssl_wildcard` (Wildcard SSL),

`tucows-truebizid_ev` (Extended Validation SSL).

+ `name` (string,required) - The domain name the certificate is for, e.g. `"example.com"`

+ `periodMonths` (number,required) - Certificate duration in months, e.g. `12`

+ `configuration` (object,required) - Additional certificate configuration. Options varyby certificate type — contact your account manager for details.

Headers

Authorization: Bearer token

+ Body

{
class-code: "string",
name: "string",
periodMonths: 1,
}

+ Body

string

Order VPS

/reseller/{resellerId}/addVPS
POSTOrder a VPS

Orders a new VPS and charges your account balance. Returns the new VPS ID on success.

If `cpanel` is provided, a cPanel licence is ordered and attached automatically.

**Warning:** This charges your account balance immediately.
If you have insufficient funds the call will fail and no service will be created.
**Note:** Available OS codes and VPS type identifiers can be retrieved
from the product catalogue endpoints.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/addVPS", [
            "configuration" => [
                "ApplicationId" => "string",
                "Name" => "string",
                "location" => "string"
            ],
            "forUser" => "string",
            "options" => [
                "os" => "string"
            ],
            "periodMonths" => 1,
            "type" => "string",
            "cpanel" => "string"
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • configurationrequiredobject

- `ApplicationId` (string,nullable) - Optional application ID to associate with the VPS.

- `Name` (string,required) - Display name for the VPS, e.g. `"vps-1234"`

- `location` (string,nullable) - Data centre location, e.g. `"dc_location-lhr"` or `"dc_location-dfw"`

+ `forUser` (string,nullable) - Stack user tuple to assign the VPS to, e.g. `"stack-user:588"`

+ `options` (object,required) -

- `os` (string,required) - Operating system code, e.g. `"rhel6"`. OS choice may affect the price.

+ `periodMonths` (number,required) - Contract duration in months

+ `type` (string,required) - VPS product type, e.g. `"vps-e"`

+ `cpanel` (string,nullable) - If set, orders and attaches a cPanel licence. One of:`cpaneladmin`, `cpanelplus`, `cpanelpro`, `cpanelpremier`, `cpanelpremiercloud`.

Headers

Authorization: Bearer token

+ Body

{
configuration:{
ApplicationId: "string",
Name: "string",
location: "string"
},
forUser: "string",
options:{
os: "string"
},
periodMonths: 1,
type: "string",
cpanel: "string"
}

+ Body

true

Order Website Turbo Credits

/reseller/{resellerId}/addWebsiteTurboCredits
POSTOrder Credits

Orders one or more Website Turbo credits and charges your account balance.

Once purchased, credits can be assigned to hosting packages.

**Warning:** This charges your account balance immediately.
If you have insufficient funds the call will fail and no credits will be created.
**Note:** A maximum of `10` credits can be ordered per request.
Enterprise resellers with invoicing enabled are billed separately.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/addWebsiteTurboCredits", [
            "quantity" => 1
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • quantityrequirednumberNumber of Website Turbo credits to order. Maximum `10` per request.
Headers

Authorization: Bearer token

+ Body

{
quantity: 1
}

+ Body

true

Renew Domain Name

/reseller/{resellerId}/renewDomain
POSTRenew a Domain Name

The "Renew a Domain Name" API endpoint allows you to renew a domain name. This operation charges the appropriate registration fee to your 20i Balance. If you do not have sufficient balance, the renewal will fail.

To use this API, you need to provide the following parameters:

$in: An array containing the following information:

name: The domain name that you want to renew.

years: The number of years for which you want to renew the domain.

renewPrivacy (optional): A boolean value indicating whether to renew the associated privacy for the domain. By default, this parameter is set to false.

The API call will return a boolean value indicating the success or failure of the domain renewal operation. A value of true indicates that the domain was renewed successfully, while false indicates a failure.

It's important to note that this API endpoint charges the registration fee for the domain renewal from your 20i Balance. Therefore, make sure you have sufficient balance before attempting to renew a domain.

This API endpoint is useful when you want to automate the domain renewal process and ensure that your domains are renewed for the desired number of years.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/renewDomain", [
            "name" => "string",
            "years" => 1,
            "renewPrivacy" => true
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • namerequiredstringThe domain name
  • yearsrequirednumber
  • renewPrivacyoptionalboolean,nullableRenew the associated privacy. Defaults to false
Headers

Authorization: Bearer token

+ Body

{
name: "string",
years: 1,
renewPrivacy: true
}

+ Body

true

Renew Managed VPS

/reseller/{resellerId}/renewManagedVPS
POSTRenew Managed VPS

Renews an existing Managed VPS subscription and charges your account balance.

**Warning:** This charges your account balance immediately.
If you have insufficient funds the call will fail and the Managed VPS will not be renewed.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/renewManagedVPS", [
            "id" => "string",
            "periodMonths" => 1
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • idrequiredstringThe ID of the Managed VPS to renew
  • periodMonthsrequirednumberNumber of months to renew for
Headers

Authorization: Bearer token

+ Body

{
id: "string",
periodMonths: 1
}

+ Body

true

Renew MSSQL Databases

/reseller/{resellerId}/renewMssql
POSTRenew an MSSQL database

The "Renew MSSQL Databases" API endpoint allows you to renew an MSSQL database by providing its ID. This API call is used to extend the validity or registration of an existing MSSQL database.

To renew an MSSQL database, you need to provide the following parameter in the request payload:

id: The ID of the MSSQL database that you want to renew.

Upon successful execution of the API call, the response will return a boolean value indicating the success of the renewal operation. The value true indicates that the MSSQL database was successfully renewed.

Please note that this API endpoint is designed for renewing MSSQL databases with 20i. It handles the renewal process by charging the appropriate fees and verifying the availability of funds in your 20i account.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/renewMssql", [
            "id" => "string"
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • idrequiredstring
Headers

Authorization: Bearer token

+ Body

{
id: "string"
}

+ Body

true

Renew Premium Mailbox

/reseller/{resellerId}/renewPremiumMailbox
POSTRenew Premium Mailbox

Renews a Premium Mailbox for one year and charges your account balance.

Premium Mailboxes always renew on an annual basis; there is no monthly option.

**Warning:** This charges your account balance immediately.
If you have insufficient funds the call will fail and the mailbox will not be renewed.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/renewPremiumMailbox", [
            "id" => "string"
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • idrequiredstringThe ID of the Premium Mailbox to renew
Headers

Authorization: Bearer token

+ Body

{
id: "string"
}

+ Body

true

Renew SSL Certificates

/reseller/{resellerId}/renewTlsCertificate
POSTRenew an SSL Certificate

Renew a certificate.

The "Renew an SSL Certificate" API endpoint allows you to renew an SSL certificate in your 20i account. This API call is used to extend the validity or registration of an existing SSL certificate.

To renew an SSL certificate, you need to provide the following parameters in the request payload:

id: The ID of the SSL certificate that you want to renew.

periodMonths: The number of months for which you want to renew the SSL certificate.

Upon successful execution of the API call, the response will return a boolean value indicating the success of the renewal operation. The value true indicates that the SSL certificate was successfully renewed.

Please note that this API endpoint handles the renewal process by charging the appropriate fee to your 20i Balance.

It checks if you have sufficient funds in your account, and if not, the renewal process will fail. Therefore, it is important to ensure that you have enough balance in your 20i account before making the API call to renew an SSL certificate.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/renewTlsCertificate", [
            "id" => "string",
            "periodMonths" => 1
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • idrequiredstring
  • periodMonthsrequirednumber
Headers

Authorization: Bearer token

+ Body

{
id: "string",
periodMonths: 1
}

+ Body

true

Renew SSL Certificates

/reseller/{resellerId}/renewTlsCertificatePre
POSTRenew an SSL Certificate

The "Renew an SSL Certificate" API endpoint allows you to renew an SSL certificate with the provided ID for a specified period in months. This operation extends the validity period of the SSL certificate.

To use this API, you need to provide the following parameters:

$in: An array containing the following information:

id: The ID of the SSL certificate that you want to renew.

periodMonths: The number of months for which you want to renew the SSL certificate.

The API call will return a float value or null. The float value represents the new expiration date of the SSL certificate in Unix timestamp format. If the renewal is unsuccessful or there is an error, the API will return null.

It's important to note that this API endpoint will charge the appropriate registration fee to your 20i balance.

If you don't have sufficient funds in your balance, the renewal will fail. Therefore, ensure that you have enough balance to cover the renewal fee before making the API call.

This API endpoint is useful when you want to automate the renewal process for SSL certificates and ensure that they remain valid and secure for an extended period.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/renewTlsCertificatePre", [
            "id" => "string",
            "periodMonths" => 1
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • idrequiredstring
  • periodMonthsrequirednumber
Headers

Authorization: Bearer token

+ Body

{
id: "string",
periodMonths: 1
}

+ Body

1.99

Renew VPS

/reseller/{resellerId}/renewVPS
POSTRenew VPS

Renews an existing VPS subscription and charges your account balance.

**Warning:** This charges your account balance immediately.
If you have insufficient funds the call will fail and the VPS will not be renewed.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/renewVPS", [
            "id" => "string",
            "periodMonths" => 1
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • idrequiredstringThe ID of the VPS to renew
  • periodMonthsrequirednumberNumber of months to renew for
Headers

Authorization: Bearer token

+ Body

{
id: "string",
periodMonths: 1
}

+ Body

true

Hosting Packages

Activate/Deactivate domain

/package/{packageId}/domain/{domainId}/userStatus
POSTActivate or deactivate

Activates or deactivates the service.

Possible subservice_name are 'default' for a typical set of services

and 'main' for the core service only.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/domain/{domainId}/userStatus", [
            "includeRepeated" => true,
            "subservices" => [
                "(subservice_name)" => true
            ]
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
  • includeRepeatedrequiredbooleanWhen reactivating, if true,this will revoke all your deactivations rather than

just the current one.

+ `subservices` (object,required) -

- ``subservice_name`` (boolean,required) - True to enable, false to disable.

Headers

Authorization: Bearer token

+ Body

{
includeRepeated: true,
subservices:{
(subservice_name): true
}
}

+ Body

true

Activate/Deactivate package

/package/{packageId}/userStatus
POSTActivate or deactivate

Activates or deactivates the service.

Possible subservice_name are 'default' for a typical set of services

and 'main' for the core service only.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/userStatus", [
            "includeRepeated" => true,
            "subservices" => [
                "(subservice_name)" => true
            ]
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • includeRepeatedrequiredbooleanWhen reactivating, if true,this will revoke all your deactivations rather than

just the current one.

+ `subservices` (object,required) -

- ``subservice_name`` (boolean,required) - True to enable, false to disable.

Headers

Authorization: Bearer token

+ Body

{
includeRepeated: true,
subservices:{
(subservice_name): true
}
}

+ Body

true

Bandwidth

/package/{packageId}/web/bandwidthStats
GETRetrieve Bandwidth Statistics

Returns hit counts and byte totals grouped by `daily` (last 24 hours),

`monthly` (last 30 days), and `yearly` (last 12 months) periods.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/bandwidthStats");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

daily:{

period: "string",

hits: 1,

bandwidth: 1

},

monthly:{

period: "string",

hits: 1,

bandwidth: 1

},

yearly:{

period: "string",

hits: 1,

bandwidth: 1

}

}

Clear Pending Install

/package/{packageId}/web/clearPendingInstall
GETClear Pending Install

Clears any pending install state from this virtual host, allowing a fresh

installation to be started.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/clearPendingInstall");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{}

Contacts

/package/{packageId}/domain/{domainId}/contacts
GETRetrieve Contacts for a Domain Name

Returns the current contacts for the domain name. This is a map of

contact types to contact data, in EPP format.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/domain/{domainId}/contacts");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token



+ Body

{

(contact-type):{

id: "string",

roid: "string",

clID: "string",

crID: "string",

crDate: "string",

trID: "string",

trDate: "string",

upID: "string",

upDate: "string",

status:{

-s: "string",

s: "string"

},

postalInfo:{

-type: "string",

type: "string",

name: "string",

org: "string",

addr:{

street: ["string"],

city: "string",

sp: "string",

pc: "string",

cc: "string"

}

},

voice: "string",

fax: "string",

email: "string",

disclose:{

-flag: true,

name:{

-type: "string"

},

org:{

-type: "string"

},

addr:{

-type: "string"

},

voice: NULL?FIXME,

fax: NULL?FIXME,

email: NULL?FIXME

},

extension:{

dateToSuspend: "string",

trad-name: "string",

type: "string",

co-no: "string",

opt-out: "string",

privacy: "string",

status: "string"

}

}

}

POSTSet Domain Contacts

Updates the contacts for the domain. Pass a map of EPP contact type names

(e.g. `"registrant"`, `"admin"`, `"billing"`, `"tech"`) to contact data

objects in `contactIn` format.

The required `extension` fields depend on the domain's TLD and registry.

**Nominet** (`.uk`, `.co.uk`, `.me.uk`, `.org.uk`, etc.): `type` is required — accepted values are `IND`, `FIND`, `LTD`, `PLC`, `PTNR`, `LLP`, `SCH`, `RCHAR`, `GOV`, `CRC`, `STAT`, `OTHER`. `trad-name` sets a trading name and `co-no` sets the company number (ignored when `type` is `OTHER`).

**Titan** (`.ie`): `type` is required. `language` (uppercased) and `cro-number` are optional.

**Tucows/OpenSRS**: `type` is mapped per TLD — `.ca` → `legal_type`; `.au`/`.com.au`/`.org.au` → `eligibility_type` (also sets `registrant_name`); `.dk` → `registrant_type` (normalised to `"individual"` or `"business"`); `.es` → `es_id_type`; `.us` → `app_purpose`; `.cl`, `.de`, `.fi`, `.hu`, `.lv`, `.mx`, `.my`, `.nu`, `.pt`, `.com.pt`, `.re`, `.ro`, `.com.ro`, `.se`, `.za`, `.co.za` → `registrant_type`; all other Tucows TLDs → `entity_type`. Additional optional fields: `language` (`lang`), `nationality-code`, `co-no`, `cro-number`, `fax`, `reg_code`, `country_of_citizenship`.

**CentralNic** — contacts are not supported; this endpoint returns `false`.

**Note:** For `.uk` domains (Nominet), the registrant name (or organisation
name if present) must match the existing record. If the names do not match,
the update will be silently rejected and the method will return `false`.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/domain/{domainId}/contacts", [
            "(contact-type)" => []
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token

+ Body

{
}

+ Body

true

Disk Usage Report

/package/{packageId}/web/requestDiskUsage
POSTRequest Disk Usage Report

Queues a disk usage report for this virtual host. Use the returned `reportId`

with "Get disk usage report" to fetch results once the task completes.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/requestDiskUsage", [
            "subDirectory" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • subDirectoryoptionalstring,nullableThe subdirectory to analyse; omit to analyse the full home directory
Headers

Authorization: Bearer token

+ Body

{
subDirectory: "string"
}

+ Body

{

reportId: 1,

directory: "string"

}

Document Roots

/package/{packageId}/web/documentRoots
GETRetrieve Document Roots

Returns a map of every DNS name on the site to its document root subdirectory.

Returns an empty array on error.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/documentRoots");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

(domain_name): "string"

}

Domain

/package/{packageId}/domain/{domainId}
GETRetrieve Domain Information

Returns a summary of the domain's current state, including linked services,

transfer status, registrant verification, renewal constraints, and DNSSEC support.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/domain/{domainId}");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token



+ Body

{

emulatesPositiveRenewal: true,

hasPackage: true,

hasPrivacy: true,

name: "string",

nameservers: ["string"],

pendingTransfer: true,

registrantIsVerified: true,

renewalConstraint:{

}

}

Domain Max Interval

/package/{packageId}/domain/{domainId}/renewalMultipleMaxHintFor
POSTGet domain max interval hint

Returns the maximum number of years by which this domain may currently be

renewed, given the supplied current expiry date. Registries impose a hard

cap on the total registered lifespan; this call computes the remaining

headroom.

**Note:** Cache this result by TLD rather than per-domain where possible.
The value changes as the expiry date advances.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/domain/{domainId}/renewalMultipleMaxHintFor", [
            "expiryDate" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
  • expiryDaterequiredstringThe current expiry date in any format acceptedby PHP's `DateTime` constructor, e.g. `"2026-04-01T00:00:00Z"`
Headers

Authorization: Bearer token

+ Body

{
expiryDate: "string"
}

+ Body

1

Domain Names/Subdomains

/package/{packageId}/names
GETRetrieve Names for a Package

Returns all domain names and subdomains attached to this package, normalised to lower case.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/names");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

["string"]

POSTAdd or Remove Names From a Package

Adds and/or removes domain names and subdomains from this package in a

single atomic call.

When adding names that are also registered (renewable) domains in your account:

When removing such a name, an empty web forwarding config is created automatically.

**Note:** You cannot remove the last name from a package. Attempting to do so
will throw an error.

- Full access to that domain name is required, otherwise the add is refused.

- Any existing web forwarding on the domain will be removed.

- Full access to that domain name is required, otherwise the add is refused.

- Any existing web forwarding on the domain will be removed.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/names", [
            "add" => ["string"],
            "rem" => ["string"],
            "chg" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • addoptionalarray[string],nullableNames to add. Already-mapped names are skipped silently.
  • remoptionalarray[string],nullableNames to remove.
  • chgoptionalstring,nullableThe new primary name used for StackCP and FTP accounts.Must be a name that will remain on the package after `$add`/`$rem` are applied.
Headers

Authorization: Bearer token

+ Body

{
add: ["string"],
rem: ["string"],
chg: "string"
}

+ Body

["string"]

Domain Names/Subdomains

/package/{packageId}/web/domainCheck
POSTRetrieve Domain Details

Classifies a given hostname as either a domain or a subdomain.

Both fields are `false` when no `domain` parameter is supplied.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/domainCheck", [
            "domain" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainrequiredstringThe hostname to inspect
Headers

Authorization: Bearer token

+ Body

{
domain: "string"
}

+ Body

{

domain: true,

subdomain: true

}

Domain Names/Subdomains

/package/{packageId}/web/names
POSTAdd Names to a Package

Adds or removes domain names and subdomains from this web service.

Adding a name that already exists updates its document root path.

**Note:** `add` accepts either a plain array of names or a map of
`name => subdirectory` pairs. The `chg` field changes the primary name
used for single-name functions such as the main FTP username.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/names", [
            "add" => ["string"],
            "rem" => ["string"],
            "chg" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • addrequiredarray[string]Plain array of names, or a map of names to document root subdirectories {
  • remrequiredarray[string]Names to remove
  • chgoptionalstring,nullableThe new primary name; defaults to the first name on the web
Headers

Authorization: Bearer token

+ Body

{
add: ["string"],
rem: ["string"],
chg: "string"
}

+ Body

["string"]

Domain Names/Subdomains

/package/{packageId}/web/updateDocRoot
POSTUpdate domain or subdomain document roots

Changes the document root subdirectory for one or more existing domains or

subdomains. The domain must already be attached to this web service.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/updateDocRoot", [
            "update" => [
                "(domain_name)" => "string"
            ]
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • updaterequiredobjectA map of domain names to new document root subdirectories {

- ``domain_name`` (string,required) - The new document root, e.g. `public_html/mysite`

Headers

Authorization: Bearer token

+ Body

{
update:{
(domain_name): "string"
}
}

+ Body

["string"]

Domain Price

/package/{packageId}/domain/{domainId}/servicePrice
GETRetrieve domain price

Returns the per-year renewal price for a premium domain, or `null` for

standard-priced domains (where the price is determined by TLD pricing tables).

**Note:** The returned value is always in GBP and excludes reseller markup.
Currency conversion and checkout markup must be applied separately.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/domain/{domainId}/servicePrice");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token



+ Body

1.99

Domain Privacy

/package/{packageId}/domain/{domainId}/privacy
GETRetrieve domain privacy settings

Returns the current configuration and status of the domain privacy service.

**Note:** The `type` field will be either `"contact"` (contact-substitution
privacy) or `"registrar"` (registrar-level privacy, currently only supported
for OpenSRS domains). The available fields in the response vary by type.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/domain/{domainId}/privacy");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token



+ Body

{

id: "string",

isEnabled: true,

type: "string",

emailDestination: "string",

prefix: "string"

}

POSTUpdate domain privacy

Updates the configuration of the domain privacy service.

**Note:** Not all privacy types support all configuration fields.
Supplying `emailDestination` for a privacy type that does not support it
will have no effect.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/domain/{domainId}/privacy", [
            "emailDestination" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
  • emailDestinationoptionalstring,nullableThe email address to forward masked contact email to,if supported by the privacy type
Headers

Authorization: Bearer token

+ Body

{
emailDestination: "string"
}

+ Body

{}

Domain Privacy

/package/{packageId}/domain/{domainId}/privacyState
POSTSet Domain Privacy State

Enables or disables the domain privacy service for this domain.

The domain must already have a privacy service object attached; this

endpoint only changes its active state, not its configuration.

**Note:** Returns `false` if no privacy service is attached to this domain.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/domain/{domainId}/privacyState", [
            "enabled" => true
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
  • enabledrequiredboolean`true` to enable privacy, `false` to disable it
Headers

Authorization: Bearer token

+ Body

{
enabled: true
}

+ Body

true

Domain Transfer Status

/package/{packageId}/domain/{domainId}/pendingTransferStatus
GETGet domain transfer status

Returns the cached registrar-level status string for the current

pending transfer, if any. This reflects the last polled value and

may not update in real time.

**Note:** Returns `null` if there is no pending transfer or if no
status has been polled yet. Use `pendingTransfer` to determine
whether a transfer is in progress.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/domain/{domainId}/pendingTransferStatus");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token



+ Body

string

Domain WHOIS

/package/{packageId}/domain/{domainId}/optOut
GETRetrieve WHOIS Disclosure Information for a Domain

Returns whether WHOIS contact disclosure is supported and currently

enabled for this domain. Only meaningful for registries that implement

opt-out (Nominet `.uk`) or have fixed policies (`.ca`, `.fr`).

**Note:** For `.ca` domains, `canSet` is always `false` and disclosure
cannot be changed. For `.fr` domains, disclosure is automatic and
`enabled` is `true` only when the registrant has no organisation set.
For all other TLDs, all fields return `null`.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/domain/{domainId}/optOut");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token



+ Body

{

canSet: true,

enabled: true,

hasValidContact: true

}

POSTUpdate WHOIS optout

Updates the WHOIS contact-disclosure (opt-out) setting at the registry.

Currently only meaningful for Nominet `.uk` domains. Has no effect if

domain privacy is active (privacy supersedes disclosure settings).

**Note:** Disclosure settings vary by registry. Check `getOptOut` first
to confirm that `canSet` is `true` before calling this endpoint.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/domain/{domainId}/optOut", [
            "enabled" => true
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
  • enabledrequiredboolean`true` to enable disclosure (opt in), `false` to suppress it (opt out)
Headers

Authorization: Bearer token

+ Body

{
enabled: true
}

+ Body

{

result:{

msg: "string"

}

}

getPackageWebInfo

/package/{packageId}/web/info
GETRetreive

Returns basic information about the site.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/info");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

id: "string",

hasBackups: true,

label: "string",

name: "string",

names: ["string"],

platform: "string",

setupComplete: true,

typeRef: "string",

hasSsl:{

webName: true

}

}

Home Directory

/package/{packageId}/web/homeDirectory
GETRetrieve the Home Directory

Returns the absolute UNIX home directory path for this web site as reported

by the hosting platform.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/homeDirectory");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

string

Limits Domain

/package/{packageId}/domain/{domainId}/limits
POSTRetrieve Limits for a Domain

Returns the feature-access limits for the current user as a key-value map.

The `lock` capability is additionally constrained by whether the TLD supports

locking at the registry.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/domain/{domainId}/limits");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token



+ Body

{

addFreeWeb: true,

contacts: true,

dns: true,

email: true,

lock: true,

nameservers: true,

pushTransfer: true,

webForward: true,

whois: true,

}

Limits Package

/package/{packageId}/limits
GETRetrieve Limits for a Package

Returns the effective limits for the authenticated user on this package,

as a key-value map. Autoscale packages have their `webspace` and `bandwidth`

values overridden by the autoscale allowance.

**Note:** This endpoint requires the package to have an associated web object.
Calling it on a package without one will result in an error.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/limits");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

{

ftp: true,

temporaryURL: true,

mssqlDatabases: 1,

timelineBackups: true

}

}

Limits Web

/package/{packageId}/web/limits
GETRetrieve Limits for a web

Returns the effective usage limits for the current session user on this

web service. Autoscale allowance disk and bandwidth values override the

package defaults when applicable.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/limits");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

}

List Packages

/package
GETRetrieve Information for all Packages

Returns summary information for every hosting package in the account,

suitable for building a package listing UI.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package");
Headers

Authorization: Bearer token



+ Body

[

{

id: 1,

enabled: true,

externalId: 1,

created: "string",

name: "string",

names: ["string"],

packageTypeName: "string",

packageTypePlatform: "string",

productSpec: "string",

stackUsers: ["string"],

typeRef: "string",

web:{

{

id: "string",

hasBackups: true,

label: "string",

name: "string",

names: ["string"],

platform: "string",

setupComplete: true,

typeRef: "string",

hasSsl:{

webName: true

}

}

}

}

]

Logs

/package/{packageId}/web/logs
GETRetrieve Logs for a Package

Returns the access and error log file references for this site.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/logs");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

LogFiles: "string"

}

Maintenance Mode

/package/{packageId}/web/maintenanceMode
GETRetrieve Maintenance Mode Settings

Returns the maintenance mode configuration for each server alias on this

virtual host, including the HTML templates used for the maintenance and

login pages.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/maintenanceMode");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

{

alias: "string",

aliasId: 1,

maintenanceEnabled: true,

maintenancePasswordProtected: true,

maintenancePageHtml: "string",

maintenanceLoginPageHtml: "string"

}

]

POSTSet Maintenance Mode Settings

Set maintenance mode settings for this web

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/maintenanceMode");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

{

alias: "string",

aliasId: 1,

maintenanceEnabled: true,

maintenancePasswordProtected: true,

maintenancePageHtml: "string",

maintenanceLoginPageHtml: "string"

}

]

Package

/package/{packageId}/web
GETRetrieve Package Information

Returns detailed information about the package.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

id: "string",

hasBackups: true,

label: "string",

platform: "string",

name: "string",

names: ["string"],

ftpUsers:{

},

ftp_credentials:{

},

typeRef: "string",

info:{

webserver: "string",

ip4Address: "string",

ip6Address: "string",

ftpserver: "string",

temporaryUrls:{

(domain_name): "string"

},

statsUrls:{

(service_name): "string"

},

},

packageTypeName: "string",

usage:{

MbIn: 1.99,

MbOut: 1.99,

ServerAliasCertificates:{

(type): ["string"]

},

},

setupComplete: true,

{

flags: ["string"]

}

}

Package

/package/{packageId}
GETRetrieve Information About a Package

Returns a full representation of the package, including its DNS zones,

email configuration, limits, and associated web object.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

canClaimName: {},

defaultDns:{

},

dns:{

(name): {}

},

domain:{

{

id: "string",

closeToAnniversary: true,

deadDate: "string",

expiryDate: "string",

name: "string",

hasPrivacy: true,

pendingTransfer: true,

registrantIsVerified: true,

registrantVerificationChecked: "string",

renewalConstraint:{

},

preferredRenewalMonths: 1

}

},

email:{

(name): {}

},

enabled: true,

id: "string",

internalTransfer:{

},

isDemo: true,

limits:{

},

names: {},

sessionlimits:{

},

defaultHtml:{

},

stackBilling:{

},

stackUsers: ["string"],

status: {},

typeRef: "string",

web: {}

}

Package Add

/reseller/{resellerId}/addWeb
POSTAdd a Hosting Package

The "Package Add" API endpoint allows you to add hosting packages to your reseller account using the 20i API.

This endpoint enables you to create a new web hosting package and associate it with a specific web type reference. The package can include a web site with an initial domain name and additional domain names if needed.

To use this endpoint, you need to provide the necessary parameters in the request payload. The parameters include:

"type" (string): A reference to the web type, which is equivalent to the ID found in the "/packageTypes" endpoint. This parameter determines the configuration and features of the hosting package.

"domain_name" (string): The initial domain name for the web site associated with the package.

"extra_domain_names" (array of strings, optional): An array of zero or more additional domain names that you want to associate with the package.

"label" (string): A memorable name or label for the package.

"documentRoots" (array): A map that specifies the intended document roots for the domain names associated with the package. The keys of the map are the domain names, and the values are the corresponding document roots.

"stackUser" (string or null): An optional parameter that allows you to link an existing Stack user to the package.

If you provide the reference to an existing Stack user, and a welcome email is set for the package type, the welcome email will be sent to the user as soon as possible.

The API endpoint supports the following exceptions:

"ConflictingObject" exception: Thrown when there is a conflict with an existing object.

"InvalidRequest" exception: Thrown when the request is invalid or missing required parameters.

Upon successful execution of the API call, the endpoint returns the newly assigned ID for the hosting package.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/addWeb", [
            "type" => "string",
            "domain_name" => "string",
            "extra_domain_names" => ["string"],
            "label" => "string",
            "documentRoots" => [
                "(domain)" => "string"
            ],
            "stackUser" => "string",
            "packageTemplate" => "string"
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • typerequiredstringA web type reference, equivalent to the id in/packageTypes
  • domain_namerequiredstringThe initial domain name for the site
  • extra_domain_namesoptionalarray[string],nullableArray of zero or more extradomain names
  • labelrequiredstringThe memorable name for the package
  • documentRootsrequiredobjectA map of domain names to intended document

roots

- ``domain`` (string,required) -

+ `stackUser` (string,nullable) - eg. "stack-user:1". An existing Stackuser to link to the package.

+ `packageTemplate` (string,nullable) - The name of the blueprint package

Headers

Authorization: Bearer token

+ Body

{
type: "string",
domain_name: "string",
extra_domain_names: ["string"],
label: "string",
documentRoots:{
(domain): "string"
},
stackUser: "string",
packageTemplate: "string"
}

+ Body

1

Package Allowance Add

/reseller/{resellerId}/addStackUserPackageAllowance
POSTAdd a Hosting Package allowance

Adds a hosting package allowance for a stack user, defining the package bundle type

and the maximum number of packages that user may create under it.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/addStackUserPackageAllowance", [
            "type" => "string",
            "stackUser" => "string",
            "domainProvision" => "string",
            "manualAssign" => "string"
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • typerequiredstringEncodes the package bundle type, allowance count, and optionallya DC location in the format `"{packageBundleTypeId}-{allowance}"`,

e.g. `"12345-10"`. Append `-{locationCode}` to pin to a data centre,

e.g. `"12345-10-lhr"`.

+ `stackUser` (string,required) - The stack user tuple to assign the allowance to,e.g. `"stack-user:456"`

+ `domainProvision` (string,nullable) - Optional domain name to provision a websitefor immediately under the new allowance.

+ `manualAssign` (string,nullable) - Optional existing package ID to assign to thenew allowance immediately.

Headers

Authorization: Bearer token

+ Body

{
type: "string",
stackUser: "string",
domainProvision: "string",
manualAssign: "string"
}

+ Body

{

serviceId: "string",

label: "string",

platform: "string"

}

Package Allowance Update

/reseller/{resellerId}/updateStackUserPackageAllowance
POSTUpdate a Package Allowance

Updates one or more stack user package allowances. Supports deleting allowances

and changing the bundle type or allowance count on existing ones.

Returns `true` if at least one action was applied.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/updateStackUserPackageAllowance", [
            "delete-id" => ["string"],
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • delete-idoptionalarray[string],nullableArray of allowance IDs to delete.
  • upgrade-idoptionalobject,nullableMap of allowance ID to new type string in the format`"{packageBundleTypeId}-{allowance}"`, e.g. `["42" => "12345-20"]`.

Updates the bundle type and allowance count on the specified allowances.

Headers

Authorization: Bearer token

+ Body

{
delete-id: ["string"],
}

+ Body

true

Package Brand

/reseller/{resellerId}/packageTypeBrand
POSTRetrieve Package Brand Type

The "Retrieve Package Brand Type" API endpoint allows you to fetch the branding details for a specific package. It retrieves the package branding configuration associated with the provided package ID.

When making the API call, you need to provide the following parameter:

$in: An array containing the package ID. The package ID is specified as the "packageid" parameter.

The response from this API call will be an array containing the following information:

defaultPages: An array representing the default pages associated with the package branding. It includes the following keys:

IndexPageHtml: The HTML content of the index page.

DeactivatedPageHtml: The HTML content of the deactivated page.

ServiceUnavailablePageHtml: The HTML content of the service unavailable page.

MaintenanceLoginPageHtml: The HTML content of the maintenance login page.

The package branding configuration allows you to customize the appearance and content of various pages related to the package, such as the index page, deactivated page, service unavailable page, and maintenance login page.

By retrieving this configuration, you can access the default HTML content for these pages and modify them according to your needs.

Please note that the provided package ID is used to identify the specific package for which you want to fetch the branding details.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/packageTypeBrand", [
            "packageid" => "string"
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • packageidrequiredstring
Headers

Authorization: Bearer token

+ Body

{
packageid: "string"
}

+ Body

{

defaultPages:{

IndexPageHtml: "string",

DeactivatedPageHtml: "string",

ServiceUnavailablePageHtml: "string",

MaintenanceLoginPageHtml: "string"

}

}

Package Count

/reseller/{resellerId}/packageCount
GETGet package totals

The "Get package totals" API endpoint allows you to retrieve a count of packages split by their respective types.

The supported package types are "linux", "windows", and "wordpress". This API call provides information about the number of packages associated with each type.

The response from this API call will be an array containing the following counts:

linux: Represents the count of Linux web(s) or packages.

windows: Represents the count of Windows web(s) or packages.

wordpress: Represents the count of WordPress web(s) or packages.

Please note that this API endpoint is designed to provide an overview of the package distribution based on different types within the 20i platform.

It allows you to retrieve the total counts of packages associated with each type, such as Linux, Windows, and WordPress.

This API endpoint falls under the "Package Count" section and serves as a means to obtain the package totals categorized by their respective types.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/reseller/{resellerId}/packageCount");
  • resellerIdrequirednumberYour reseller ID.
Headers

Authorization: Bearer token



+ Body

{

linux: 1,

windows: 1,

wordpress: 1

}

Package Delete

/hosting/handleBulkDeleteWeb
POSTDelete a Package

Deletes one or more packages (web hosting sites) by their IDs. Packages

that have active site migration tasks or are a parent of another web

cannot be deleted and will return `false` in the result map.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/hosting/handleBulkDeleteWeb");
Headers

Authorization: Bearer token



+ Body

{

(package_id): true

}

Package Delete

/reseller/{resellerId}/deleteWeb
POSTDelete a Package

The "Package Delete" API endpoint allows you to delete one or multiple packages (web sites) using their respective IDs. This API call provides a way to remove unwanted packages or websites from your hosting environment.

To delete packages, you need to provide the following parameters in the request payload:

delete-id: An array of package IDs that you want to delete. Each package ID represents a specific web site or hosting package.

Upon successful execution of the API call, the response will return an array with the following structure:

$(ref): A boolean value indicating the success of the deletion operation. It represents whether the specified packages were successfully deleted.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/deleteWeb", [
            "delete-id" => ["string"]
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • delete-idrequiredarray[string]IDs of packages to be deleted
Headers

Authorization: Bearer token

+ Body

{
delete-id: ["string"]
}

+ Body

{

(ref): true

}

Package Type Limits

/package/{packageId}/bundleType/limits
GETRetrieve Package Type Limits

Returns the custom limit set configured for this package bundle type.

Infinite limits are represented as the string `"INF"` rather than a

numeric value.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/bundleType/limits");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

Package Types

/reseller/{resellerId}/packageTypes
GETList Package Types

The "List Package Types" API endpoint provides information about package types in the 20i reseller system.

A package type in 20i allows resellers to define specific limits and configurations for hosting packages.

These package types are essential for setting up new packages with predefined settings.

By making a request to this endpoint, you can retrieve information about the available package types.

The response will be an array of package type objects, where each object contains details about a specific package type.

The exact structure of the response can be found in the API documentation or additional documentation provided by 20i.

Upon successful execution of the API call, the endpoint will return the package type information in the response.

The package type objects typically include attributes such as the type's name, limits, configurations, or any other relevant information associated with the package type.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/reseller/{resellerId}/packageTypes");
  • resellerIdrequirednumberYour reseller ID.
Headers

Authorization: Bearer token



+ Body

[

{

{

extraData:{

temporaryUrlDomain: "string"

},

id: "string",

label: "string",

limits:{

},

platform: "string",

installApps: ["string"],

welcomeEmail: "string",

passwordResetEmail: "string"

}

}

]

POSTCreate a Package Type

The "Create a Package Type" API endpoint allows you to create a new package type in the 20i reseller system. A package type in 20i is used to define specific limits, configurations, and settings for hosting packages. This endpoint enables resellers to create custom package types tailored to their specific requirements.

To create a package type, you need to provide the necessary parameters in the request payload. The parameters include:

"label" (string): The customer label or name for the package type.

"platform" (string): The base operating system (OS) for the package type, such as "linux" or "windows".

"limit" (array): A map of limit codes to values, specifying the limits and configurations for the package type. The limit codes correspond to specific web limits and their respective values define the limits for the package type.

"installApps" (array or null): An optional parameter that specifies a plain array of app codes. These apps will be automatically installed when a package of this type is created. If not provided or set to null, no apps will be automatically installed.

"welcomeEmail" (array or null): An optional parameter that defines the content of the welcome email sent to customers when a package of this type is created. It includes the "from" address, the email "subject," and the email "data" (content).

"passwordResetEmail" (string or null): An optional parameter that specifies the email content for password reset instructions. If not provided or set to null, the default password reset email will be used.

"defaultPages" (array): A map of default pages for the package type. It includes optional HTML content for the "IndexPageHtml," "DeactivatedPageHtml," and "ServiceUnavailablePageHtml" pages.

"extraData" (array or null): An optional parameter that provides additional data specific to the package type. It includes the "temporaryUrlDomain" to use as the temporary URL domain and the "phpVersion" to specify the desired PHP version.

Upon successful execution of the API call, the endpoint will return the ID of the newly created package type.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/packageTypes", [
            "label" => "string",
            "platform" => "string",
            "limit" => [
            ],
            "installApps" => ["string"],
            "welcomeEmail" => [
                "from" => "string",
                "subject" => "string",
                "data" => "string"
            ],
            "passwordResetEmail" => "string",
            "defaultPages" => [
                "IndexPageHtml" => "string",
                "DeactivatedPageHtml" => "string",
                "ServiceUnavailablePageHtml" => "string"
            ],
            "extraData" => [
                "temporaryUrlDomain" => "string",
                "phpVersion" => "string"
            ]
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • labelrequiredstringThe customer label for this type
  • platformrequiredstringThe base OS for the type(something like "linux" or "windows")
  • limitrequiredobjectA limit code to value map, see web limits
  • installAppsoptionalarray[string],nullableA plain array of app codes which will be automatically

installed. Null is equivalent to the empty array here.

+ `welcomeEmail` (object,nullable) -

- `from` (string,required) -

- `subject` (string,required) -

- `data` (string,required) -

+ `passwordResetEmail` (string,nullable) -

+ `defaultPages` (object,required) -

- `IndexPageHtml` (string,nullable) -

- `DeactivatedPageHtml` (string,nullable) -

- `ServiceUnavailablePageHtml` (string,nullable) -

+ `extraData` (object,nullable) -

- `temporaryUrlDomain` (string,required) - The domain to use as the temp URL

- `phpVersion` (string,required) -

Headers

Authorization: Bearer token

+ Body

{
label: "string",
platform: "string",
limit:{
},
installApps: ["string"],
welcomeEmail:{
from: "string",
subject: "string",
data: "string"
},
passwordResetEmail: "string",
defaultPages:{
IndexPageHtml: "string",
DeactivatedPageHtml: "string",
ServiceUnavailablePageHtml: "string"
},
extraData:{
temporaryUrlDomain: "string",
phpVersion: "string"
}
}

+ Body

1

Package Types

/reseller/{resellerId}/updateWebType
POSTUpdate Package Types

The "Update Package Types" API endpoint allows you to update package types within your 20i account. This API call is used to modify various settings and configurations associated with package types.

To update package types, you need to provide the following parameters in the request payload:

delete-id: A set of IDs of items to delete.

extraData: A map of type ID to extra data settings. Currently, the only supported setting is "temporaryUrlDomain," which specifies the domain to use as the temporary URL.

id: A set of IDs to update.

installApps: A map of type ID to an array of app codes. These app codes represent the apps that will be automatically installed for the specified package types.

labels: An array that specifies the new labels for each package type.

limit: An array that defines the new limit values for various limits associated with each package type. The limit codes and their corresponding subcodes are used to set the limit values.

platform: Specifies the platform for the package types. This parameter is optional.

syncLimits: A map of type ID to true, indicating which package types should have their limits synchronized.

welcomeEmail: A map of type ID to welcome email settings, including the subject, from email address, and the full text/HTML content of the welcome email.

Upon successful execution of the API call, the response will return an array with the updated information for the package types.

Please note that this API endpoint is designed to handle the modification of package types within the 20i platform.

It provides flexibility in updating various settings and configurations associated with package types. If an invalid request is made, an exception of type "InvalidRequest" will be thrown.

This API endpoint falls under the "Package Types" section and allows you to manage and update the characteristics and configurations of different package types within your 20i account.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/updateWebType", [
            "delete-id" => ["string"],
            "extraData" => [
                "(id)" => [
                    "temporaryUrlDomain" => "string"
                ]
            ],
            "id" => ["string"],
            "installApps" => [
                "(type_id)" => ["string"]
            ],
            "labels" => [
            ],
            "limit" => [
                "(type_id)" => [
                    "(limit_code)" => true
                ]
            ],
            "platform" => "string",
            "syncLimits" => [
                "(type_id)" => true
            ],
            "welcomeEmail" => [
                "(id)" => [
                    "subject" => "string",
                    "from" => "string",
                    "content" => "string"
                ]
            ]
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • delete-idrequiredarray[string]Set of IDs of items to delete
  • extraDataoptionalobject,nullableA map of type ID to extra data settings - currently

temporaryUrlDomain

- ``id`` (object,required) -

- `temporaryUrlDomain` (string,required) - The domain to use as thetemp URL

+ `id` (array[string],required) - Set of IDs to update

+ `installApps` (object,nullable) - Map of type ID to array of app codes which will be

automatically installed. Null is equivalent to the empty array

here.

- ``type_id`` (array[string],required) -

+ `labels` (object,required) -

+ `limit` (object,required) -

- ``type_id`` (object,required) -

- ``limit_code`` (string,required) - The limit value to set

+ `platform` (string,nullable) -

+ `syncLimits` (object,required) - Map of type ID to true to indicate which

types should have their limits synchronised.

- ``type_id`` (boolean,required) -

+ `welcomeEmail` (object,nullable) - A map of type ID to welcome email settings

- ``id`` (object,nullable) -

- `subject` (string,required) - The welcome email subject

- `from` (string,required) - The from email address to use

- `content` (string,required) - The full text/html email content

Headers

Authorization: Bearer token

+ Body

{
delete-id: ["string"],
extraData:{
(id):{
temporaryUrlDomain: "string"
}
},
id: ["string"],
installApps:{
(type_id): ["string"]
},
labels:{
},
limit:{
(type_id):{
(limit_code): true
}
},
platform: "string",
syncLimits:{
(type_id): true
},
welcomeEmail:{
(id):{
subject: "string",
from: "string",
content: "string"
}
}
}

+ Body

{

}

Package Update

/reseller/{resellerId}/updatePackage
POSTUpdate/Delete a Package

The "Update/Delete a Package" API endpoint allows you to update or delete packages within your 20i account. This API call is used to modify the limits, labels, or delete web sites associated with a package.

To update or delete a package, you need to provide the following parameters in the request payload:

billing: An array that contains information about the customer's renewal date, renewal interval, preferred user, and other relevant details.

delete-id: An array of package IDs to be deleted.

id: An array of currently known package IDs.

labels: An array that specifies the new label for each package.

limit: An array that defines the new values for various limits associated with each package.

limit-set: An array that determines whether specific limits should be changed or removed.

packageBundleTypes: An array that specifies the new bundle type for each package.

Upon successful execution of the API call, the response will return an array with the IDs of the services that were updated or deleted.

Please note that this API endpoint is designed to handle the modification and deletion of packages within the 20i platform.

It requires the appropriate package IDs and parameters to perform the desired actions. If a package does not exist or the specified users do not have access, an exception will be thrown.

This API endpoint falls under the "Package Update" section and provides a flexible way to manage and modify packages associated with your 20i account.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/updatePackage", [
            "billing" => [
                "(package_id)" => [
                    "date" => "string",
                    "interval" => 1,
                    "preferredUser" => "string",
                ]
            ],
            "delete-id" => ["string"],
            "id" => ["string"],
            "labels" => [
                "(package_id)" => "string"
            ],
            "limit" => [
                "(package_id)" => [
                    "(limit_code)" => true
                ]
            ],
            "limit-set" => [
                "(package_id)" => [
                    "(limit_code)" => true
                ]
            ],
            "packageBundleTypes" => [
                "(package_id)" => "string"
            ]
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • billingrequiredobject

- ``package_id`` (object,required) -

- `date` (string,required) - The date when the customer is due to renewwith you, in ISO8601 format

- `interval` (number,required) - The typical renewal period your customeris using, in months.

- `preferredUser` (string,required) - The stackuser ident (eg stack-user:000)

+ `delete-id` (array[string],required) - IDs of packages to be deleted

+ `id` (array[string],required) - An array of currently known package IDs, see alsolimit and limit-set. Items not in this list will be

ignored except for "billing" and "delete-id" purposes.

+ `labels` (object,required) -

- ``package_id`` (string,nullable) - The new label for the package

+ `limit` (object,required) -

- ``package_id`` (object,required) -

- ``limit_code`` (string,required) - The new value for the given limit. Codes

currently include:

+ "allFutureOneClick" (boolean)

+ "accessErrorLogs" (boolean)

+ "accountSummary" (boolean)

+ "additionalFtpUsers" (number)

+ "allowExternalSsl" (boolean)

+ "allowForceSsl" (boolean)

+ "appManager" (boolean)

+ "apps" (set)

+ "awstats" (boolean)

+ "backups" (boolean)

+ "bandwidth" (number)

+ "blockVisitors" (boolean)

+ "cdnCaching" (boolean)

+ "cdnOptimisation" (boolean)

+ "cdnStatistics" (boolean)

+ "customDocRoot" (boolean)

+ "customPrimaryDocRoot" (boolean)

+ "directoryIndexing" (boolean)

+ "dns" (boolean)

+ "domainContacts" (boolean)

+ "domainPrivacy" (boolean)

+ "emailSummary" (boolean)

+ "fileManager" (boolean)

+ "freeSsl" (boolean)

+ "ftp" (boolean)

+ "googleTranslate" (boolean)

+ "highEmailNotification" (number)

+ "hotlinkProtection" (boolean)

+ "imapSync" (boolean)

+ "lowEmailNotification" (number)

+ "mailAutoresponders" (number)

+ "mailboxes" (number)

+ "mailCatchAllForwarders" (boolean)

+ "mailForwarders" (number)

+ "mailJunkFilterLogs" (boolean)

+ "mailJunkFilters" (boolean)

+ "maintenanceMode" (boolean)

+ "malwareScan" (boolean)

+ "malwareReport" (boolean)

+ "makePrimaryDomain" (boolean)

+ "manageWpDatabase" (boolean)

+ "manageWpDatabase" (boolean)

+ "manageWpPlugins" (boolean)

+ "manageWpThemes" (boolean)

+ "manageWpUsers" (boolean)

+ "manageWpAdminUsers" (boolean)

+ "manageWpSearchReplace" (boolean)

+ "manageWpSiteSettings" (boolean)

+ "manageWpStaging" (boolean)

+ "manageWpChecksumReport" (boolean)

+ "manageWpUpdates" (boolean)

+ "maxMailboxSize" (number)

+ "mssqlDatabases" (number)

+ "mysqlDatabases" (number)

+ "names" (boolean)

+ "nameservers" (boolean)

+ "nameserverCheck" (boolean)

+ "passwordProtectedDirectories" (boolean)

+ "platformReinstall" (boolean)

+ "phpConfig" (boolean)

+ "phpMyAdmin" (boolean)

+ "primaryFtpUnlock" (boolean)

+ "remoteMysql" (boolean)

+ "scheduledTasks" (boolean)

+ "sitemapGenerator" (boolean)

+ "ssh" (boolean)

+ "subdomains" (number)

+ "switchPhpVersion" (boolean)

+ "temporaryURL" (boolean)

+ "timelineBackups" (boolean)

+ "usageInformation" (boolean)

+ "webalizer" (boolean)

+ "webBuilder" (boolean)

+ "webmail" (boolean)

+ "webRedirect" (boolean)

+ "webspace" (number)

+ "whois" (boolean)

+ "wpAdmin": (boolean)

+ `limit-set` (object,required) -

- ``package_id`` (object,required) -

- ``limit_code`` (boolean,required) - True if this limit is to be changedor removed, ie the counterpart "limit" entry

will be ignored unless this is true.

+ `packageBundleTypes` (object,required) - This requires corresponding entries in "id"

- ``package_id`` (string,required) - The new bundle type for the package.The new packageBundleType must be on the same platform.

Headers

Authorization: Bearer token

+ Body

{
billing:{
(package_id):{
date: "string",
interval: 1,
preferredUser: "string",
}
},
delete-id: ["string"],
id: ["string"],
labels:{
(package_id): "string"
},
limit:{
(package_id):{
(limit_code): true
}
},
limit-set:{
(package_id):{
(limit_code): true
}
},
packageBundleTypes:{
(package_id): "string"
}
}

+ Body

{

(ref): true

}

Pending Clone

/package/{packageId}/web/pendingClone
GETCheck if the package has a pending clone

Returns `true` if a clone operation is currently pending for this web service.

Returns `null` for email-only packages.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/pendingClone");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

true

Pending Split

/package/{packageId}/web/pendingSplit
GETGet the status of a package pending split job

Returns `true` while a package split job is in progress. Once the split

completes the new virtual host ID is stored and `false` is returned.

**Note:** Throws `NotFoundException` if neither an external ID nor a pending
split task can be found for this web.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/pendingSplit");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

true

Profile

/package/{packageId}/web/profileId
GETRetrieve profile ID

Returns the managed VPS profile ID for virtual-platform packages.

Returns `null` for all other platform types.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/profileId");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

string

Registry Information

/package/{packageId}/domain/{domainId}/upstreamExpiryDate
GETRetrieve Upstream Domain Expiry Date

Returns the expiry date recorded at the registry for this domain.

This is a live lookup and does not reflect the payment status or the

scheduled renewal date on the 20i platform.

**Note:** Returns `null` for domains with an incomplete transfer or
those that have been deleted at the registry.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/domain/{domainId}/upstreamExpiryDate");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token



+ Body

string

Scheduled Tasks

/package/{packageId}/web/tasks
GETRetrieve Scheduled Tasks

Returns all cron jobs currently configured on this virtual host.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/tasks");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

{

Command: "string",

Enabled: true,

Id: "string",

MailTo: "string",

TimeSpec: "string"

}

]

POSTCreate/Update/Delete a Scheduled Task

Update, create or delete cron task.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/tasks", [
            "new" => [
                "task" => [
                    {
                        "Enabled" => true,
                        "MailTo" => "string",
                        "TimeSpec" => "string",
                        "Command" => "string"
                    }
                ]
            ],
            "delete" => [
                "task" => [
                    "id" => ["string"]
                ]
            ],
            "update" => [
                "task" => [
                    {
                        "id" => "string",
                        "Enabled" => true,
                        "MailTo" => "string",
                        "TimeSpec" => "string",
                        "Command" => "string"
                    }
                ]
            ]
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • newoptionalobject,nullable

- `task` (array[object],required) -

+ `delete` (object,nullable) -

- `task` (object,required) -

- `id` (array[string],required) -

+ `update` (object,nullable) -

- `task` (array[object],required) -

Headers

Authorization: Bearer token

+ Body

{
new:{
task:{
Enabled: true,
MailTo: "string",
TimeSpec: "string",
Command: "string"
}
},
delete:{
task:{
id: ["string"]
}
},
update:{
task:{
id: "string",
Enabled: true,
MailTo: "string",
TimeSpec: "string",
Command: "string"
}
}
}

+ Body

[

{

}

]

Session Limits domain

/package/{packageId}/domain/{domainId}/sessionlimits
GETRetrieve session limits

Returns the limits for the session. If the user is a super user

then they are exempt from explicit limit restrictions.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/domain/{domainId}/sessionlimits");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token



+ Body

{

(code): true

}

Session Limits package

/package/{packageId}/sessionlimits
GETRetrieve session limits

Returns the effective limits for the current session. Superusers are

exempt from explicit limit restrictions. Child packages (those with a

parent web) have their `dns` limit forced to `0`. Cloud (non-20i)

packages have `trafficDistrubutionAllowed` set to `false`.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/sessionlimits");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

(code): true

}

Sitemap

/hosting/handleBulkSitemapGeneration
POSTBulk Sitemap generation

Generates and retrieves the sitemap for one or more packages

simultaneously.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/hosting/handleBulkSitemapGeneration");
Headers

Authorization: Bearer token



+ Body

{

(package_id):{

{

CreatedAt: "string",

LockState: "string",

OutputText: "string",

UploadAfterGeneration: true

}

}

}

Sitemap

/package/{packageId}/web/sitemap
GETCheck Sitemap Jobs

Returns the most recent sitemap generation job for this virtual host,

or `null` if no jobs have been run.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/sitemap");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

CreatedAt: "string",

LockState: "string",

OutputText: "string",

UploadAfterGeneration: true

}

POSTInitiate a Sitemap Job

Start a sitemap job.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/sitemap", [
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token

+ Body

{
}

+ Body

{

CreatedAt: "string",

LockState: "string",

OutputText: "string",

UploadAfterGeneration: true

}

Split Package

/reseller/{resellerId}/splitPackage
POSTSplit out additional domains to their own packages

The "Split Package" API endpoint allows you to split additional domains from a package into their own separate packages.

This can be useful when you want to manage domains individually or allocate separate resources to specific domains.

To split additional domains from a package, you need to provide the following parameters in the request payload:

packageId: The ID of the package from which the domains will be split.

domains: An array containing the details of the domains to be split. Each domain should have the following information:

fqdn: The fully qualified domain name (FQDN) of the domain.

databases: An optional array that can be used to specify any additional databases related to the split domains. The structure and details of this parameter are not provided in the given documentation.

Upon successful execution of the API call, the response will return an array or null value:

array: An array containing any relevant information or data related to the split operation.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/splitPackage", [
            "packageId" => "string",
            "domains" => [
                "fqdn" => "string"
            ],
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • packageIdrequiredstring
  • domainsrequiredobject

- `fqdn` (string,required) -

+ `databases` (object,required) -

Headers

Authorization: Bearer token

+ Body

{
packageId: "string",
domains:{
fqdn: "string"
},
}

+ Body

Subdomains

/package/{packageId}/web/subdomains
GETRetrieve a List of Subdomains

Returns only the subdomain names on this web service (i.e. names that are

subdomains of other attached names), mapped to their document root suffix.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/subdomains");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

(domain_name): "string"

}

POSTAdd a Subdomain

This does the same as POSTing to /names except that it enforces

the subdomain limit and disallows non-subdomains.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/subdomains", [
            "add" => ["string"],
            "rem" => ["string"]
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • addrequiredobject

- ``domain_name`` (string,required) - Document root

+ `rem` (array[string],required) -

Headers

Authorization: Bearer token

+ Body

{
add: ["string"],
rem: ["string"]
}

+ Body

["string"]

Transfers Cancel

/package/{packageId}/domain/{domainId}/cancelTransfer
POSTCancel a Domain Transfer

Cancels a pending incoming domain transfer and refunds the transfer cost

to the account balance.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/domain/{domainId}/cancelTransfer", [
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token

+ Body

{
}

+ Body

true

Transfers Change IPS Tag

/package/{packageId}/domain/{domainId}/tag
POSTUpdate IPS Tag

Changes the IPS tag (registrar tag) for a `.uk` domain, initiating an

outbound push-transfer to another Nominet registrar. Only applicable to

Nominet-registered domains.

**Warning:** If this operation succeeds the domain will immediately
transfer to the gaining registrar and will no longer be manageable
through this account. This action cannot be undone from here.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/domain/{domainId}/tag", [
            "new-tag" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
  • new-tagrequiredstringThe target registrar's IPS tag (e.g. `"ENOM"`)
Headers

Authorization: Bearer token

+ Body

{
new-tag: "string"
}

+ Body

true

Transfers EPP Code

/package/{packageId}/domain/{domainId}/authCode
GETRetrieve EPP Code

Returns the EPP auth code (transfer authorisation code) for the domain.

This code is required when initiating an outbound transfer at a gaining registrar.

**Note:** For some registries this call generates and sets a fresh authcode
at the registry rather than reading the existing one. Do not cache the result,
and avoid calling this while an inbound transfer is in progress as the code
rotation may interfere.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/domain/{domainId}/authCode");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token



+ Body

string

Transfers Info

/package/{packageId}/domain/{domainId}/transferInfo
GETRetrieve Transfer Information

Returns the state of the current or most-recent pending transfer.

If no transfer is pending, all fields reflect the absence of a transfer.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/domain/{domainId}/transferInfo");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token



+ Body

{

pending: true,

registrarStatus: "string",

type: "string"

}

Transfers Lock status

/package/{packageId}/domain/{domainId}/canTransfer
GETRetrieve Transfer Flag

Returns whether the domain is currently unlocked (i.e. outbound transfers

are permitted).

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/domain/{domainId}/canTransfer");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token



+ Body

true

POSTAmend Domain Lock Status

Sets or clears the domain transfer lock (clientHold status) at the registry.

When locked, outbound transfers to another registrar will be rejected.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/domain/{domainId}/canTransfer", [
            "enable" => true
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
  • enablerequiredboolean`true` to unlock (allow transfers), `false` to lock (block transfers)
Headers

Authorization: Bearer token

+ Body

{
enable: true
}

+ Body

true

Transfers Modify

/package/{packageId}/domain/{domainId}/updateTransfer
POSTModify an Incoming Transfer

Modifies a pending incoming domain transfer — either re-sending the

admin-contact approval email or cancelling and restarting the transfer

with a new authcode or full configuration.

**Note:** `configuration` is only needed when you originally initiated a
simple transfer and now need to switch to a full contact-detail transfer
(OpenSRS-style). In most restart cases, omitting it reuses the original
configuration.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/domain/{domainId}/updateTransfer", [
            "action" => "string",
            "authInfo" => [
                "pw" => "string"
            ],
            "configuration" => [
            ]
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
  • actionrequiredstring`"restart"` to cancel and restart the transfer,or `"resend"` to resend the admin-contact approval email
  • authInfooptionalobject,nullableIgnored if `configuration` is provided {

- `pw` (string,required) - The new EPP authcode to use for a restart

+ `configuration` (object,nullable) - Full transfer configuration; if provided

- `` \PlatformActionQueue -

Headers

Authorization: Bearer token

+ Body

{
action: "string",
authInfo:{
pw: "string"
},
configuration:{
}
}

+ Body

true

Transfers Resend Verification

/package/{packageId}/domain/{domainId}/resendVerificationEmail
POSTResend Registrant Verification Email

Triggers a resend of the ICANN registrant verification email via the

registry API. Whether the registry acts on this depends on the domain's

current verification state; the response reflects the registry's success

status, not whether an email was ultimately delivered.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/domain/{domainId}/resendVerificationEmail", [
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token

+ Body

{
}

+ Body

true

Transfers Status

/package/{packageId}/domain/{domainId}/pendingTransfer
GETRetrieve Pending Transfer Status

Returns the current pending-transfer state for the domain.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/domain/{domainId}/pendingTransfer");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token



+ Body

true

Web Disk Usage

/package/{packageId}/web/diskUsage
POSTGet disk usage report

Fetches a previously requested disk usage report by its ID.

Use "Request Disk Usage Report" to create a report and obtain the `reportId`.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/diskUsage", [
            "reportId" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • reportIdrequiredstringThe ID of the report to retrieve
Headers

Authorization: Bearer token

+ Body

{
reportId: "string"
}

+ Body

{

Comments: "string",

CreatedAt: "string",

DiskUsageReportId: 1,

LockState: "string",

SubDirectory: "string",

UpdatedAt: "string"

}

Web Usage Stats

/package/{packageId}/web/usage
GETRetrieve web stats

Returns current-month bandwidth and disk usage statistics for this package.

For autoscale packages the values are sourced from the allowance rather than

the platform directly.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/usage");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

Bandwidth:{

MbIn: "string",

MbOut: "string",

Hits: "string"

},

DiskMb: "string",

SshPublicKeys: "string",

CronJobs: "string",

FtpAccounts: "string",

MySqlDatabases: "string",

MySqlUsers: "string",

ServerAliases: "string"

}

WHOIS

/package/{packageId}/domain/{domainId}/whois
GETRetrieve WHOIS Information

Returns the current live WHOIS text for the domain as a raw string.

**Note:** Only works for domains registered with 20i. Returns an empty
or error string for externally registered domains.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/domain/{domainId}/whois");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token



+ Body

string

Windows App Pool

/package/{packageId}/web/recycleApplicationPool
POSTRecycle Application Pool

Recycles the Windows IIS application pool for this virtual host, which

restarts the worker process without a full IIS restart.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/recycleApplicationPool", [
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token

+ Body

{
}

+ Body

true

Windows App Pool Config

/package/{packageId}/web/windowsConfiguration
GETRetrieve Application Pool Configuration

Returns the Windows IIS application pool settings for this virtual host,

including the pipeline mode and runtime version.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/windowsConfiguration");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

ApplicationPoolPipelineMode: "string",

ApplicationPoolRuntimeVersion: "string",

VirtualHostWindowsConfigurationId: 1

}

POSTUpdate Application Pool Configuration

Update the Windows application pool configuration. For example; the

runtime version, and the pipeline mode type.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/windowsConfiguration", [
            "ApplicationPoolPipelineMode" => "string",
            "ApplicationPoolRuntimeVersion" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • ApplicationPoolPipelineModerequiredstringThe application poolpipeline mode, either to

Integrated or Classic. (optional)

+ `ApplicationPoolRuntimeVersion` (string,required) - The application poolruntime version.

(optional)

Headers

Authorization: Bearer token

+ Body

{
ApplicationPoolPipelineMode: "string",
ApplicationPoolRuntimeVersion: "string"
}

+ Body

true

StackCP Users

Emails

/reseller/{resellerId}/passwordResetEmail
GETRetrieve the Password Reset Email Template

The "Retrieve the Password Reset Email Template" API endpoint allows you to retrieve the password reset email template or the default value.

This API call is used to obtain the content of the password reset email template, which can be customized for your specific needs.

The response from this API call will be a string representing the password reset email template.

It contains the content of the template that is either customized based on your configuration or the default value if no customization has been made.

Please note that this API endpoint is designed to provide access to the password reset email template within the 20i platform.

It allows you to retrieve the template content for further customization or to use the default template if no customization is required.

This API endpoint falls under the "Emails" section and serves as a means to retrieve the password reset email template or its default value.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/reseller/{resellerId}/passwordResetEmail");
  • resellerIdrequirednumberYour reseller ID.
Headers

Authorization: Bearer token



+ Body

string

POSTSet a password reset email

The "Set a password reset email" API endpoint allows you to set the template for the password reset email. You can provide the entire content of the email template.

Here are the details of the API endpoint:

$in: An array containing the following parameter:

content: The entire content of the password reset email template.

The API call requires an instance of the \Services\Model class as a parameter.

The API will return a boolean value, indicating whether the operation was successful. If the password reset email template is set successfully, the API will return true. Otherwise, it will return false.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/passwordResetEmail", [
            "content" => "string"
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • contentrequiredstringThe entire template content
Headers

Authorization: Bearer token

+ Body

{
content: "string"
}

+ Body

true

List StackCP Users

/package/{packageId}/domain/{domainId}/stackUserList
GETRetrieve Stack User list

Returns the StackCP sub-users that have been granted access to this domain.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/domain/{domainId}/stackUserList");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token



+ Body

[

{

userName: "string",

identity: "string"

}

]

List StackCP Users

/package/{packageId}/stackUserList
GETRetrieve Stack User list

Returns the StackCP users who have access to this package.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/stackUserList");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

{

userName: "string",

identity: "string"

}

]

Password Reset Email

/reseller/{resellerId}/resetPassword
GETSend a Password reset email

The "Send a Password Reset Email" API endpoint allows you to send a password reset email to a user. This email is sent when a password reset token is provided.

The API endpoint is designed to work in conjunction with the password reset functionality of the authentication service.

To use this API, you need to provide the following parameters:

$in: An array containing the following information:

token: The password reset token.

username (optional): The username associated with the account. This parameter is not required but can be provided for additional identification purposes.

url: The URL of the password reset page where the user will be redirected to. This URL should be in the format of "http://example.org/resetPassword" or a similar format.

The API call will return a boolean value indicating the success or failure of the password reset email sending operation. A value of true indicates that the email was sent successfully, while false indicates a failure.

This API endpoint is useful when you want to trigger a password reset email to a user who has requested to reset their password.

By providing the token, username (optional), and the URL of the password reset page, the API will send an email to the user with instructions on how to proceed with the password reset process.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/resetPassword", [
            "token" => "string",
            "username" => "string",
            "url" => "string"
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • tokenrequiredstringReset token
  • usernameoptionalstring,nullable
  • urlrequiredstringPassword reset page URL, likehttp://example.org/resetPassword
Headers

Authorization: Bearer token

+ Body

{
token: "string",
username: "string",
url: "string"
}

+ Body

true

Stack User

/reseller/{resellerId}/stackUser/{stackUserId}
GETGet stack user.

Returns a detailed representation of the stack user, including whether

a master FTP account is configured.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/reseller/{resellerId}/stackUser/{stackUserId}");
  • resellerIdrequirednumberYour reseller ID.
  • stackUserIdrequiredstringFIXME
Headers

Authorization: Bearer token



+ Body

{

id: "string",

masterFtp: true,

name: "string",

contact:{

},

totpRequired: true,

haveTotp: true

}

Stack User FTP locks

/reseller/{resellerId}/stackUser/{stackUserId}/ftpLocks
GETGet stack user FTP locks.

Returns the IP ACL entries restricting FTP access for this stack user's

master FTP account, keyed by their ACL record ID.

**Note:** Returns an empty array if this user has no master FTP account.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/reseller/{resellerId}/stackUser/{stackUserId}/ftpLocks");
  • resellerIdrequirednumberYour reseller ID.
  • stackUserIdrequiredstringFIXME
Headers

Authorization: Bearer token



+ Body

{

(ref):{

MasterFtpAccountIpAclId: 1,

Ip4Address: "string",

Ip6Address: "string"

}

}

Stack User grants

/reseller/{resellerId}/stackUser/{stackUserId}/grants
GETGet stack user grants.

Returns the list of object tuples (e.g. `"package:123"`) that this stack

user has been granted access to.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/reseller/{resellerId}/stackUser/{stackUserId}/grants");
  • resellerIdrequirednumberYour reseller ID.
  • stackUserIdrequiredstringFIXME
Headers

Authorization: Bearer token



+ Body

["string"]

Stack User Package Allowance

/reseller/{resellerId}/stackUserPackageAllowance/{stackUserPackageAllowanceId}/addWeb
POSTAdd website to Stack User Package Allowance

Creates a new hosting package under this allowance and links it to the

owning StackCP user. The package type and data centre location are

determined by this allowance's configuration.

**Note:** Adding a website will fail if the allowance limit has already
been reached, or if the allowance's data centre location is not in your
list of permitted locations.
**Note:** Subdomains must be added to the same allowance as the root domain.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/stackUserPackageAllowance/{stackUserPackageAllowanceId}/addWeb", [
            "domain_name" => "string"
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • stackUserPackageAllowanceIdrequirednumberThe stack user package allowance id
  • domain_namerequiredstringThe primary domain name for the new package (e.g. `example.com`).
Headers

Authorization: Bearer token

+ Body

{
domain_name: "string"
}

+ Body

1

Stack User Package Allowance

/reseller/{resellerId}/stackUserPackageAllowance/{stackUserPackageAllowanceId}/update
POSTUpdate the packages set on this allowance

Replaces the full set of package IDs on this allowance to match the

provided list. Packages present in `$in` but not yet on the allowance

are added; packages currently on the allowance but absent from `$in`

are removed. Only packages belonging to the same namespace are eligible.

**Note:** Only the reseller (namespace owner) may call this endpoint.
Calling it as a sub-user will throw an `InvalidRequest` error.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/reseller/{resellerId}/stackUserPackageAllowance/{stackUserPackageAllowanceId}/update");
  • resellerIdrequirednumberYour reseller ID.
  • stackUserPackageAllowanceIdrequirednumberThe stack user package allowance id
Headers

Authorization: Bearer token



+ Body

{

add: 1,

remove: 1

}

Stack User Package Allowance

/reseller/{resellerId}/stackUserPackageAllowance/{stackUserPackageAllowanceId}
GETRetrieve Information About a Stack User Package Allowance

Returns full details for this allowance, including the current package

ID list and any in-progress migration data.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/reseller/{resellerId}/stackUserPackageAllowance/{stackUserPackageAllowanceId}");
  • resellerIdrequirednumberYour reseller ID.
  • stackUserPackageAllowanceIdrequirednumberThe stack user package allowance id
Headers

Authorization: Bearer token



+ Body

{

{

allowance: "string",

allowanceRemaining: "string",

allowanceUsed: 1,

bundleTypeId: "string",

id: "string",

label: "string",

location: "string",

platform: "string",

packageIds: ["string"],

productSpec: "string",

migrationData:{

}

}

}

StackCP Users

/reseller/{resellerId}/explicitStackUserCheck
POSTCheck if a stack user exists
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/explicitStackUserCheck", [
            "email" => "string"
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • emailrequiredstringThe email address
Headers

Authorization: Bearer token

+ Body

{
email: "string"
}

+ Body

StackCP Users

/reseller/{resellerId}/susers
POSTUpdate or create StackCP Users

The "Update StackCP Users" API endpoint allows you to update your StackCP users. You can modify various details of the users, such as their contact information, FTP access, grant permissions, and more.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/susers", [
            "contact" => [
                "(user_ref)" => [
                    "person_name" => "string",
                    "company_name" => "string",
                    "address" => "string",
                    "city" => "string",
                    "sp" => "string",
                    "pc" => "string",
                    "cc" => "string",
                    "voice" => "string",
                    "notes" => "string",
                    "billing_ref" => "string",
                    "email" => "string",
                ]
            ],
            "ftpLock" => [
                "(user_ref)" => [
                    "existing" => [
                        "(lock_ref)" => [
                            "Ip4Address" => "string",
                            "Ip6Address" => "string",
                            "delete" => true
                        ]
                    ],
                    "new" => [
                        {
                            "Ip4Address" => "string",
                            "Ip6Address" => "string"
                        }
                    ]
                ]
            ],
            "grant_map" => [
                "(user_ref)" => [
                    "(service_ref)" => true
                ]
            ],
            "masterFtpAcl" => [
                "(user_ref)" => [
                    "Ip4Address" => ["string"]
                ]
            ],
            "newUser" => [
                "person_name" => "string",
                "company_name" => "string",
                "address" => "string",
                "city" => "string",
                "sp" => "string",
                "pc" => "string",
                "cc" => "string",
                "voice" => "string",
                "notes" => "string",
                "billing_ref" => "string",
                "email" => "string",
                "nominet_contact_type" => "string",
                "sendNewStackUserEmail" => true,
                "isAgencyClient" => true,
            ],
            "users" => [
                "(user_ref)" => [
                    "password" => "string",
                    "delete" => true
                ]
            ],
            "masterFtp" => [
            ]
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • contactrequiredobject

- ``user_ref`` (object,required) - The Stack user's contact details (for your reference)

- `person_name` (string,required) -

- `company_name` (string,nullable) -

- `address` (string,required) - Newline-separated lines withpossible trailling commas. At most 3 lines are

allowed.

- `city` (string,required) -

- `sp` (string,required) -

- `pc` (string,required) -

- `cc` (string,required) -

- `voice` (string,required) -

- `notes` (string,required) -

- `billing_ref` (string,nullable) -

- `email` (string,required) - Please note that setting this willrename the user

+ `ftpLock` (object,required) -

- ``user_ref`` (object,required) - The addresses that a Stack user can access FTP from

- `existing` (object,required) -

- ``lock_ref`` (object,required) -

- `Ip4Address` (string,required) -

- `Ip6Address` (string,required) -

- `delete` (boolean,required) - If true, the entry will be deleted.

- `new` (array[object],required) -

+ `grant_map` (object,required) - For example, ["stack-user:1" => ["package:2" => true]]

- ``user_ref`` (object,required) -

- ``service_ref`` (boolean,required) - False to revoke, true to grant.

+ `masterFtpAcl` (object,nullable) -

- ``user_ref`` (object,required) -

- `Ip4Address` (array[string],required) -

+ `newUser` (object,required) - Details of a new Stack user to set up.

- `person_name` (string,nullable) -

- `company_name` (string,nullable) -

- `address` (string,required) - Newline-separated lines withpossible trailling commas. At most 3 lines are

allowed.

- `city` (string,required) -

- `sp` (string,required) -

- `pc` (string,required) -

- `cc` (string,required) - Country in ISO3166-alpha3 format

- `voice` (string,required) -

- `notes` (string,nullable) -

- `billing_ref` (string,nullable) -

- `email` (string,required) - Required

- `nominet_contact_type` (string,nullable) - Seehttp://registrars.nominet.uk/registration-and-domain-management/field-definitions-and-registrant-types#MainContent

- `sendNewStackUserEmail` (boolean,nullable) - If truethen a new stack user email will be sent to the

user

- `isAgencyClient` (boolean,nullable) - True if the client belongs to the agency hub

+ `users` (object,required) -

- ``user_ref`` (object,required) -

- `password` (string,required) - New password to use

- `delete` (boolean,required) -

+ `masterFtp` (object,required) -

Headers

Authorization: Bearer token

+ Body

{
contact:{
(user_ref):{
person_name: "string",
company_name: "string",
address: "string",
city: "string",
sp: "string",
pc: "string",
cc: "string",
voice: "string",
notes: "string",
billing_ref: "string",
email: "string",
}
},
ftpLock:{
(user_ref):{
existing:{
(lock_ref):{
Ip4Address: "string",
Ip6Address: "string",
delete: true
}
},
new:{
Ip4Address: "string",
Ip6Address: "string"
}
}
},
grant_map:{
(user_ref):{
(service_ref): true
}
},
masterFtpAcl:{
(user_ref):{
Ip4Address: ["string"]
}
},
newUser:{
person_name: "string",
company_name: "string",
address: "string",
city: "string",
sp: "string",
pc: "string",
cc: "string",
voice: "string",
notes: "string",
billing_ref: "string",
email: "string",
nominet_contact_type: "string",
sendNewStackUserEmail: true,
isAgencyClient: true,
},
users:{
(user_ref):{
password: "string",
delete: true
}
},
masterFtp:{
}
}

+ Body

{

updated: 1,

password: "string",

ref: "string"

}

Welcome Emails

/package/{packageId}/sendWelcome
POSTSend a Welcome Email

Sends or re-sends the welcome email for this package. By default the

email is dispatched to all StackCP users associated with the package

who have a stored contact address. Pass `toAddress` to override and

target a specific recipient instead.

**Note:** The package must have a welcome email template configured
on its bundle type, otherwise this is a no-op and returns `false`.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/sendWelcome", [
            "toAddress" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • toAddressoptionalstring,nullableOverride recipient address (e.g. `"user@example.com"`or `"Name <user@example.com>"`). Omit to send to all known contacts.
Headers

Authorization: Bearer token

+ Body

{
toAddress: "string"
}

+ Body

true

Domain Names

Domain Name Transfer

/reseller/{resellerId}/transferDomain
POSTTransfer a Domain Name

The "Transfer a Domain Name" API endpoint allows you to transfer a domain name to your 20i account using the 20i API. This API call initiates the process of transferring a domain name from another registrar to 20i.

To transfer a domain name, you need to provide the following parameters in the request payload:

name: The domain name that you want to transfer.

years: The number of years for which you want to transfer the domain. In most cases, this should be unset or set to 0 for UK transfers.

contact: An array containing contact information for the domain. This includes the organization, name, address, telephone, email, and other details required for domain contact updates.

emulateYears: If set to true, supplying years greater than 0 for registries that do not support years on transfer (e.g., .uk) will be treated as a transfer and renew operation.

otherContacts: An optional array of additional contacts associated with the domain transfer. These contacts may be ignored for some transfers.

authcode: The current EPP authcode required for CentralNIC transfers.

limits: A limit code to value map that specifies domain limits for the transfer.

nameservers: An array of nameserver hostnames for the domain. If not provided, default nameservers will be used. This parameter is ignored for UK transfers.

privacyService: If set to true, domain privacy service will be added to the transfer order. Please note that this may not be applicable to some TLDs.

stackUser: An optional parameter to grant access to a specific stack user.

Upon successful execution of the API call, the response will return a boolean value indicating whether the transfer purchase was accepted.

It's important to note that a successful response does not guarantee the success of the actual domain transfer process.

Please note that you can also use the contract#add method instead of this method, as it performs a simple reformatting to use that method. Refer to the documentation of the contract#add method for more details.

If there are insufficient funds in your 20i account balance to cover the transfer fee, the transfer will fail.

The appropriate transfer fee and any additional charges for services like privacy will be deducted from your 20i account balance.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/transferDomain", [
            "name" => "string",
            "years" => 1,
            "contact" => [
                "organisation" => "string",
                "name" => "string",
                "address" => "string",
                "telephone" => "string",
                "email" => "string",
                "cc" => "string",
                "pc" => "string",
                "sp" => "string",
                "city" => "string",
                "extension" => [
                ]
            ],
            "emulateYears" => true,
            "otherContacts" => [
                "(type)" => [
                    "name" => "string",
                    "organisation" => "string",
                    "address" => "string",
                    "city" => "string",
                    "sp" => "string",
                    "pc" => "string",
                    "cc" => "string",
                    "telephone" => "string",
                    "email" => "string",
                    "extension" => [
                    ]
                ]
            ],
            "authcode" => "string",
            "limits" => [
            ],
            "nameservers" => ["string"],
            "privacyService" => true,
            "stackUser" => "string"
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • namerequiredstringThe domain name
  • yearsrequirednumberThis should usually be unset or 0 for UK transfers,but see $emulateYears.
  • contactrequiredobjectThis is slightly different from updating domain

contacts, as noted.

- `organisation` (string,required) - As $org when updatingdomain contacts

- `name` (string,required) - As updating domain contacts

- `address` (string,required) - Newline-separated lines withpossible trailling commas. At most 3 lines are

allowed.

- `telephone` (string,required) - As $voice when updatingdomain contacts

- `email` (string,required) - As updating domain contacts

- `cc` (string,required) - As updating domain contacts

- `pc` (string,required) - As updating domain contacts

- `sp` (string,nullable) - As updating domain contacts

- `city` (string,required) - As updating domain contacts

- `extension` (object,nullable) - As updating domain contacts

+ `emulateYears` (boolean,nullable) - If true, supplying years > 0 forregistries which do not support years on transfer (eg, for .uk)

will be treated as transfer + renew.

+ `otherContacts` (object,nullable) -

- ``type`` (object,required) - These may be ignored for some transfers.

- `name` (string,required) -

- `organisation` (string,required) -

- `address` (string,required) - Newline-separated lines withpossible trailling commas. At most 3 lines are

allowed.

- `city` (string,required) -

- `sp` (string,required) -

- `pc` (string,required) -

- `cc` (string,required) - Country in ISO3166-alpha2 format

- `telephone` (string,required) -

- `email` (string,required) -

- `extension` (object,nullable) - As updating domain contacts

+ `authcode` (string,nullable) - The current EPP authcode, as needed forCentralNIC transfers

+ `limits` (object,nullable) - A limit code to value map, see domain limits

+ `nameservers` (array[string],nullable) - Nameserver hostnames, eg "ns.example.org". Otherwise you

get defaults.

Ignored for UK transfers.

+ `privacyService` (boolean,required) - If true, this will add domain privacy toyour order. This may not be applicable to some TLDs. Please

note that for .UK this is a chargeable service which is

different from turning off disclosure.

+ `stackUser` (string,nullable) - A stack user to grant access to, eg."stack-user:123"

Headers

Authorization: Bearer token

+ Body

{
name: "string",
years: 1,
contact:{
organisation: "string",
name: "string",
address: "string",
telephone: "string",
email: "string",
cc: "string",
pc: "string",
sp: "string",
city: "string",
extension:{
}
},
emulateYears: true,
otherContacts:{
(type):{
name: "string",
organisation: "string",
address: "string",
city: "string",
sp: "string",
pc: "string",
cc: "string",
telephone: "string",
email: "string",
extension:{
}
}
},
authcode: "string",
limits:{
},
nameservers: ["string"],
privacyService: true,
stackUser: "string"
}

+ Body

true

Domain Periods

/domain-period
GETList domain periods

Returns a map of all supported TLDs to their allowed registration period

options (in years). For example: `{".uk":[1,2,3,4,5,6,7,8,9,10]}`.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/domain-period");
Headers

Authorization: Bearer token



+ Body

{

(tld): [1]

}

Domain Premium Type

/domainPremiumType
GETPremium TLD Lookup

Returns a map of all supported TLDs to their premium pricing group code.

TLDs absent from the response have no premium pricing.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/domainPremiumType");
Headers

Authorization: Bearer token



+ Body

{

(tld): "string"

}

Domain Search

/domain-search/{prefix_or_name}
GETDomain Search Lookup

Searches for one or more domain names. If you provide a domain name,

this will search for that name only, otherwise it will search for that

prefix on all supported TLDs. You may supply multiple literal domain

names if you separate them with commas.

You may supply arbitrary text, which will be stripped down to something

suitable for domain search. This is typically useful with suggestions

on.

Under some circumstances this will attempt a detailed search, which will

fetch more specific information about transferrable domains. This will

happen if you search for one domain name.

Domain Suggestions

Our primary domain availability provider supports suggesting names based

on the search, using simple semantic permutations of the supplied

name(s). For example if you're searching for mailboxdelivery.com it might

suggest post-delivery.com, mailboxsend.net and my-mailbox-delivery.com.

These are supported only in a small set of TLDs (including .com, .net,

.org, .info). These names are probably available, and will get properly

checked at the end of the results, meaning that you will get two results:

one marked "suggestion" and a later one which looks like a direct domain

search result.

At the current time, setting the TLDs to search is not supported. If a

domain is returned which you aren't set up to sell, you should exclude it

from your view.

**Note:** Results are streamed as newline-delimited JSON. Each result
object appears on its own line as soon as it is available, so response
order will differ from the header order.
**Note:** This endpoint is subject to usage limits. Exceeding the limit
will block further access for up to 24 hours.

------------------

------------------

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/domain-search/{prefix_or_name}");
  • prefix_or_namerequiredstringFIXME
Headers

Authorization: Bearer token



+ Body

[

{

header:{

names: ["string"]

},

name: "string",

can: "string",

expiryDate: "string",

hasRight: "string",

maxYears: 1,

price: 1.99,

push_transfer_registrar: "string",

startsNewPeriod: true

}

]

Domain Verification

/domainVerification
GETRetrieve Domain Verification Status

Returns a list of all domain names on the account with their ICANN

verification status.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/domainVerification");
Headers

Authorization: Bearer token



+ Body

[

{

{

id: "string",

closeToAnniversary: true,

deadDate: "string",

expiryDate: "string",

name: "string",

hasPrivacy: true,

pendingTransfer: true,

registrantIsVerified: true,

registrantVerificationChecked: "string",

renewalConstraint:{

},

preferredRenewalMonths: 1

}

}

]

List Domains

/domain
GETRetrieve List of Domain Names

Returns a summary record for this domain. The fields included vary

by the `purpose` context — e.g. `"privacy"` includes `hasPrivacy`,

`"verification"` includes `registrantIsVerified`.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/domain");
Headers

Authorization: Bearer token



+ Body

[

{

id: "string",

closeToAnniversary: true,

deadDate: "string",

expiryDate: "string",

name: "string",

hasPrivacy: true,

pendingTransfer: true,

registrantIsVerified: true,

registrantVerificationChecked: "string",

renewalConstraint:{

},

preferredRenewalMonths: 1

}

]

Nominet Brand

/reseller/{resellerId}/nominetBrand
GETFetch your nominet brand

The "Fetch your nominet brand" API endpoint allows you to retrieve your current Nominet brand settings.

This API call is used to obtain information about your Nominet brand, including the presence of a Nominet reseller, email address, trading name, URL, and phone number associated with your brand.

The response from this API call will be an array containing the following brand settings:

nominetReseller: Indicates whether a Nominet reseller exists for your brand. This field can be null if there is no Nominet reseller.

ukResellerEmail: Represents the email address associated with your brand, which is typically used as the support email address. This field can be null if no email address is provided.

ukResellerTradingName: Specifies the trading name associated with your brand, which is typically the business name. This field can be null if no trading name is specified.

ukResellerUrl: Provides the URL associated with your brand, typically used as the support URL. This field can be null if no URL is provided.

ukResellerVoice: Represents the phone number to display on your customers' UK domain WHOIS information.

Please note that this API endpoint is designed to provide access to your Nominet brand settings within the 20i platform.

It allows you to retrieve important information related to your brand, such as reseller status, contact details, and website information.

This API endpoint falls under the "Nominet Brand" section and serves as a means to fetch and retrieve your current Nominet brand settings.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/reseller/{resellerId}/nominetBrand");
  • resellerIdrequirednumberYour reseller ID.
Headers

Authorization: Bearer token



+ Body

{

nominetReseller: "string",

ukResellerEmail: "string",

ukResellerTradingName: "string",

ukResellerUrl: "string",

ukResellerVoice: "string"

}

POSTSet/Update your nominet brand

The "Set/Update your nominet brand" API endpoint allows you to configure and update your Nominet reseller settings.

You can set or update various parameters related to your Nominet brand, such as the reseller email, trading name, URL, and phone number.

Here are the details of the API endpoint:

$in: An array containing the following parameters:

nominetReseller: A string value indicating the action to be performed. Use "c" to set up a Nominet reseller, "u" to update it, or "d" to delete it.

ukResellerEmail: The email address associated with your Nominet reseller.

ukResellerTradingName: The trading name of your Nominet reseller.

ukResellerUrl: The URL of your Nominet reseller.

ukResellerVoice: The phone number to be displayed on your customers' UK domain WHOIS information.

The API call may throw an exception of type \ServiceServer\Exception\Associated in case of any associated errors.

The API will return a boolean value, indicating whether the operation was successful. If the Nominet brand settings are set or updated successfully, the API will return true. Otherwise, it will return false.

Please note that this API endpoint may take some time to execute.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/nominetBrand", [
            "nominetReseller" => "string",
            "ukResellerEmail" => "string",
            "ukResellerTradingName" => "string",
            "ukResellerUrl" => "string",
            "ukResellerVoice" => "string"
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • nominetReselleroptionalstring,nullable"c" to set one up, "u" to updateit, "d" to delete it.
  • ukResellerEmailoptionalstring,nullableSame as supportEmailAddress
  • ukResellerTradingNameoptionalstring,nullableSame as businessName
  • ukResellerUrloptionalstring,nullableSame as supportUrl
  • ukResellerVoiceoptionalstring,nullableThe phone number to show on yourcustomers' UK domain WHOIS info.
Headers

Authorization: Bearer token

+ Body

{
nominetReseller: "string",
ukResellerEmail: "string",
ukResellerTradingName: "string",
ukResellerUrl: "string",
ukResellerVoice: "string"
}

+ Body

true

DNS & Nameservers

DNS

/package/{packageId}/domain/{domainId}/maxNameservers
GETCheck Maximum Number of Nameservers for a Domain

Returns the registry-enforced maximum number of nameservers permitted

for this domain's TLD.

**Note:** This value is the same for all domains sharing a TLD —
cache the result by TLD rather than fetching it per domain.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/domain/{domainId}/maxNameservers");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token



+ Body

1

DNS Default

/package/{packageId}/defaultDns
GETRetrieve Default DNS for a Package

Returns the recommended default DNS records for this package, including

standard mail (`MX`, `CNAME`) records for the stack mail platform and

hosting `A`/`AAAA` records from the web object. These are the records

you would apply to a domain to point it at this package.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/defaultDns");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

}

DNS Default

/package/{packageId}/domain/{domainId}/defaultDns
GETRetrieve Default DNS for a Package

Returns the recommended baseline DNS record set for this domain,

derived from the attached web and mail services. These records are

applied automatically when a domain is first registered or transferred.

**Note:** The returned set always includes standard StackMail MX and
CNAME records. If the domain is a reseller temporary-URL domain, wildcard
A records for regional clusters are also included.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/domain/{domainId}/defaultDns");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token



+ Body

{

A:{

host: "string",

ip: "string"

},

AAAA:{

host: "string",

ip: "string"

},

CNAME:{

host: "string",

target: "string"

},

MX:{

host: "string",

pri: 1,

target: "string"

},

TXT:{

host: "string",

txt: "string"

}

}

DNS google apps

/package/{packageId}/domain/{domainId}/dns/googleApps
GETRetrieve Google Apps DNS

Returns the DNS records required for a full Google Workspace (formerly G Suite)

deployment, covering mail, calendar, docs, and XMPP federation.

**Note:** Pass the returned records back in the `new` key when calling the
DNS update endpoint. It is strongly recommended that you also delete any
conflicting records (particularly existing MX and SPF TXT records) in the
same call to avoid mail delivery issues.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/domain/{domainId}/dns/googleApps");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token



+ Body

{

MX:{

host: "string",

pri: 1,

target: "string"

},

SRV:{

host: "string",

pri: 1,

weight: 1,

port: 1,

target: "string"

},

TXT:{

host: "string",

txt: "string"

},

CNAME:{

host: "string",

target: "string"

}

}

POSTAdd Google Apps DNS

Adds the full Google Workspace DNS record set (equivalent to fetching

`googleApps` and submitting those records). Existing records are not

removed unless `conflictPolicy` is set to `"replace"`.

**Note:** The default `conflictPolicy` is `"reject"`. If conflicting
records (e.g. existing MX entries) are present and you use `"reject"`,
the entire call will fail. Use `"replace"` to overwrite them automatically.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/domain/{domainId}/dns/googleApps", [
            "conflictPolicy" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
  • conflictPolicyoptionalstring,nullableHow to handle records that conflict with existing ones:`"reject"` (default) aborts on conflict, `"replace"` overwrites, `"ignore"` skips
Headers

Authorization: Bearer token

+ Body

{
conflictPolicy: "string"
}

+ Body

{}

DNS google mail

/package/{packageId}/domain/{domainId}/dns/googleAppsMailOnly
GETRetrieve Google Mail DNS

Returns the DNS records required for Google Mail (Gmail) only, without

the additional Google Workspace app and XMPP records.

**Note:** Pass the returned records back in the `new` key when calling the
DNS update endpoint. It is strongly recommended that you also delete any
conflicting MX and SPF TXT records in the same call.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/domain/{domainId}/dns/googleAppsMailOnly");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token



+ Body

{

MX:{

host: "string",

pri: 1,

target: "string"

},

TXT:{

host: "string",

txt: "string"

},

CNAME:{

host: "string",

target: "string"

}

}

POSTAdd Google Apps Mail DNS

Adds the Google Mail-only DNS record set (equivalent to fetching

`googleAppsMailOnly` and submitting those records). Existing records are

not removed unless `conflictPolicy` is set to `"replace"`.

**Note:** The default `conflictPolicy` is `"reject"`. If conflicting
records are present and you use `"reject"`, the entire call will fail.
Use `"replace"` to overwrite them automatically.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/domain/{domainId}/dns/googleAppsMailOnly", [
            "conflictPolicy" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
  • conflictPolicyoptionalstring,nullableHow to handle records that conflict with existing ones:`"reject"` (default) aborts on conflict, `"replace"` overwrites, `"ignore"` skips
Headers

Authorization: Bearer token

+ Body

{
conflictPolicy: "string"
}

+ Body

{}

DNS Nameservers

/package/{packageId}/domain/{domainId}/nameservers
GETRetrieve Nameservers for a Domain

Returns the nameservers currently registered at the registry for this domain.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/domain/{domainId}/nameservers");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token



+ Body

["string"]

POSTUpdate Nameservers for a Domain Name

Updates the nameservers for the domain at the registry. Supply the

nameservers to add in `ns` and the ones to remove in `old-ns`.

**Note:** If the supplied `old-ns` entries do not match what the registry
holds, the registry may reject the request. Do not include nameservers in
both `ns` and `old-ns` — some registries handle this incorrectly. Only
list names that are actually being added or removed.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/domain/{domainId}/nameservers", [
            "ns" => ["string"],
            "old-ns" => ["string"]
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
  • nsoptionalarray[string],nullableThe nameserver hostnames to add
  • old-nsoptionalarray[string],nullableThe nameserver hostnames to remove
Headers

Authorization: Bearer token

+ Body

{
ns: ["string"],
old-ns: ["string"]
}

+ Body

true

DNS office 365

/package/{packageId}/domain/{domainId}/dns/office365Mail
GETRetrieve Office 365 DNS

Returns the DNS records required for Microsoft 365 mail, including MX,

SPF, Autodiscover, Lync/Teams SRV, and mobile-device-management CNAME records.

**Note:** The MX hostname is derived from the domain name by replacing
dots and hyphens with a specific pattern required by Microsoft. Pass the
returned records back in the `new` key when calling the DNS update endpoint,
and delete any conflicting records in the same call.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/domain/{domainId}/dns/office365Mail");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token



+ Body

{

MX:{

host: "string",

pri: 1,

target: "string"

},

SRV:{

host: "string",

pri: 1,

weight: 1,

port: 1,

target: "string"

},

TXT:{

host: "string",

txt: "string"

},

CNAME:{

host: "string",

target: "string"

}

}

POSTAdd Office 365 DNS

Adds the Microsoft 365 DNS record set (equivalent to fetching

`office365Mail` and submitting those records). Existing records are not

removed unless `conflictPolicy` is set to `"replace"`.

**Note:** The default `conflictPolicy` is `"reject"`. If conflicting
records are present and you use `"reject"`, the entire call will fail.
Use `"replace"` to overwrite them automatically.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/domain/{domainId}/dns/office365Mail", [
            "conflictPolicy" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
  • conflictPolicyoptionalstring,nullableHow to handle records that conflict with existing ones:`"reject"` (default) aborts on conflict, `"replace"` overwrites, `"ignore"` skips
Headers

Authorization: Bearer token

+ Body

{
conflictPolicy: "string"
}

+ Body

{}

DNS retreive

/package/{packageId}/domain/{domainId}/dns
GETRetrieve DNS for a Domain Name

Returns the current DNS records for the domain, along with suggested nameservers.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/domain/{domainId}/dns");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token



+ Body

{

records:{

},

suggestedNameservers: ["string"]

}

POSTUpdate DNS for a Domain Name

Adds, replaces, or deletes DNS records for the domain. The DNS service

must be active (authoritative) for changes to take effect.

**Note:** Name prefixes are plain labels such as `"www"` or `"mail"`,
or `"@"` to target the domain root (typically used with A, AAAA, or MX
records).
**Note:** The platform may silently rewrite some additions as updates.
**Note:** CNAMEs are mutually exclusive with all other record types on
the same name (per RFC 1034/1912). A name can hold either exactly one
CNAME **or** one or more non-CNAME records, never both. Attempting to
add a CNAME alongside existing non-CNAME records (or vice versa) will
require you to explicitly delete the conflicting records first — this is
not done automatically unless `conflictPolicy` is `"replace"`.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/domain/{domainId}/dns", [
            "conflictPolicy" => "string",
            "insertPolicy" => "string",
            "new" => [
                "AAAA" => [
                    "host" => "string",
                    "ipv6" => "string",
                ],
                "A" => [
                    "host" => "string",
                    "ip" => "string",
                ],
                "CNAME" => [
                    "reuseId" => "string",
                    "host" => "string",
                    "target" => "string",
                ],
                "MX" => [
                    "host" => "string",
                    "target" => "string",
                    "pri" => "string",
                ],
                "TXT" => [
                    "host" => "string",
                    "txt" => "string",
                ],
                "SRV" => [
                    "host" => "string",
                    "pri" => "string",
                    "weight" => "string",
                    "port" => "string",
                    "target" => "string",
                ]
            ],
            "delete" => ["string"]
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
  • conflictPolicyoptionalstring,nullableOne of "replace", "reject" or"ignore", meaning that the old record will be deleted, the

transaction will be dropped with an error, or the new record

will be dropped respectively.

+ `insertPolicy` (string,nullable) - One of "replace" or "append"(default), meaning that any old records of the given type+name

will be deleted if "replace" is selected. Where conflict policy

has also been defined, that policy will be resolved first.

+ `new` (object,required) -

- `AAAA` (array[object],required) -

- `A` (array[object],required) -

- `CNAME` (array[object],required) -

- `MX` (array[object],required) -

- `TXT` (array[object],required) -

- `SRV` (array[object],required) -

+ `delete` (array[string],required) - An array of record IDs to delete,see the "dns" property.

Headers

Authorization: Bearer token

+ Body

{
conflictPolicy: "string",
insertPolicy: "string",
new:{
AAAA:{
host: "string",
ipv6: "string",
},
A:{
host: "string",
ip: "string",
},
CNAME:{
reuseId: "string",
host: "string",
target: "string",
},
MX:{
host: "string",
target: "string",
pri: "string",
},
TXT:{
host: "string",
txt: "string",
},
SRV:{
host: "string",
pri: "string",
weight: "string",
port: "string",
target: "string",
}
},
delete: ["string"]
}

+ Body

{}

DNSSEC

/package/{packageId}/domain/{domainId}/dnssec
GETGet DNSSEC status

Returns whether DNSSEC is currently enabled for this domain at the registry.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/domain/{domainId}/dnssec");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token



+ Body

true

POSTSet DNSSEC status

Enables or disables DNSSEC for this domain at the registry.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/domain/{domainId}/dnssec");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainIdrequirednumberThe domain ID retrieved from get domains.
Headers

Authorization: Bearer token



+ Body

true

List Virtual Nameservers

/personal_nameserver
GETGet Virtual Nameservers

Returns summary information for this virtual nameserver service,

suitable for building a listing.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/personal_nameserver");
Headers

Authorization: Bearer token



+ Body

[

{

id: "string",

name: "string"

}

]

Virtual Nameservers

/reseller/{resellerId}/virtualNameserver
GETGet virtual nameserver.

Returns full details for this virtual nameserver service.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/reseller/{resellerId}/virtualNameserver");
  • resellerIdrequirednumberYour reseller ID.
Headers

Authorization: Bearer token



+ Body

{

id: "string",

name: "string"

}

POSTSet virtual nameservers.

Sets the domain name used for this virtual nameserver service. Nameserver

glue DNS records (`A`/`AAAA`) are automatically created on the domain,

and the nameservers are registered with the relevant registries.

**Note:** The domain must already have DNS managed by 20i (i.e. it must
be an authoritative DNS zone in the same account). If it is not, the
call will return `false` and no changes will be saved.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/virtualNameserver", [
            "name" => "string"
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • namerequiredstringThe domain name to use (e.g. `example.org` to create`ns1.example.org`, `ns2.example.org`, etc.).
Headers

Authorization: Bearer token

+ Body

{
name: "string"
}

+ Body

Email & Mailboxes

Autoresponders

/package/{packageId}/email/{emailId}/responder
GETRetrieve Autoresponder Configuration

Returns the current autoresponder configuration for all mailboxes on the domain.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/email/{emailId}/responder");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • emailIdrequirednumberThe Email ID.
Headers

Authorization: Bearer token



+ Body

{

name: "string",

}

DKIM

/package/{packageId}/email/{emailId}/signature
GETRetrieve DKIM Signature

Returns all DKIM signing keys configured for the domain, including the

public/private key material and the DNS record values needed for publishing.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/email/{emailId}/signature");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • emailIdrequirednumberThe Email ID.
Headers

Authorization: Bearer token



+ Body

[

{

id: 1,

selector: "string",

identity: "string",

note: "string",

flags: "string",

keys:{

public: "string",

private: "string"

},

isDefault: true,

isStrict: true,

isEnabled: true,

domain: "string",

dnsRecordName: "string",

dnsRecordValue: "string"

}

]

POSTSet/Delete a DKIM signature

Creates, updates, deletes, or regenerates a DKIM signing key for the domain.

The `action` field selects the operation: `create`, `update`, `delete`, or `regenerate`.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/email/{emailId}/signature", [
            "action" => "string",
            "body" => [
                {
                    "Canonicalization" => "string",
                    "ExpiryTime" => 1,
                    "Flag" => "string",
                    "Granularity" => "string",
                    "IsDefault" => true,
                    "IsStrict" => true,
                    "Note" => "string",
                    "Selector" => "string",
                    "ServiceType" => "string"
                }
            ]
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • emailIdrequirednumberThe Email ID.
  • actionrequiredstringOne of `create`, `update`, `delete`, or `regenerate`
  • bodyrequiredarray[object]
Headers

Authorization: Bearer token

+ Body

{
action: "string",
body:{
Canonicalization: "string",
ExpiryTime: 1,
Flag: "string",
Granularity: "string",
IsDefault: true,
IsStrict: true,
Note: "string",
Selector: "string",
ServiceType: "string"
}
}

+ Body

{

code: {},

message: "string",

success: true,

dns:{

recordName: "string",

recordValue: "string"

}

}

DMARC

/package/{packageId}/email/{emailId}/dmarc
GETRetrieve DMARC

Returns all DMARC policies configured for the domain, including the

DNS record values needed for publishing.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/email/{emailId}/dmarc");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • emailIdrequirednumberThe Email ID.
Headers

Authorization: Bearer token



+ Body

[

{

id: 1,

selector: "string",

domain: "string",

dnsRecordName: "string",

dnsRecordValue: "string",

comments: "string",

owner: "string",

failureFeedbackAddress: "string",

aggregateFeedbackAddress: "string",

domainPolicy: "string",

subdomainPolicy: "string",

dkimAlignment: "string",

spfAlignment: "string",

seportingOptions: "string",

reportingFormat: "string",

reportingInterval: 1,

percentageApplied: 1

}

]

POSTSet/Delete a DMARC

Creates, updates, deletes, or regenerates a DMARC policy for the domain.

The `action` field selects the operation: `create`, `update`, `delete`, or `regenerate`.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/email/{emailId}/dmarc", [
            "action" => "string",
            "body" => [
                {
                    "Selector" => "string",
                    "DomainPolicy" => "string",
                    "SubdomainPolicy" => "string",
                    "DkimAlignment" => "string",
                    "SpfAlignment" => "string",
                    "FailureFeedbackAddress" => "string",
                    "AggregateFeedbackAddress" => "string",
                    "ReportingOptions" => ["string"],
                    "ReportingFormat" => "string",
                    "ReportingInterval" => 1,
                    "PercentageApplied" => 1
                }
            ]
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • emailIdrequirednumberThe Email ID.
  • actionrequiredstringOne of `create`, `update`, `delete`, or `regenerate`
  • bodyrequiredarray[object]
Headers

Authorization: Bearer token

+ Body

{
action: "string",
body:{
Selector: "string",
DomainPolicy: "string",
SubdomainPolicy: "string",
DkimAlignment: "string",
SpfAlignment: "string",
FailureFeedbackAddress: "string",
AggregateFeedbackAddress: "string",
ReportingOptions: ["string"],
ReportingFormat: "string",
ReportingInterval: 1,
PercentageApplied: 1
}
}

+ Body

{

code: {},

message: "string",

success: true,

dns:{

recordName: "string",

recordValue: "string"

}

}

Email Blacklist

/package/{packageId}/email/{emailId}/spamPolicyListBlacklist
GETRetrieve Blacklist Configuration

Returns the current spam policy blacklist (blocked senders) for the domain.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/email/{emailId}/spamPolicyListBlacklist");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • emailIdrequirednumberThe Email ID.
Headers

Authorization: Bearer token



+ Body

{

name: "string",

}

Email Domain

/package/{packageId}/email/{emailId}/domain
GETGet domain config

Returns the spam/reject scoring thresholds and identifier for the email domain.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/email/{emailId}/domain");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • emailIdrequirednumberThe Email ID.
Headers

Authorization: Bearer token



+ Body

{

domain:{

id: "string",

spamscore: 1,

rejectscore: 1

},

name: "string"

}

Email Domain Alias

/package/{packageId}/email/{emailId}/domainAlias
GETGet domain alias config

Returns the current domain alias configuration for the domain.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/email/{emailId}/domainAlias");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • emailIdrequirednumberThe Email ID.
Headers

Authorization: Bearer token



+ Body

{

name: "string",

}

Email Forwarder Config

/package/{packageId}/email/{emailId}/forwarder
GETGet email forwarder config

Returns the current forwarder configuration, including regular forwarders,

catch-all forwarders, and wildcard forwarders for the domain.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/email/{emailId}/forwarder");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • emailIdrequirednumberThe Email ID.
Headers

Authorization: Bearer token



+ Body

{

name: "string",

}

Email Forwarders

/package/{packageId}/allMailForwarders
GETRetrieve Email Forwarders

Returns all email forwarders for this package, grouped by domain name.

**Note:** Requires email access to be enabled on this package.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/allMailForwarders");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

(domain-name):{

id: "string",

remote: "string",

local: "string"

}

}

Email Stats

/package/{packageId}/email/{emailId}/stats
GETRetrieve mailbox stats

Returns per-folder message counts and storage usage for a single mailbox.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/email/{emailId}/stats");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • emailIdrequirednumberThe Email ID.
Headers

Authorization: Bearer token



+ Body

[

{

folder: "string",

messages: "string",

recent: "string",

unseen: "string",

vsize: "string"

}

]

Email Whitelist

/package/{packageId}/email/{emailId}/spamPolicyListWhitelist
GETRetrieve Whitelist Configuration

Returns the current spam policy whitelist (trusted senders) for the domain.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/email/{emailId}/spamPolicyListWhitelist");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • emailIdrequirednumberThe Email ID.
Headers

Authorization: Bearer token



+ Body

{

name: "string",

}

Forwarders

/package/{packageId}/email/{emailId}/mailForwarders
GETRetrieve Mailbox Forwarder Configuration

Returns the current mailbox (non-catch-all, non-wildcard) forwarder

configuration for the domain.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/email/{emailId}/mailForwarders");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • emailIdrequirednumberThe Email ID.
Headers

Authorization: Bearer token



+ Body

{

name: "string",

}

List Mailbox Quota Addon

/mailbox_quota_addon
GETList Mailbox Quota Addons

Returns a lightweight list of mailbox quota add-ons. Each entry

represents a 10 GB quota increase purchased for a specific mailbox.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/mailbox_quota_addon");
Headers

Authorization: Bearer token



+ Body

[

{

id: 1,

name: "string",

emailId: 1,

mailboxId: 1,

createdAt: "ISO8601",

updatedAt: "ISO8601"

}

]

List Premium Mailboxes

/premium_mailbox
GETList premium mailboxes.

Returns a lightweight list of premium mailboxes. Each premium mailbox

carries an expanded storage quota beyond the standard allocation.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/premium_mailbox");
Headers

Authorization: Bearer token



+ Body

[

{

id: 1,

name: "string",

emailId: 1,

mailboxId: 1,

createdAt: "ISO8601",

updatedAt: "ISO8601"

}

]

Mailbox Quota Addon

/mailbox_quota_addon/{id}
GETGet Mailbox Quota Addon

Returns the details of this mailbox quota add-on. Each add-on increases

the target mailbox's quota by 10 GB (`MAILBOX_MULTIPLE = 10240 MB`).

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/mailbox_quota_addon/{id}");
  • idrequiredstringFIXME
Headers

Authorization: Bearer token



+ Body

{

id: 1,

name: "string",

emailId: 1,

mailboxId: 1,

createdAt: "ISO8601",

updatedAt: "ISO8601"

}

Mailboxes

/package/{packageId}/email/{emailId}/mailbox
GETRetrieve Current Mailbox Configuration

Returns all mailboxes for the domain, including quota, usage, and

per-mailbox spam settings.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/email/{emailId}/mailbox");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • emailIdrequirednumberThe Email ID.
Headers

Authorization: Bearer token



+ Body

{

name: "string",

mailbox:{

{

highEmailNotification: {},

id: "string",

lastPasswordChange: {},

local: "string",

lowEmailNotification: {},

quotaMB: 1.99,

receive: true,

rejectscore: {},

send: true,

serviceLevel: "string",

spamscore: {},

usageMB: 1.99,

enabled: true

}

},

}

Manage Email Objects

/package/{packageId}/email/{emailId}
GETRetrieve Email Configuration for a Domain Name

Returns the full email configuration for the domain: a map of setting

types to arrays of settings, in the same format accepted by the `email`

update method but with an extra `id` property on each item.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/email/{emailId}");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • emailIdrequirednumberThe Email ID.
Headers

Authorization: Bearer token



+ Body

{

domain:{

id: "string",

rejectscore: "string",

spamscore: "string"

},

mailbox:{

enabled: true,

highEmailNotification: "string",

id: "string",

lastPasswordChange: "string",

local: "string",

lowEmailNotification: "string",

quotaMB: 1,

receive: true,

rejectscore: 1,

send: true,

spamscore: "string",

usageMB: 1

},

name: "string",

}

POSTAdd, Update or Delete Mailboxes, Forwarders & Autoresponders

Creates, updates, or deletes email objects (mailboxes, forwarders,

autoresponders, etc.) for the domain in a single call.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/email/{emailId}", [
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • emailIdrequirednumberThe Email ID.

+ `` (object,required) -

- `result` (array[object],required) - Only used for new items

- `name` (string,nullable) -

Headers

Authorization: Bearer token

+ Body

{
{
result:{
},
name: "string"
}
}

+ Body

{

{

result:{

},

name: "string"

}

}

Premium Mailbox

/premium_mailbox/{id}
GETRetrieve Premium Mailbox Information

Returns the service ID and full email address for this premium mailbox.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/premium_mailbox/{id}");
  • idrequiredstringFIXME
Headers

Authorization: Bearer token



+ Body

{

id: "string",

mail: "string"

}

Webmail

/package/{packageId}/email/{emailId}/webmail
POSTRetrieve the Webmail URL for a Mailbox

Generates a single-sign-on URL that logs the specified mailbox directly

into webmail without requiring a password.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/email/{emailId}/webmail", [
            "id" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • emailIdrequirednumberThe Email ID.
  • idrequiredstringThe mailbox ID (e.g. `m12345`)
Headers

Authorization: Bearer token

+ Body

{
id: "string"
}

+ Body

SSL/TLS Certificates

Resend SSL Approval Email

/tls_certificate/{id}/retryApproval
POSTResend SSL Approval Email

Resends the domain-control validation (DCV) approval email for a pending

email-validated SSL certificate.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/tls_certificate/{id}/retryApproval");
  • idrequiredstringFIXME
Headers

Authorization: Bearer token



+ Body

{}

SSL Add Free

/package/{packageId}/web/freeSSL
POSTAdd a Free SSL

This will toggle the free SSL for a web name. The lower level platform handles

nameserver checks.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/freeSSL", [
            "name" => "string",
            "enabled" => true
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • namerequiredstringThe name to toggle free SSL for.
  • enabledrequiredbooleanWhether to enable or disable freeSSL for the name specified.
Headers

Authorization: Bearer token

+ Body

{
name: "string",
enabled: true
}

+ Body

true

SSL Certificates

/package/{packageId}/web/certificates
GETRetrieve Installed SSL Certificates

Returns all SSL certificates installed across every server alias on this web.

Both Let's Encrypt (`letsencrypt/standard`) and externally installed certificates

are included.

**Note:** This endpoint makes one platform request per server alias and may be slow
for sites with many names.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/certificates");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

{

id: "string",

certificatePem: "string",

commonName: "string",

createdAt: "string",

provider: "string"

}

]

POSTRemove an SSL Certificate

Deletes one or more SSL certificates from this virtual host by their

`ServerAliasCertificateId`. Only certificates belonging to this virtual

host can be deleted.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/certificates", [
            "delete" => ["string"]
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • deleterequiredarray[string]Array of `ServerAliasCertificateId` values to delete
Headers

Authorization: Bearer token

+ Body

{
delete: ["string"]
}

+ Body

[true]

SSL Force status

/package/{packageId}/web/forceSSL
GETRetrieve Force HTTPS Status

Returns `true` when the `ForceSSL` flag is set on this virtual host,

causing all HTTP traffic to be redirected to HTTPS.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/forceSSL");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

true

POSTForce HTTPS for a Site

Sets the Force SSL flag for a site.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/forceSSL", [
            "value" => true
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • valuerequiredboolean
Headers

Authorization: Bearer token

+ Body

{
value: true
}

+ Body

true

SSL Install

/package/{packageId}/web/externalSSL
POSTInstall an External SSL Certificate

Installs a third-party (externally issued) SSL certificate against a server

alias on this virtual host. The certificate, key, and CA bundle are concatenated

and stored as a PEM bundle.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/externalSSL", [
            "name" => "string",
            "certificate" => "string",
            "key" => "string",
            "ca" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • namerequiredstringThe domain name the certificate covers
  • certificaterequiredstringThe certificate in PEM format
  • keyrequiredstringThe private key in PEM format
  • carequiredstringThe CA bundle or intermediate certificate in PEM format
Headers

Authorization: Bearer token

+ Body

{
name: "string",
certificate: "string",
key: "string",
ca: "string"
}

+ Body

true

WordPress

WordPress Admin Users

/package/{packageId}/web/wordpressAdministrators
GETRetrieve WordPress Administrator Users

Returns all users with administrator-level access in the WordPress installation.

Only available on WordPress-platform packages.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/wordpressAdministrators");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

{

ID: "string",

display_name: "string",

roles: "string",

user_email: "string",

user_login: "string",

user_registered: "string"

}

]

WordPress Blueprint

/wordpress_blueprint
GETGet WordPress blueprints

Returns all packages that have been enabled as a WordPress blueprint for

the current user. Only packages running WordPress are eligible.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/wordpress_blueprint");
Headers

Authorization: Bearer token



+ Body

[

{

packageId: 1,

packageName: "string"

}

]

POSTEnable/disable WordPress blueprint.

Toggles the blueprint status of a WordPress package. If the package is

already a blueprint it will be disabled; otherwise it will be enabled.

Only packages whose platform is `"wordpress"` can be used as blueprints.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/wordpress_blueprint");
Headers

Authorization: Bearer token



+ Body

WordPress Checksum

/package/{packageId}/web/wordpressChecksum
GETRetrieve Checksum Report

Runs a checksum verification of WordPress core files and returns any files

that differ from the official checksums. Only available on WordPress packages.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/wordpressChecksum");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

POSTFix Checksum

Ask to platform to fix any checksum issues

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/wordpressChecksum", [
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token

+ Body

{
}

+ Body

true

WordPress Database Check

/package/{packageId}/web/wordpressDbCheck
GETCheck WordPress Database

Runs the WordPress database integrity check and returns whether it passed.

Only available on WordPress packages.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/wordpressDbCheck");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

true

WordPress Install StackCache

/package/{packageId}/web/wordpressInstallStackCache
POSTInstall StackCache on a Package

Install the StackCache plugin for this package.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/wordpressInstallStackCache", [
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token

+ Body

{
}

+ Body

true

WordPress Install Status

/package/{packageId}/web/wordpressIsInstalled
GETCheck Installation Status

Returns `true` if WordPress is currently installed on this virtual host.

Delegates to "Retrieve Current WordPress Version".

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/wordpressIsInstalled");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

true

WordPress List Plugins

/package/{packageId}/web/wordpressPlugins
GETRetrieve Installed Plugins

Returns all plugins installed in the WordPress instance, excluding the

internal `wp-stack-cache` plugin. The response also includes a

`stackCacheInstalled` flag indicating whether that plugin was present.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/wordpressPlugins");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

plugins:{

name: "string",

status: "string",

update: "string",

version: "string"

},

stackCacheInstalled: true

}

POSTAmend/Remove a WordPress Plugin

Set status or remove a WordPress plugin.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/wordpressPlugins", [
            "type" => "string",
            "name" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • typerequiredstringone of activate|deactivate|remove
  • namerequiredstringthe plugin name
Headers

Authorization: Bearer token

+ Body

{
type: "string",
name: "string"
}

+ Body

true

WordPress Roles

/package/{packageId}/web/wordpressRoles
GETRetrieve WordPress Roles

Returns all roles defined in the WordPress installation.

Only available on WordPress packages.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/wordpressRoles");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

{

name: "string",

role: "string"

}

]

WordPress Search Replace

/package/{packageId}/web/wordpressSearchReplace
POSTInitiate a Search and Replace

Perform a WordPress search and replace.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/wordpressSearchReplace", [
            "search" => "string",
            "replace" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • searchrequiredstring
  • replacerequiredstring
Headers

Authorization: Bearer token

+ Body

{
search: "string",
replace: "string"
}

+ Body

true

WordPress Site Settings

/package/{packageId}/web/wordpressSettings
GETRetrieve WordPress Site Settings

Returns a map of allowed WordPress option names to their values.

Only a restricted set of options defined by the platform is included.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/wordpressSettings");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

(option_name): "string"

}

POSTUpdate WordPress Settings

Set a WordPress setting.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/wordpressSettings", [
            "option_name" => "string",
            "option_value" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • option_namerequiredstring
  • option_valuerequiredstring
Headers

Authorization: Bearer token

+ Body

{
option_name: "string",
option_value: "string"
}

+ Body

true

WordPress Staging

/package/{packageId}/web/wordpressStagingRemoveClone
POSTRemove Clone

Remove a staging clone by id

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/wordpressStagingRemoveClone", [
            "id" => 1
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • idrequirednumberclone id to remove
Headers

Authorization: Bearer token

+ Body

{
id: 1
}

+ Body

true

WordPress Staging Status

/package/{packageId}/web/wordpressStaging
GETCheck Staging Status

Returns platform staging clone details for this WordPress virtual host.

Only available on WordPress packages.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/wordpressStaging");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

POSTInitiate a Clone

Clone a new WordPress site either from live to staging or from staging to live.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/wordpressStaging", [
            "type" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • typerequiredstringone of "live" - copy from live to staging"staging" - copy from staging to live
Headers

Authorization: Bearer token

+ Body

{
type: "string"
}

+ Body

true

WordPress Themes

/package/{packageId}/web/wordpressThemes
GETRetrieve Installed Themes

Returns all themes installed in the WordPress instance.

Only available on WordPress packages.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/wordpressThemes");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

]

POSTAmend/Remove a WordPress Theme.

Set status (i.e. activate/deactivate) or remove a WordPress theme.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/wordpressThemes", [
            "type" => "string",
            "name" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • typerequiredstringone of activate|deactivate|remove
  • namerequiredstring
Headers

Authorization: Bearer token

+ Body

{
type: "string",
name: "string"
}

+ Body

true

WordPress Update

/package/{packageId}/web/wordpressUpdate
POSTUpdate WordPress Version

Update WordPress to the latest version.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/wordpressUpdate", [
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token

+ Body

{
}

+ Body

true

WordPress User List

/package/{packageId}/web/wordpressUsers
GETRetrieve WordPress Users

Returns all non-administrator WordPress users. For administrator users,

use "Retrieve WordPress Administrator Users".

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/wordpressUsers");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

{

ID: "string",

display_name: "string",

roles: "string",

user_email: "string",

user_login: "string",

user_registered: "string"

}

]

POSTCreate/Update a WordPress User

Sets users or creates a new one.

$user should be present if $type is create, otherwise null

$ID is required if $type is changePassword or remove

$password is required only if the $type is changePassword

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/wordpressUsers", [
            "type" => "string",
            "user" => [
                "display_name" => "string",
                "user_email" => "string",
                "user_login" => "string",
                "password" => "string"
            ],
            "ID" => "string",
            "password" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • typerequiredstringone of create, changePassword, remove
  • useroptionalobject,nullable

- `display_name` (string,required) -

- `user_email` (string,required) -

- `user_login` (string,required) -

- `password` (string,required) -

+ `ID` (string,nullable) -

+ `password` (string,nullable) -

Headers

Authorization: Bearer token

+ Body

{
type: "string",
user:{
display_name: "string",
user_email: "string",
user_login: "string",
password: "string"
},
ID: "string",
password: "string"
}

+ Body

true

WordPress Version

/package/{packageId}/web/wordpressVersion
GETRetrieve Current WordPress Version

Returns version and installation status information for the WordPress instance

on this virtual host. Only available on WordPress packages.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/wordpressVersion");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

current: "string",

installed: true,

isLatest: true,

isMultisite: true,

update: {},

wizardRequired: true,

siteURL: "string",

usablePrimaryDomainURL: "string"

}

CDN

CDN

/hosting/handleBulkCachePurge
POSTBulk cache purge

Purges the CDN cache for one or more packages simultaneously.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/hosting/handleBulkCachePurge");
Headers

Authorization: Bearer token



+ Body

{

(package_id): true

}

CDN Add Features

/package/{packageId}/web/addCdnFeature
POSTAdd CDN feature

Enables a single CDN feature on this virtual host by feature string.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/addCdnFeature", [
            "feature" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • featurerequiredstringThe machine-readable feature identifier to enable
Headers

Authorization: Bearer token

+ Body

{
feature: "string"
}

+ Body

1

CDN Bulk Add Features

/package/{packageId}/web/bulkAddCdnFeature
POSTBulk Add CDN feature

Enables multiple CDN features on this virtual host in a single request,

more efficient than calling "Add CDN feature" repeatedly.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/bulkAddCdnFeature", [
            "features" => ["string"]
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • featuresrequiredarray[string]An array of machine-readable feature identifiers to enable
Headers

Authorization: Bearer token

+ Body

{
features: ["string"]
}

+ Body

1

CDN Cache Report

/package/{packageId}/web/cacheReport
GETRetrieve CDN Cache Report

Returns cacheability analysis for recently served URLs on this site.

**Note:** Only available when the package has Website Turbo assigned.
The `nocache*` boolean fields indicate the reason a resource could not be cached.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/cacheReport");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

{

url: "string",

contentType: "string",

isCacheable: "string",

lastCached: "string",

nocacheHttpErr: true,

nocacheScheme: true,

nocacheSetCookie: true,

nocacheCacheControl: true,

nocachePragmaNoCache: true,

nocacheExpiresPast: true,

nocacheVary: true

}

]

CDN Delete Security Header

/package/{packageId}/web/deleteCdnSecurityHeader
POSTDelete security header

Removes a single security header from this virtual host by its `VirtualHostHeaderId`.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/deleteCdnSecurityHeader", [
            "headerId" => 1
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • headerIdrequirednumberThe `VirtualHostHeaderId` of the header to remove
Headers

Authorization: Bearer token

+ Body

{
headerId: 1
}

+ Body

1

CDN Delete Security Headers

/package/{packageId}/web/deleteCdnSecurityHeaders
POSTDelete all security headers

Removes every security header from this virtual host in one operation.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/deleteCdnSecurityHeaders", [
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token

+ Body

{
}

+ Body

1

CDN Get Feature Group

/package/{packageId}/web/cdnFeatureGroups
GETGet CDN feature groups

Returns all available CDN feature groups. Each group lists its member

features in `Members` as a comma-separated string.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/cdnFeatureGroups");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

{

CdnFeatureGroupId: 1,

FeatureGroup: "string",

DisplayName: "string",

Members: "string",

Owner: "string",

Comments: "string"

}

]

CDN Get Features

/package/{packageId}/web/cdnOptions
GETGet a list of all CDN features

Returns the full catalogue of CDN features available on the platform,

including risk level and optimisation class metadata useful for display.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/cdnOptions");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

{

CdnFeatureId: 1,

Feature: "string",

DisplayName: "string",

Description: "string",

RiskLevel: "string",

OptimisationClass: "string",

InputType: "string",

ImpliesFilters: "string",

FeatureGroups: "string",

Enabled: true

}

]

CDN Get Security Headers

/package/{packageId}/web/cdnSecurityHeaders
GETGet security headers

Returns the full list of security headers currently configured on this virtual host.

Returns an empty array if none are set or the request fails.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/cdnSecurityHeaders");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

{

VirtualHostHeaderId: 1,

Name: "string",

Value: "string"

}

]

CDN Manage

/package/{packageId}/web/manageCdn
POSTManage CDN

Controls the CDN state for this site. Disabling adds the `no_nginx_static`

feature flag; enabling removes it. Both `disable` and `enable` also trigger

a cache purge automatically.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/manageCdn", [
            "action" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • actionrequiredstringOne of `enable`, `disable`, or `purge`
Headers

Authorization: Bearer token

+ Body

{
action: "string"
}

+ Body

true

CDN Purge Cache

/package/{packageId}/web/purgeCdnByUrl
POSTPurge CDN cache

Sends a PURGE request to the StackCDN edge. Omit `path` to purge all

cached content for the site.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/purgeCdnByUrl", [
            "path" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • pathoptionalstring,nullableA specific URL path to purge, or omit to purge all cached content
Headers

Authorization: Bearer token

+ Body

{
path: "string"
}

+ Body

true

CDN Stats

/package/{packageId}/web/cdnStats
GETRetrieve CDN Statistics

Returns CDN bandwidth and hit metrics for `Last24Hours`, `Last30Days`, and

`Last12Months` periods. Each period contains parallel time-keyed arrays for

bytes, CDN bytes, cache hits, misses, error hits, SSL/non-SSL breakdown, and total hits.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/cdnStats");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

result:{

Last12Months:{

},

}

}

CDN Stats by Country

/package/{packageId}/web/cdnStatsCacheHits
POSTRetrieve CDN Cache Hit Statistics

Returns CDN cache hit and miss counts for the given time period.

**Note:** Allowed values for `period` are `Last1Hour`, `Last24Hours`, and `Last7Days`.
Any other value throws a `NotFoundException`.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/cdnStatsCacheHits", [
            "period" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • periodrequiredstringThe time window — one of `Last1Hour`, `Last24Hours`, or `Last7Days`
Headers

Authorization: Bearer token

+ Body

{
period: "string"
}

+ Body

CDN Stats by Country

/package/{packageId}/web/cdnStatsTrafficDistribution
POSTRetrieve CDN Traffic Distribution Statistics

Returns bandwidth and hit counts split by country for the given time period.

**Note:** Allowed values for `period` are `Last1Hour`, `Last24Hours`, and `Last7Days`.
Any other value throws a `NotFoundException`.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/cdnStatsTrafficDistribution", [
            "period" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • periodrequiredstringThe time window — one of `Last1Hour`, `Last24Hours`, or `Last7Days`
Headers

Authorization: Bearer token

+ Body

{
period: "string"
}

+ Body

CDN Update Headers

/package/{packageId}/web/updateCdnSecurityHeaders
POSTUpdate security headers

Replaces all security headers on this virtual host with the provided list.

The entire header set is overwritten — omitting a header removes it.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/updateCdnSecurityHeaders");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

{

VirtualHostHeaderId: 1,

Name: "string"

}

]

Security & Access

Block Countries

/package/{packageId}/web/blockedCountries
GETRetrieve Blocked Countries

Returns the current country-blocking configuration as a list of

ISO 3166-1 alpha-2 codes and the block `type`.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/blockedCountries");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

countries: ["string"],

type: "string"

}

POSTSet blocked countries

Sets the country blocking rule for this virtual host. Pass `allow` for

`access` to allow only the listed countries; any other value blocks them.

Pass an empty `countries` array to remove all country restrictions.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/blockedCountries", [
            "access" => "string",
            "countries" => ["string"]
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • accessrequiredstringUse `allow` to allow listed countries, or any other value to block them
  • countriesrequiredarray[string]ISO 3166-1 alpha-2 country codes
Headers

Authorization: Bearer token

+ Body

{
access: "string",
countries: ["string"]
}

+ Body

Block IP

/package/{packageId}/web/blockedIpAddresses
GETRetrieve Blocked IP Addresses

Returns the list of blocked IP addresses and CIDR ranges for this site.

Returns `null` when no block list is configured or the request is incomplete.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/blockedIpAddresses");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

["string"]

POSTSet Blocked IP Addresses

Replaces the blocked IP address list for this virtual host. Supports both

individual addresses and CIDR ranges. Omit `ip_addresses` or pass `null`

to remove all blocked addresses.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/blockedIpAddresses", [
            "ip_addresses" => ["string"]
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • ip_addressesoptionalarray[string],nullableIP addresses and/or CIDR ranges to block, or `null` to clear all
Headers

Authorization: Bearer token

+ Body

{
ip_addresses: ["string"]
}

+ Body

true

Country Blocking

/hosting/handleBulkBlockCountry
POSTSet package country blocks

Applies country-based access rules to one or more packages

simultaneously, either allowing or blocking visitors from the specified

countries.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/hosting/handleBulkBlockCountry");
Headers

Authorization: Bearer token



+ Body

{

(package_id): true

}

File Permissions

/package/{packageId}/web/filePermissions
GETRetrieve File Permission Recommendations

Runs a permission scan and returns files whose permissions differ from

platform recommendations. `publicHtml` and `root` are `1` when those

directories themselves have incorrect permissions.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/filePermissions");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

permissionCheckId: 1,

publicHtml: 1,

root: 1,

failures:{

file: "string",

}

}

POSTSet File Permission Recommendations

Set file permissions

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/filePermissions", [
            "permissionCheckId" => 1,
            "files" => [
                "file" => "string",
                "perms" => 1
            ]
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • permissionCheckIdrequirednumber
  • filesrequiredobject

- `file` (string,required) -

- `perms` (number,required) -

Headers

Authorization: Bearer token

+ Body

{
permissionCheckId: 1,
files:{
file: "string",
perms: 1
}
}

+ Body

true

FTP Credentials

/package/{packageId}/web/ftpCredentials
GETRetrieve FTP Credentials

Returns the primary FTP credentials for this web service.

On demo packages the credentials are fixed placeholder values.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/ftpCredentials");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

{

username: "string",

password: "string"

}

]

FTP Users

/package/{packageId}/web/ftpusers
GETRetrieve FTP Users

Returns all FTP accounts for this virtual host, including their IP ACL rules

and whether each account is the primary FTP user.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/ftpusers");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

{

Id: "string",

Enabled: true,

IsLocked: true,

JailFrom: "string",

Password: "string",

UnlockedUntil: "string",

Username: "string",

acl:{

Ip4Address: "string",

Ip6Address: "string"

},

isPrimary: true

}

]

POSTCreate/Update an FTP User

Update or create a new FTP user. This method will handle the creation

of new FTP users and updating existing FTP users.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/ftpusers", [
            "new" => [
                "ftp" => [
                    "user" => [
                        {
                            "Username" => "string",
                            "Domain" => "string",
                            "Password" => "string",
                            "JailFrom" => "string"
                        }
                    ]
                ]
            ],
            "update" => [
                "ftp" => [
                    {
                        "id" => "string",
                        "user" => [
                            "Password" => "string",
                            "JailFrom" => "string",
                            "UnlockedUntil" => "string",
                            "Enabled" => true
                        ],
                        "acl" => "string"
                    }
                ]
            ],
            "delete" => [
                "ftp" => [
                    "id" => ["string"]
                ]
            ]
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • newrequiredobject

- `ftp` (object,required) -

- `user` (array[object],required) -

+ use "/" for root

+ `update` (object,required) -

- `ftp` (array[object],required) -

+ `delete` (object,required) -

- `ftp` (object,required) -

- `id` (array[string],required) -

Headers

Authorization: Bearer token

+ Body

{
new:{
ftp:{
user:{
Username: "string",
Domain: "string",
Password: "string",
JailFrom: "string"
}
}
},
update:{
ftp:{
id: "string",
user:{
Password: "string",
JailFrom: "string",
UnlockedUntil: "string",
Enabled: true
},
acl: "string"
}
},
delete:{
ftp:{
id: ["string"]
}
}
}

+ Body

[

{

Id: "string",

}

]

IP Blocking

/hosting/handleBulkBlockIp
POSTSet package IP blocking

Applies IP address blocking rules to one or more packages

simultaneously. Omit `ip_addresses` to remove all blocked addresses.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/hosting/handleBulkBlockIp");
Headers

Authorization: Bearer token



+ Body

{

(package_id): true

}

Malware Report

/package/{packageId}/web/malwareReport
GETRetrieve the latest malware report

Returns the most recently stored malware report from the cache for this

web service, ordered by scan date descending. Returns `null` if no report exists.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/malwareReport");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

}

Malware Scan

/hosting/handleBulkMalwareScan
POSTBulk Malware scan

Retrieves the latest malware scan results for one or more packages

simultaneously.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/hosting/handleBulkMalwareScan");
Headers

Authorization: Bearer token



+ Body

{

(package_id):{

{

id: "string",

created: "string",

returnCode: "string",

outputText: "string",

status: "string"

}

}

}

Malware Scan

/package/{packageId}/web/malwareScan
GETRetrieve Malware Scan Report

Returns all malware scan records for this virtual host. Each entry

contains the scan outcome and a JSON string in `outputText` with details.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/malwareScan");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

{

id: "string",

created: "string",

returnCode: "string",

outputText: "string",

status: "string"

}

]

POSTSet Malware Scan Status

Set Mailware Scan lock state, setting to "new" will request a new scan

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/malwareScan", [
            "LockState" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • LockStaterequiredstringThe new state only "new" supported
Headers

Authorization: Bearer token

+ Body

{
LockState: "string"
}

+ Body

true

Password Protect

/package/{packageId}/web/passwordProtection
GETRetrieve Password Protected Directories

Returns the HTTP authentication (htpasswd) configuration for this virtual host.

Returns `null` if the request could not complete.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/passwordProtection");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

POSTSet Password Protected Directories

Set the password protected directories

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/passwordProtection", [
            "directories" => [
                {
                    "directory" => "string",
                    "username" => "string",
                    "password" => "string"
                }
            ]
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • directoriesrequiredarray[object]
Headers

Authorization: Bearer token

+ Body

{
directories:{
directory: "string",
username: "string",
password: "string"
}
}

+ Body

{

}

SSH IP Address

/package/{packageId}/web/sshipaddress
GETRetrieve SSH IP Addresses for a Package

Returns the IP addresses permitted to make SSH connections to this package

via the cloud firewall.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/sshipaddress");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

ipAddresses: ["string"]

}

POSTAdd/Update SSH IP Address

Update or add new SSH IP Address.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/sshipaddress", [
            "add" => "string",
            "delete" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • addrequiredstring
  • deleterequiredstring
Headers

Authorization: Bearer token

+ Body

{
add: "string",
delete: "string"
}

+ Body

[

{

}

]

SSH Keys

/package/{packageId}/web/sshkeys
GETRetrieve SSH Keys for a Package

Returns all public SSH keys registered on this virtual host.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/sshkeys");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

{

handle: "string",

key: "string"

}

]

POSTAdd/Update SSH Keys

Update or add new SSH keys.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/sshkeys", [
            "add" => [
                {
                    "key" => "string",
                    "handle" => "string"
                }
            ],
            "delete" => ["string"]
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • addrequiredarray[object]
  • deleterequiredarray[string]
Headers

Authorization: Bearer token

+ Body

{
add:{
key: "string",
handle: "string"
},
delete: ["string"]
}

+ Body

[

{

}

]

Applications

Applications

/package/{packageId}/web/installedApplications
GETRetrieve List of Installed Applications

Returns the applications installed on this managed VPS virtual host.

Returns `null` for non-managed-VPS packages.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/installedApplications");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

{

id: "string",

domain: "string",

environment: "string",

interpreter: "string",

name: "string",

mode: "string",

path: "string",

script: "string",

typeCode: "string"

}

]

POSTAdd, Remove, or Update an Application

Manages applications on a managed VPS virtual host. Exactly one action key

(`add`, `update`, `delete`, or `setEnv`) must be present per request.

Returns `false` for non-managed-VPS packages.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/installedApplications", [
            "add" => [
                "domain" => "string",
                "environment" => "string",
                "interpreter" => "string",
                "mode" => "string",
                "name" => "string",
                "path" => "string",
                "script" => "string",
                "typeCode" => "string"
            ],
            "update" => [
                "id" => "string"
            ],
            "delete" => [
                "id" => "string"
            ],
            "setEnv" => [
                "id" => "string",
                "environment" => "string"
            ]
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • addoptionalobject,nullableCreate a new application {

- `domain` (string,required) - The domain to serve the application on

- `environment` (string,required) - The runtime environment

- `interpreter` (string,required) - The interpreter

- `mode` (string,required) - The application mode

- `name` (string,required) - The application name

- `path` (string,required) - The path to serve the application from

- `script` (string,required) - The entry-point script

- `typeCode` (string,required) - The application type code

+ `update` (object,nullable) - Update an existing application (same fields as `add`, plus `id`) {

- `id` (string,required) - The application ID to update

+ `delete` (object,nullable) - Delete an application {

- `id` (string,required) - The application ID to delete

+ `setEnv` (object,nullable) - Change only the runtime environment of an application {

- `id` (string,required) - The application ID

- `environment` (string,required) - The new environment value

Headers

Authorization: Bearer token

+ Body

{
add:{
domain: "string",
environment: "string",
interpreter: "string",
mode: "string",
name: "string",
path: "string",
script: "string",
typeCode: "string"
},
update:{
id: "string"
},
delete:{
id: "string"
},
setEnv:{
id: "string",
environment: "string"
}
}

+ Body

{}

Applications

/package/{packageId}/web/installedSoftware
GETRetrieve Installed Applications by Type Code

Returns a map of type code to interpreter for installed software on a

managed VPS. Only software with status `installed` is included.

Returns `null` for non-virtual-platform packages.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/installedSoftware");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

["string"]

Easy Builder

/package/{packageId}/web/easyBuilderInstanceDelete
POSTDelete an Easy Builder instance

Permanently removes an Easy Builder instance from this virtual host.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/easyBuilderInstanceDelete", [
            "instanceId" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • instanceIdrequiredstringThe Easy Builder instance ID to delete
Headers

Authorization: Bearer token

+ Body

{
instanceId: "string"
}

+ Body

Easy Builder

/package/{packageId}/web/easyBuilderInstanceInstall
POSTInstall an Easy Builder instance

Installs an Easy Builder instance into a subdirectory of `public_html` on

this virtual host.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/easyBuilderInstanceInstall", [
            "instanceId" => "string",
            "subdirectory" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • instanceIdrequiredstringThe Easy Builder instance ID to install
  • subdirectoryrequiredstringThe subdirectory within `public_html` to install into
Headers

Authorization: Bearer token

+ Body

{
instanceId: "string",
subdirectory: "string"
}

+ Body

Easy Builder Instances

/package/{packageId}/web/easyBuilderInstance
GETRetrieve all current Easy Builder instances

Returns all Easy Builder instances currently associated with this virtual host.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/easyBuilderInstance");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

Easy Builder SSO

/package/{packageId}/web/easyBuilderSso
POSTGet an Easy Builder instance's SSO link

Returns a Single Sign-On URL for the specified Easy Builder instance,

allowing direct authenticated entry into the builder.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/easyBuilderSso", [
            "instanceId" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • instanceIdrequiredstringThe Easy Builder instance ID
Headers

Authorization: Bearer token

+ Body

{
instanceId: "string"
}

+ Body

Easy Builder Themes

/package/{packageId}/web/easyBuilderTheme
GETGet all the available Easy Builder themes

Returns the full list of themes available across all Easy Builder instances.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/easyBuilderTheme");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

POSTSet the selected Easy Builder theme

Applies a theme to an existing Easy Builder instance on this virtual host.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/easyBuilderTheme", [
            "instanceId" => "string",
            "themeName" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • instanceIdrequiredstringThe Easy Builder instance ID
  • themeNamerequiredstringThe theme name to apply
Headers

Authorization: Bearer token

+ Body

{
instanceId: "string",
themeName: "string"
}

+ Body

One-Clicks

/package/{packageId}/web/oneclick
GETRetrieve Available List of One-Clicks

Returns the catalogue of one-click installers available for this package,

keyed by installer name. Entries where `knownInformation` is `false` are

permitted by the package limits but not yet available on the platform.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/oneclick");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

(name):{

knownInformation: true,

displayName: "string",

displayHeader: "string",

description: "string",

docLink: "string",

goto: "string",

latest: "string",

needsDb: true,

terms: "string",

avg_install_time: 1.99

}

}

POSTInstall a One-Click

Install a one click to a domain.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/oneclick", [
            "domain" => "string",
            "httpsDomain" => "string",
            "oneclick" => "string",
            "directory" => "string",
            "licenceKey" => "string",
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • domainrequiredstringThe domain we are installing the files to.
  • httpsDomainrequiredstringThe HTTPS domain, if appropriate anddifferent from the HTTP domain.
  • oneclickrequiredstringThe oneclick name we are installing.
  • directoryrequiredstringThe directory to install to, this isrelative to the document root
  • licenceKeyoptionalstring,nullable
  • installInputoptionalobject,nullableFor one clicks that support taking values to use for an install
Headers

Authorization: Bearer token

+ Body

{
domain: "string",
httpsDomain: "string",
oneclick: "string",
directory: "string",
licenceKey: "string",
}

+ Body

{

database:{

server: "string",

name: "string"

},

user:{

username: "string",

password: "string"

}

}

Pending Install

/package/{packageId}/web/pendingInstall
GETCheck if the package has a pending install

Returns the pending install details when a one-click installation is queued

and awaiting user input. A non-`null` response means additional information

should be POSTed back to complete the install.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/pendingInstall");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

Software Re-install

/package/{packageId}/web/reinstall
POSTReinstall Software

Triggers a platform reinstall of the software associated with this web

service. For WordPress packages this reinstalls WordPress; pass

`staging=1` to reinstall the staging environment instead.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/reinstall", [
            "staging" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • stagingoptionalstring,nullablePass `1` to reinstall the staging environment
Headers

Authorization: Bearer token

+ Body

{
staging: "string"
}

+ Body

{

success: true

}

Databases

Assign Database

/mssql/{mssqlId}/package
POSTAssign an MSSQL Database to a Package

Associates this MSSQL database service with a hosting package.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/mssql/{mssqlId}/package", [
            "packageId" => 1
    ]);
  • mssqlIdrequirednumberThe MSSQL ID.
  • packageIdrequirednumberThe ID of the package to assign this MSSQL database to
Headers

Authorization: Bearer token

+ Body

{
packageId: 1
}

+ Body

{

packageId: 1

}

Database

/package/{packageId}/web/database/{databaseId}
GETRetrieve database

Returns details for a single database.

**Note:** `server` and `host` both return the internal access hostname.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/database/{databaseId}");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • databaseIdrequirednumberThe database ID.
Headers

Authorization: Bearer token



+ Body

{

externalHostname: "string",

name: "string",

host: "string",

quotaMb: 1.99,

quotaUsed: 1.99,

server: "string",

type: "string"

}

Database User

/package/{packageId}/web/database/{databaseId}/user/{userId}
GETGet database user

Returns details for a single database user.

**Note:** `username` is an alias for `name`. `contextDatabase` gives the name of the
database when this user is accessed through a database-scoped URL.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/database/{databaseId}/user/{userId}");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • databaseIdrequirednumberThe database ID.
  • userIdrequiredstringFIXME
Headers

Authorization: Bearer token



+ Body

{

contextDatabase: "string",

databaseId: "string",

name: "string",

username: "string"

}

List Databases

/mssql
GETRetrieve MSSQL Databases

Returns a lightweight summary of this MSSQL database service, including

its assigned package (if any).

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/mssql");
Headers

Authorization: Bearer token



+ Body

[

{

id: "string",

packageId: "string",

packageName: "string"

}

]

MSSQL Database Renew

/reseller/{resellerId}/renewMssqlPre
POSTRenew a MSSQL Database

The "Renew a MSSQL Database" API endpoint allows you to renew an MSSQL database with the provided ID. This operation extends the validity period of the MSSQL database.

To use this API, you need to provide the following parameters:

$in: An array containing the following information:

id: The ID of the MSSQL database that you want to renew.

The API call will return a float value or null. The float value represents the new expiration date of the MSSQL database in Unix timestamp format. If the renewal is unsuccessful or there is an error, the API will return null.

It's important to note that this API endpoint will charge the appropriate registration fee to your 20i balance.

If you don't have sufficient funds in your balance, the renewal will fail. Therefore, ensure that you have enough balance to cover the renewal fee before making the API call.

This API endpoint is useful when you want to automate the renewal process for MSSQL databases and ensure that they remain active and accessible for an extended period.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/renewMssqlPre", [
            "id" => "string"
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • idrequiredstring
Headers

Authorization: Bearer token

+ Body

{
id: "string"
}

+ Body

1.99

MSSQL Databases

/package/{packageId}/web/mssqlDatabases
GETRetrieve MSSQL Databases

Returns all MSSQL databases attached to this web service.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/mssqlDatabases");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

{

{

id: "string",

externalHostname: "string",

name: "string",

host: "string",

hostname: "string",

quotaMb: 1.99,

quotaUsed: 1.99,

server: "string",

type: "string",

}

}

]

POSTCreate an MSSQL Database

Create an MSSQL database and a user with the same name.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/mssqlDatabases", [
            "name" => "string",
            "password" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • namerequiredstringThe name of the database (and user).
  • passwordrequiredstringThe password for the user.
Headers

Authorization: Bearer token

+ Body

{
name: "string",
password: "string"
}

+ Body

{

database:{

id: 1,

hostname: "string",

externalHostname: "string",

name: "string"

},

user:{

id: 1,

username: "string"

}

}

MSSQL Remove Databases

/package/{packageId}/web/removeMssqlDatabase
POSTRemove an MSSQL Database

Deletes an MSSQL database and releases its slot from the package allowance.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/removeMssqlDatabase", [
            "id" => 1
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • idrequirednumberThe MSSQL database ID to remove
Headers

Authorization: Bearer token

+ Body

{
id: 1
}

+ Body

true

MySQL Databases

/package/{packageId}/web/mysqlDatabases
GETRetrieve MySQL Databases

Returns all MySQL databases attached to this web service.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/mysqlDatabases");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

{

{

id: "string",

externalHostname: "string",

name: "string",

host: "string",

quotaMb: 1.99,

quotaUsed: 1.99,

server: "string",

type: "string"

}

}

]

POSTCreate a MySQL Database

Create a MySQL database and a user with the same name.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/mysqlDatabases", [
            "name" => "string",
            "password" => "string",
            "allow_random" => true
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • namerequiredstringThe database and user name.
  • passwordrequiredstringThe password for the user.
  • allow_randomoptionalboolean,nullableAllow a random database suffix if thedatabase name is taken.
Headers

Authorization: Bearer token

+ Body

{
name: "string",
password: "string",
allow_random: true
}

+ Body

[]

MySQL Remove Database

/package/{packageId}/web/removeMysqlDatabase
POSTRemove a MySQL Database

Permanently deletes a MySQL database from this web service.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/removeMysqlDatabase", [
            "id" => 1
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • idrequirednumberThe MySQL database ID to remove
Headers

Authorization: Bearer token

+ Body

{
id: 1
}

+ Body

true

MySQL User Password

/package/{packageId}/web/mysqlUserPassword
POSTUpdate a MySQL User's Password

Changes the password for a MySQL user identified by their numeric user ID.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/mysqlUserPassword", [
            "user_id" => 1,
            "password" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • user_idrequirednumberThe MySQL user ID
  • passwordrequiredstringThe new password
Headers

Authorization: Bearer token

+ Body

{
user_id: 1,
password: "string"
}

+ Body

true

Retrieve Database

/mssql/{mssqlId}
GETRetrieve an MSSQL Database

Returns the details of this MSSQL database service.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/mssql/{mssqlId}");
  • mssqlIdrequirednumberThe MSSQL ID.
Headers

Authorization: Bearer token



+ Body

{

id: "string"

}

PHP Configuration

PHP Available Versions

/package/{packageId}/web/availablePhpVersions
GETRetrieve Available PHP Versions

Returns the PHP versions available to this virtual host, including the

handler type and display title for each.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/availablePhpVersions");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

{

FullVersion: "string",

Handler: "string",

Title: "string"

}

]

PHP Config

/package/{packageId}/web/phpConfig/{phpConfigId}
GETGet PHP config

Returns the custom PHP INI directives in effect for this virtual host alias,

or `null` when no custom configuration has been set.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/phpConfig/{phpConfigId}");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • phpConfigIdrequiredstringFIXME
Headers

Authorization: Bearer token



+ Body

{

(directive): {}

}

PHP Config Allowed

/package/{packageId}/web/allowedPhpConfiguration
GETRetrieve Allowed PHP Configuration

Returns the list of PHP INI directives that may be customised via the

"Update PHP Config" endpoint, along with their types and default values.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/allowedPhpConfiguration");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

{

DirectiveName: "string",

DirectiveType: "string",

DirectiveDefault: "string"

}

]

PHP Config Update

/package/{packageId}/web/phpConfig/{phpConfigId}/updateConfig
POSTUpdate PHP Config

Replaces the custom PHP INI directives for this virtual host alias.

Only directives in the platform's allowed list will take effect.

**Note:** Returns `null` when the server alias name cannot be resolved.
Use the "Retrieve Allowed PHP Configuration" endpoint to discover
which directives are permitted.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/phpConfig/{phpConfigId}/updateConfig", [
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • phpConfigIdrequiredstringFIXME
  • configrequiredobjectA map of PHP directive names to their values.
Headers

Authorization: Bearer token

+ Body

{
}

+ Body

true

PHP Version

/package/{packageId}/web/phpVersion
GETGet PHP Version

Returns the active PHP version string for this virtual host in the format

used by the platform, e.g. `php82`. Use "Retrieve Available PHP Versions"

to see all valid values.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/phpVersion");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

string

POSTSet the PHP Version

Set the PHP version for the site.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/phpVersion", [
            "value" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • valuerequiredstring
Headers

Authorization: Bearer token

+ Body

{
value: "string"
}

+ Body

{

}

Redirects & Caching

Directory Index

/package/{packageId}/web/directoryIndex
GETRetrieve Directory Index Files

Returns the current `DirectoryIndex` value — the ordered list of filenames

the server tries when a directory is requested.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/directoryIndex");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

string

POSTSet Directory Index Configuration

Sets the ordered list of filenames the server will try when a directory

is requested (the `DirectoryIndex` htaccess directive). A maximum of 5

filenames are supported.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/directoryIndex", [
            "directoryIndex" => ["string"]
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • directoryIndexrequiredarray[string]Ordered list of index filenames (e.g. `["index.php", "index.html"]`)
Headers

Authorization: Bearer token

+ Body

{
directoryIndex: ["string"]
}

+ Body

true

Directory Index

/package/{packageId}/web/directoryIndexing
GETRetrieve Directory Indexing State

Returns whether directory listing (Options +Indexes) is currently enabled

for this virtual host. Returns `null` if the request could not complete.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/directoryIndexing");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

result: true

}

POSTSet Directory Indexing Configuration

Directory indexing allows visitors to view a list of files instead of the actual webpage.

This can turn on/off directory indexing for the website.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/directoryIndexing", [
            "value" => true
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • valuerequiredbooleantrue or false to set the directory indexing on oroff
Headers

Authorization: Bearer token

+ Body

{
value: true
}

+ Body

true

Redirect

/package/{packageId}/web/redirects
GETRetrieve Redirects for a Site

Returns the redirect rules configured in `.htaccess` for this virtual host,

grouped by domain name and redirect type.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/redirects");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

(domain):{

(type):{

(from): "string"

}

}

}

POSTCreate/Update a Web Redirect

Set the website redirects.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/redirects", [
            "redirects" => [
                {
                    "domain" => "string",
                    "from" => "string",
                    "to" => "string",
                    "type" => "string"
                }
            ]
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • redirectsrequiredarray[object]
Headers

Authorization: Bearer token

+ Body

{
redirects:{
domain: "string",
from: "string",
to: "string",
type: "string"
}
}

+ Body

true

StackCache

/package/{packageId}/web/stackCache
GETRetrieve StackCache Settings

Returns the StackCache TTL settings for static asset types on this virtual host.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/stackCache");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

css: "string",

javascript: "string",

images: "string"

}

POSTSet stack cache policy
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/stackCache", [
            "css" => "string",
            "images" => "string",
            "javascript" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • cssoptionalstring,nullableA time in seconds prefixed with "A" to cache css for
  • imagesoptionalstring,nullableA time in seconds prefixed with "A" to cache images for
  • javascriptoptionalstring,nullableA time in seconds prefixed with "A" to cache javascript for
Headers

Authorization: Bearer token

+ Body

{
css: "string",
images: "string",
javascript: "string"
}

+ Body

true

Managed VPS

Activate/Deactivate managed vps

/managed_vps/{managedVpsId}/userStatus
POSTActivate or deactivate

Activates or deactivates the service.

Possible subservice_name are 'default' for a typical set of services

and 'main' for the core service only.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/managed_vps/{managedVpsId}/userStatus", [
            "includeRepeated" => true,
            "subservices" => [
                "(subservice_name)" => true
            ]
    ]);
  • managedVpsIdrequirednumberThe Managed VPS server ID retrieved from get managed vps.
  • includeRepeatedrequiredbooleanWhen reactivating, if true,this will revoke all your deactivations rather than

just the current one.

+ `subservices` (object,required) -

- ``subservice_name`` (boolean,required) - True to enable, false to disable.

Headers

Authorization: Bearer token

+ Body

{
includeRepeated: true,
subservices:{
(subservice_name): true
}
}

+ Body

true

Add Package

/managed_vps/{managedVpsId}/addWeb
POSTAdd a Package

Creates a new web hosting package on this Managed VPS under the specified domain name.

**Note:** The domain name must be valid and not already assigned to another package under this account.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/managed_vps/{managedVpsId}/addWeb", [
            "domain_name" => "string",
            "extra_domain_names" => ["string"],
            "packageTemplate" => "string",
            "type" => 1
    ]);
  • managedVpsIdrequirednumberThe Managed VPS server ID retrieved from get managed vps.
  • domain_namerequiredstringThe primary domain name for the new site
  • extra_domain_namesoptionalarray[string],nullableAdditional domain names to associate with the package
  • packageTemplateoptionalstring,nullableThe domain name of an existing package to clone files and databases from
  • typeoptionalnumber,nullableThe package bundle type ID to use (defaults to the reseller's Managed VPS type)
Headers

Authorization: Bearer token

+ Body

{
domain_name: "string",
extra_domain_names: ["string"],
packageTemplate: "string",
type: 1
}

+ Body

1

Delete Package

/managed_vps/{managedVpsId}/deleteWeb
POSTDelete a Package

Deletes one or more web hosting packages from this Managed VPS. Packages that have child sub-sites (sub-webs) are skipped and not deleted.

**Warning:** Deleting a package permanently removes all associated files, databases, and configuration. This action cannot be undone.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/managed_vps/{managedVpsId}/deleteWeb", [
            "delete-id" => ["string"]
    ]);
  • managedVpsIdrequirednumberThe Managed VPS server ID retrieved from get managed vps.
  • delete-idrequiredarray[string]Array of package IDs to delete
Headers

Authorization: Bearer token

+ Body

{
delete-id: ["string"]
}

+ Body

1

Get Managed VPS

/managed_vps/{managedVpsId}
GETRetrieve managed VPS

Returns a detailed object representing the Managed VPS, merging locally cached values with live data from the platform. `SuperPassword` and `VncPassword` are always scrubbed from the output.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/managed_vps/{managedVpsId}");
  • managedVpsIdrequirednumberThe Managed VPS server ID retrieved from get managed vps.
Headers

Authorization: Bearer token



+ Body

{

cpanel: true,

cpanelInfo:{

productSpec: "string"

},

cpanelRebuilding: true,

id: "string",

isCloud: true,

isManaged: true,

packageIds: ["string"],

count: 1,

configuration:{

CpuCores: 1,

DataDiskSizeGb: 1,

ExternalNetwork: true,

InternalNetwork: true,

OsDiskSizeGb: 1,

RamMb: 1

},

externalId: "string",

name: "string",

productSpec: "string",

location: "string"

}

Limits

/managed_vps/{managedVpsId}/limits
POSTGet Package Creation Limits

Returns the remaining package creation allowance for this Managed VPS. The `count` value is how many more packages can be added before hitting the server's maximum.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/managed_vps/{managedVpsId}/limits");
  • managedVpsIdrequirednumberThe Managed VPS server ID retrieved from get managed vps.
Headers

Authorization: Bearer token



+ Body

{

count: 1

}

List Managed VPS

/managed_vps
GETRetrieve List of Managed VPS

Returns a summary of the Managed VPS and its associated packages. This is the lightweight list view; for full platform details use the Retrieve Managed VPS endpoint.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/managed_vps");
Headers

Authorization: Bearer token



+ Body

[

{

id: "string",

externalId: "string",

isCloud: true,

isManaged: true,

location: "string",

name: "string",

cachedHostname: "string",

count: 1,

packageIds: ["string"],

productSpec: "string",

}

]

Managed VPS Profile

/managed_vps/{managedVpsId}/profile
POSTSet a profile

Applies a software optimisation profile to the Managed VPS. This can only be set when no packages are currently hosted on the server.

**Note:** The profile cannot be changed while packages are hosted on this VPS. Remove all packages first.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/managed_vps/{managedVpsId}/profile", [
            "profileId" => "string"
    ]);
  • managedVpsIdrequirednumberThe Managed VPS server ID retrieved from get managed vps.
  • profileIdrequiredstringThe profile ID to apply (see the List Profiles endpoint for available IDs)
Headers

Authorization: Bearer token

+ Body

{
profileId: "string"
}

+ Body

true

Managed VPS Profile

/managed_vps/{managedVpsId}/profileReset
POSTReset managed VPS profile

Clears the active software optimisation profile and resets the VPS to the platform default (`VpsProfileId` 0). Cannot be performed while packages are hosted on the server.

**Note:** Returns `false` if one or more packages are currently hosted on this VPS. Remove all packages before resetting the profile.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/managed_vps/{managedVpsId}/profileReset", [
    ]);
  • managedVpsIdrequirednumberThe Managed VPS server ID retrieved from get managed vps.
Headers

Authorization: Bearer token

+ Body

{
}

+ Body

true

Name

/managed_vps/{managedVpsId}/name
GETRetrieve VPS name

Returns the user-assigned name for the Managed VPS, falling back to the cached platform hostname if no custom name has been set.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/managed_vps/{managedVpsId}/name");
  • managedVpsIdrequirednumberThe Managed VPS server ID retrieved from get managed vps.
Headers

Authorization: Bearer token



+ Body

string

POSTSet VPS name

Sets a human-readable name for the Managed VPS. Names longer than 255 characters will be silently truncated.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/managed_vps/{managedVpsId}/name", [
            "name" => "string"
    ]);
  • managedVpsIdrequirednumberThe Managed VPS server ID retrieved from get managed vps.
  • namerequiredstringThe new VPS name (max 255 characters)
Headers

Authorization: Bearer token

+ Body

{
name: "string"
}

+ Body

true

Cloud Servers

Cancel Timeline Upgrade

/reseller/{resellerId}/cloudServerCancelTimelineUpgrade
POSTCancel the timeline upgrade

Cancel the timeline server upgrade for the given cloud server.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/cloudServerCancelTimelineUpgrade", [
            "serverId" => "string"
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • serverIdrequiredstringThe id of the server to add timeline storage upgrade to.
Headers

Authorization: Bearer token

+ Body

{
serverId: "string"
}

+ Body

true

List server providers

/reseller/{resellerId}/cloudProviders
GETGet cloud server providers

Returns an array of cloud provider identifiers available on your account.

Use the returned values as the `provider` parameter when calling the

cloud server specs and zones endpoint.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/reseller/{resellerId}/cloudProviders");
  • resellerIdrequirednumberYour reseller ID.
Headers

Authorization: Bearer token



+ Body

["string"]

POSTGet cloud server specs and zones for provider

Returns the available specs and zones for a given cloud provider.

Call the cloud providers endpoint first to get valid `provider` values.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/cloudProviders", [
            "provider" => "string"
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • providerrequiredstringThe cloud provider identifier, as returned by thecloud providers endpoint.
Headers

Authorization: Bearer token

+ Body

{
provider: "string"
}

+ Body

Order Cloud Server

/reseller/{resellerId}/addCloudServer
POSTOrder a Cloud Server

Orders a cloud server from the specified provider and charges your account balance.

Returns the new server ID on success.

See the [Managed Cloud Hosting API guide](https://docs.20i.com/api/managed-cloud-hosting-api-guide)

for a full walkthrough.

**Warning:** This charges your account balance immediately.
If you have insufficient funds the call will fail and no service will be created.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/addCloudServer", [
            "configuration" => [
                "spec" => "string",
                "zone" => "string",
                "bandwidth" => "string",
                "disk" => "string",
                "mvpsName" => "string",
                "optimisation" => "string",
                "resellerCloudBranded" => true
            ],
            "periodMonths" => 1,
            "type" => "string",
            "forUser" => "string"
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • configurationrequiredobject

- `spec` (string,required) - The cloud server spec identifier. Use the cloud providersspecs/zones endpoint to get valid values for your chosen provider.

- `zone` (string,required) - Data centre zone, e.g. `"us-west-1"`. Use the cloudproviders specs/zones endpoint to get valid zones for each spec.

- `bandwidth` (string,nullable) - Bandwidth allocation. Optional; only applies toAWS and GCP servers.

- `disk` (string,nullable) - Disk allocation. Optional; only applies to AWS andGCP servers.

- `mvpsName` (string,required) - Display name shown in StackCP

- `optimisation` (string,required) - Server optimisation profile. One of: `Default`,`WordPress`, `Magento`, `WooCommerce`, `Laravel`, `Joomla`, `NetCore`,

`NodeJS`.

- `resellerCloudBranded` (boolean,required) - Set to `true` to show this as your ownbranded cloud server in StackCP rather than a 20i cloud server.

Only applies when `type` is `cloud-20i`.

+ `periodMonths` (number,required) - Contract duration in months

+ `type` (string,required) - Cloud provider. One of: `cloud-aws`, `cloud-gcp`, `cloud-20i`.

+ `forUser` (string,nullable) - Stack user tuple to assign the server to,e.g. `"stack-user:113"`. The server will then appear in that user's StackCP.

Headers

Authorization: Bearer token

+ Body

{
configuration:{
spec: "string",
zone: "string",
bandwidth: "string",
disk: "string",
mvpsName: "string",
optimisation: "string",
resellerCloudBranded: true
},
periodMonths: 1,
type: "string",
forUser: "string"
}

+ Body

string

Renew Cloud Server

/reseller/{resellerId}/renewCloudServer
POSTRenew Cloud Server

Renews an existing Cloud Server subscription and charges your account balance.

**Warning:** This charges your account balance immediately.
If you have insufficient funds the call will fail and the Cloud Server will not be renewed.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/renewCloudServer", [
            "id" => "string",
            "periodMonths" => 1
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • idrequiredstringThe ID of the Cloud Server to renew
  • periodMonthsrequirednumberNumber of months to renew for
Headers

Authorization: Bearer token

+ Body

{
id: "string",
periodMonths: 1
}

+ Body

true

Server Product Specs

/reseller/{resellerId}/cloudServerProductData
GETGet cloud server product specifications

The "Get cloud server products" API endpoint allows you to retrieve a specification of all the cloud server products available within 20i.

By making a request to this endpoint, you can obtain a set of data that describes what specs are valid for all the different server types available.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/reseller/{resellerId}/cloudServerProductData");
  • resellerIdrequirednumberYour reseller ID.
Headers

Authorization: Bearer token



+ Body

{

provider:{

spec:{

detail:{

cpu:{

uiLabel: "string"

},

ram:{

uiLabel: "string"

},

disk:{

range:{

min: "string",

max: "string"

},

uiLabel: "string"

},

diskAdditionalByZone:{

*:{

currency: "string"

}

},

bandwidth:{

uiLabel: "string"

},

bandwidthAdditionalByZone:{

*:{

currency: "string"

}

},

yearlyDiscountByZone:{

*:{

currency: "string"

}

},

priceByZone:{

*:{

currency: "string"

}

},

zone:{

options: ["string"]

},

provider:{

options: ["string"]

},

country:{

options: ["string"]

}

},

cta: "string",

uiLabel: "string",

specName: "string",

basketLabel: "string"

}

},

}

Timeline Upgrade Price

/reseller/{resellerId}/cloudServerAddTimelineUpgradePre
POSTGet price for timeline upgrade

Returns the price that would be charged to add the timeline storage upgrade

to the given cloud server. No charge is made; use this to preview the cost

before calling the upgrade endpoint.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/cloudServerAddTimelineUpgradePre", [
            "serverId" => "string"
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • serverIdrequiredstringThe ID of the cloud server to price the timeline storage upgrade for.
Headers

Authorization: Bearer token

+ Body

{
serverId: "string"
}

+ Body

Timeline Upgrades

/reseller/{resellerId}/cloudServerAddTimelineUpgrade
POSTUpgrade timeline storage

Adds the upgraded timeline storage to the given cloud server and charges your account balance.

If the server already has the upgrade, the existing service ID is returned rather than

creating a duplicate.

**Warning:** This charges your account balance immediately.
If you have insufficient funds the call will fail and no service will be created.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/cloudServerAddTimelineUpgrade", [
            "serverId" => "string"
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • serverIdrequiredstringThe ID of the cloud server to add the timeline storage upgrade to.
Headers

Authorization: Bearer token

+ Body

{
serverId: "string"
}

+ Body

string

Upgrade Server

/reseller/{resellerId}/upgradeCloudServer
POSTUpgrade a cloud server

Upgrades a cloud server to the given spec and charges your account balance.

**Warning:** This charges your account balance immediately.
If you have insufficient funds the call will fail and the server will not be upgraded.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/upgradeCloudServer", [
            "serverId" => "string",
            "configuration" => [
                "cpu" => 1,
                "disk" => 1,
                "ram" => 1,
                "zone" => "string",
                "spec" => "string"
            ]
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • serverIdrequiredstring
  • configurationrequiredobject

- `cpu` (number,required) - Number of CPUs, e.g., 2.

- `disk` (number,required) - Disk size in GB, e.g., 50.

- `ram` (number,required) - RAM size in GB, e.g., 4.

- `zone` (string,required) - The service zone, e.g., 'us-east-1'.

- `spec` (string,required) - The service specification, e.g., 'medium'.

Headers

Authorization: Bearer token

+ Body

{
serverId: "string",
configuration:{
cpu: 1,
disk: 1,
ram: 1,
zone: "string",
spec: "string"
}
}

+ Body

{

result: true

}

Upgrade Server Price

/reseller/{resellerId}/upgradeCloudServerPre
POSTGet cloud server upgrade price

Returns the price that would be charged for the given cloud server upgrade spec.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/reseller/{resellerId}/upgradeCloudServerPre", [
            "serverId" => "string",
            "configuration" => [
                "cpu" => 1,
                "disk" => 1,
                "ram" => 1,
                "zone" => "string",
                "spec" => "string"
            ]
    ]);
  • resellerIdrequirednumberYour reseller ID.
  • serverIdrequiredstring
  • configurationrequiredobject

- `cpu` (number,required) - Number of CPUs, e.g., 2.

- `disk` (number,required) - Disk size in GB, e.g., 50.

- `ram` (number,required) - RAM size in GB, e.g., 4.

- `zone` (string,required) - The service zone, e.g., 'us-east-1'.

- `spec` (string,required) - The service specification, e.g., 'medium'.

Headers

Authorization: Bearer token

+ Body

{
serverId: "string",
configuration:{
cpu: 1,
disk: 1,
ram: 1,
zone: "string",
spec: "string"
}
}

+ Body

{

result: "string"

}

VPS

Activate/Deactivate vps

/vps/{vpsId}/userStatus
POSTActivate or deactivate

Activates or deactivates the service.

Possible subservice_name are 'default' for a typical set of services

and 'main' for the core service only.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/vps/{vpsId}/userStatus", [
            "includeRepeated" => true,
            "subservices" => [
                "(subservice_name)" => true
            ]
    ]);
  • vpsIdrequirednumberThe VPS ID retrieved from get vps.
  • includeRepeatedrequiredbooleanWhen reactivating, if true,this will revoke all your deactivations rather than

just the current one.

+ `subservices` (object,required) -

- ``subservice_name`` (boolean,required) - True to enable, false to disable.

Headers

Authorization: Bearer token

+ Body

{
includeRepeated: true,
subservices:{
(subservice_name): true
}
}

+ Body

true

Backups

/vps/{vpsId}/backups
GETList all VPS backups

Returns the snapshot slot details for all backups attached to this VPS, as reported by the platform.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/vps/{vpsId}/backups");
  • vpsIdrequirednumberThe VPS ID retrieved from get vps.
Headers

Authorization: Bearer token



+ Body

[

]

POSTUpdate a VPS backup

Updates the configuration of one or more snapshot slots for this VPS. Pass a map of backup/snapshot IDs to their updated settings.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/vps/{vpsId}/backups", [
    ]);
  • vpsIdrequirednumberThe VPS ID retrieved from get vps.
  • `backup_id`requiredobjectA map of snapshot slot ID to the configuration fields to update
Headers

Authorization: Bearer token

+ Body

{
}

+ Body

Change Password

/vps/{vpsId}/changePassword
POSTSet the Root Password for a VPS

Resets the root (superuser) password for a Linux VPS. The server reboots as part of this operation.

**Warning:** This will cause a service interruption. The VPS reboots immediately after the password change is applied.
**Note:** Only applicable to Linux VPS instances. Windows VPS instances are not supported.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/vps/{vpsId}/changePassword", [
            "password" => "string"
    ]);
  • vpsIdrequirednumberThe VPS ID retrieved from get vps.
  • passwordrequiredstringThe new root password
Headers

Authorization: Bearer token

+ Body

{
password: "string"
}

+ Body

cPanel

/vps/{vpsId}/cpanel
GETRetrieve cPanel Information

Returns the cPanel configuration and status for this VPS as reported by the platform. Only meaningful if a cPanel add-on is active on the VPS.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/vps/{vpsId}/cpanel");
  • vpsIdrequirednumberThe VPS ID retrieved from get vps.
Headers

Authorization: Bearer token



+ Body

[]

Disks

/vps/{vpsId}/disk
GETList all VPS Disks

Returns the additional disk add-ons attached to this VPS. The primary OS disk is not included in this list.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/vps/{vpsId}/disk");
  • vpsIdrequirednumberThe VPS ID retrieved from get vps.
Headers

Authorization: Bearer token



+ Body

[

{

serviceId: "string",

diskId: "string",

productSpec: "string",

expiryDate: "string"

}

]

Get VPS

/vps/{vpsId}
GETRetrieve VPS Information

Returns a detailed object representing the VPS, combining locally stored configuration with live data fetched from the platform.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/vps/{vpsId}");
  • vpsIdrequirednumberThe VPS ID retrieved from get vps.
Headers

Authorization: Bearer token



+ Body

{

configuration:{

ApplicationId: 1,

CpuCores: 1,

DataDiskSizeGb: 1,

ExternalNetwork: true,

InternalNetwork: true,

OsDiskSizeGb: 1,

RamMb: 1,

VpsOsId: 1,

},

cpanel: true,

cpanelInfo:{

productSpec: "string"

},

cpanelRebuilding: true,

id: "string",

name: "string",

productOptions:{

},

productSpec: "string",

{

Application:{

AdminUrl: "string",

ApplicationId: 1,

DisplayName: "string",

Version: "string"

},

CpuCores: 1,

GuestHostname: "string",

KVMServer:{

Hostname: "string"

},

Network:{

Addresses:{

IpAddress: "string",

IPAddressRange:{

GatewayIpAddress: "string",

Netmask: "string"

}

}

},

OS:{

DisplayName: "string",

LibvirtOsType: "string",

LibvirtOsVariant: "string"

},

RamMb: 1.99,

Status:{

CurrentAction: "string",

Domstate: "string",

PendingAction: {},

VNCDisplay: "string"

},

Storage:{

SizeMb: 1.99

},

SuperPassword: "string"

}

}

getVpsAddon

/vps/{vpsId}/addon/{addonId}
GETRetreive

Returns a short, cheap set of info for this item. If this function takes

more than 1ms, that's too long.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/vps/{vpsId}/addon/{addonId}");
  • vpsIdrequirednumberThe VPS ID retrieved from get vps.
  • addonIdrequirednumberThe addon Id.
Headers

Authorization: Bearer token



+ Body

[

{

id: "string",

productCode: "string"

}

]

Ip Addresses

/vps/{vpsId}/ipv6Address
POSTAdd IPV6 Address

Allocates a free IPv6 address to the VPS. Each VPS may only hold one IPv6 address; calling this on a VPS that already has one returns an error instead of allocating a second.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/vps/{vpsId}/ipv6Address", [
            "version" => "string"
    ]);
  • vpsIdrequirednumberThe VPS ID retrieved from get vps.
  • versionoptionalstring,nullableMust be `6`
Headers

Authorization: Bearer token

+ Body

{
version: "string"
}

+ Body

{

result: "string",

error: "string",

data: "string"

}

Limits vps

/vps/{vpsId}/limits
POSTRetreive limits

Returns the limits for the current user, a key-value map.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/vps/{vpsId}/limits");
  • vpsIdrequirednumberThe VPS ID retrieved from get vps.
Headers

Authorization: Bearer token



+ Body

{

(code): true

}

Operating Systems

/vps/{vpsId}/rebuildOperatingSystems
GETRetrieve Available Operating Systems

Returns the OS variant codes that can be used when rebuilding this VPS. Only OS options within the same pricing tier as the currently installed OS are returned.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/vps/{vpsId}/rebuildOperatingSystems");
  • vpsIdrequirednumberThe VPS ID retrieved from get vps.
Headers

Authorization: Bearer token



+ Body

["string"]

Reboot

/vps/{vpsId}/reboot
POSTReboot a VPS

Initiates a hard reboot of the VPS.

**Warning:** This will cause a service interruption. All services running on the VPS will be briefly unavailable.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/vps/{vpsId}/reboot", [
    ]);
  • vpsIdrequirednumberThe VPS ID retrieved from get vps.
Headers

Authorization: Bearer token

+ Body

{
}

+ Body

Rebuild

/vps/{vpsId}/rebuild
POSTRebuild a VPS

Reinstalls the VPS operating system, optionally changing the OS or pre-installed application.

**Warning:** This will cause a service interruption.
**Warning:** This irreversibly wipes all data on the VPS OS disk. Data disk add-ons are unaffected.
**Note:** You cannot switch between Linux and Windows. Windows rebuilds require an existing Windows licence already active on the VPS.
**Note:** If a cPanel add-on is active and `cpanel` is `true`, the rebuild will include cPanel. If `cpanelCode` references a different cPanel tier than the current one, the licence will be updated automatically.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/vps/{vpsId}/rebuild", [
            "ApplicationId" => "string",
            "cpanel" => true,
            "cpanelCode" => "string",
            "VpsOsId" => 1,
            "osVariant" => "string"
    ]);
  • vpsIdrequirednumberThe VPS ID retrieved from get vps.
  • ApplicationIdoptionalstring,nullablePlatform application ID to pre-install after rebuild
  • cpaneloptionalboolean,nullableIf `true` and a cPanel add-on is present, rebuilds with cPanel enabled
  • cpanelCodeoptionalstring,nullableThe cPanel product spec to use (e.g. `vps_addon-cpanel`); updates the licence if different from the current one
  • VpsOsIdoptionalnumber,nullableThe OS ID to install; must be within the same OS type (Linux or Windows) as the current installation
  • osVariantoptionalstring,nullableThe libvirt OS variant string for the selected OS
Headers

Authorization: Bearer token

+ Body

{
ApplicationId: "string",
cpanel: true,
cpanelCode: "string",
VpsOsId: 1,
osVariant: "string"
}

+ Body

true

Reverse DNS

/vps/{vpsId}/reverseDNS
GETRetrieve Reverse DNS Configuration

Returns the current PTR (reverse DNS) records for all IP addresses attached to this VPS, keyed by IP address.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/vps/{vpsId}/reverseDNS");
  • vpsIdrequirednumberThe VPS ID retrieved from get vps.
Headers

Authorization: Bearer token



+ Body

{

(ip_address):{

ref: "string",

target: "string"

}

}

POSTUpdate Reverse DNS

Creates or replaces PTR (reverse DNS) records for one or more IP addresses attached to this VPS. The target hostname must already resolve to the IP address being updated; the call will fail if it does not.

**Note:** Use underscores in place of dots when specifying IPv4 addresses as array keys (PHP array key restriction).
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/vps/{vpsId}/reverseDNS", [
            "(ip_address)" => [
                "new" => [
                    "target" => "string"
                ],
                "delete" => "string"
            ]
    ]);
  • vpsIdrequirednumberThe VPS ID retrieved from get vps.
  • `ip_address`requiredobjectEntry keyed by IP address (use `_` instead of `.` in IPv4 addresses) {

- `new` (object,nullable) - New PTR record to create {

- `target` (string,required) - The hostname this IP should resolve to (must already point back to this IP)

- `delete` (string,nullable) - The existing record ref(s) to remove

Headers

Authorization: Bearer token

+ Body

{
(ip_address):{
new:{
target: "string"
},
delete: "string"
}
}

+ Body

Shutdown

/vps/{vpsId}/stop
POSTShutdown a VPS

Gracefully shuts down a running VPS.

**Note:** This stops all services on the VPS. Use the Start endpoint to power it back on.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/vps/{vpsId}/stop");
  • vpsIdrequirednumberThe VPS ID retrieved from get vps.
Headers

Authorization: Bearer token



+ Body

Start

/vps/{vpsId}/start
POSTStart a VPS

Powers on a stopped VPS.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/vps/{vpsId}/start");
  • vpsIdrequirednumberThe VPS ID retrieved from get vps.
Headers

Authorization: Bearer token



+ Body

VNC

/vps/{vpsId}/vnc
GETRetrieve VNC Information

Returns the VNC connection details for the VPS, including the display identifier, password, and any IP address restrictions currently in place.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/vps/{vpsId}/vnc");
  • vpsIdrequirednumberThe VPS ID retrieved from get vps.
Headers

Authorization: Bearer token



+ Body

{

Status:{

VNCDisplay: {}

},

VNCIPAddressACL: {},

VncPassword: {}

}

VNC Lock

/vps/{vpsId}/lockVnc
POSTLock VNC

Removes all IP address ACL entries from the VNC access list, effectively locking VNC access to no IP addresses.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/vps/{vpsId}/lockVnc", [
    ]);
  • vpsIdrequirednumberThe VPS ID retrieved from get vps.
Headers

Authorization: Bearer token

+ Body

{
}

+ Body

{}

VNC Unlock

/vps/{vpsId}/unlockVnc
POSTUnlock VNC

Adds an IP address to the VNC ACL, granting that address access to connect to the VPS via VNC.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/vps/{vpsId}/unlockVnc", [
            "IpAddress" => "string"
    ]);
  • vpsIdrequirednumberThe VPS ID retrieved from get vps.
  • IpAddressoptionalstring,nullableThe IP address to allow VNC access from
Headers

Authorization: Bearer token

+ Body

{
IpAddress: "string"
}

+ Body

VPS

/vps
GETList all VPS

Returns a summary list of VPS instances on the account.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/vps");
Headers

Authorization: Bearer token



+ Body

[

{

id: "string",

location: "string",

cachedHostname: "string",

name: "string",

product_spec: "string",

}

]

VPS Name

/vps/{vpsId}/name
GETRetrieve VPS Name

Returns the user-assigned name for the VPS, falling back to the cached platform hostname if no custom name has been set.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/vps/{vpsId}/name");
  • vpsIdrequirednumberThe VPS ID retrieved from get vps.
Headers

Authorization: Bearer token



+ Body

string

POSTSet a Name for the VPS

Sets a human-readable name for the VPS. Names longer than 255 characters will be silently truncated.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/vps/{vpsId}/name", [
            "name" => "string"
    ]);
  • vpsIdrequirednumberThe VPS ID retrieved from get vps.
  • namerequiredstringThe new VPS name (max 255 characters)
Headers

Authorization: Bearer token

+ Body

{
name: "string"
}

+ Body

true

Website Turbo

Assign Package

/website_turbo/{websiteTurboId}/assignPackage
POSTAssign package

Assigns a hosting package to this Website Turbo service and enables the

`WebsiteTurbo` flag on the underlying virtual host at the platform.

**Note:** A Website Turbo service can only be assigned to one package
at a time. Assign a different package to move the benefit.
    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/website_turbo/{websiteTurboId}/assignPackage", [
            "packageId" => "string"
    ]);
  • websiteTurboIdrequirednumberThe Website Turbo ID retrieved from get website turbo.
  • packageIdrequiredstringThe ID of the package to enable Website Turbo on
Headers

Authorization: Bearer token

+ Body

{
packageId: "string"
}

+ Body

true

List Website Turbo

/website_turbo/{websiteTurboId}
GETRetrieve Website Turbo services

Returns the full detail for this Website Turbo service.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/website_turbo/{websiteTurboId}");
  • websiteTurboIdrequirednumberThe Website Turbo ID retrieved from get website turbo.
Headers

Authorization: Bearer token



+ Body

[

{

{

id: "string",

expiryDate: "string",

name: "string",

packageId: "string",

preferredRenewalAction: "string"

}

}

]

List Website Turbo

/website_turbo
GETRetrieve Website Turbo services

Returns the full detail for this Website Turbo service.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/website_turbo");
Headers

Authorization: Bearer token



+ Body

[

{

{

id: "string",

expiryDate: "string",

name: "string",

packageId: "string",

preferredRenewalAction: "string"

}

}

]

Unassign Package

/website_turbo/{websiteTurboId}/unAssignPackage
POSTUnassign Package

Removes the package assignment from this Website Turbo service and

disables the `WebsiteTurbo` flag on the underlying virtual host.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/website_turbo/{websiteTurboId}/unAssignPackage", [
    ]);
  • websiteTurboIdrequirednumberThe Website Turbo ID retrieved from get website turbo.
Headers

Authorization: Bearer token

+ Body

{
}

+ Body

true

Timeline Backups

Database Backups

/package/{packageId}/web/timelineBackup/database/{databaseId}
GETList Database Timeline Storage items

Returns the full detail for this database backup item, including the

database name and all available snapshot timestamps.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/timelineBackup/database/{databaseId}");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • databaseIdrequirednumberThe database ID.
Headers

Authorization: Bearer token



+ Body

{

id: "string",

name: "string",

snapshotTimes: ["string"],

lastSnapshotTime: "string"

}

List Database Jobs

/package/{packageId}/web/timelineBackup/database/{databaseId}/jobs
GETList Database Snapshot jobs

Returns any currently queued or running backup/restore jobs for this

database item. Returns an empty array when no jobs are active.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/timelineBackup/database/{databaseId}/jobs");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • databaseIdrequirednumberThe database ID.
Headers

Authorization: Bearer token



+ Body

[

]

List Items

/package/{packageId}/web/timelineStorages
GETList all Timeline Storage items

Returns all timeline storage items associated with this web service,

including those belonging to recently deleted ("dead") webs with the same

primary name (up to 30 days old).

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/timelineStorages");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

{

{

id: "string",

canBackUp: true,

hasDeadWeb: true,

database:{

(name):{

{

id: "string",

name: "string",

snapshotTimes: ["string"],

lastSnapshotTime: "string"

}

jobs: []

}

},

name: "string",

web:{

{

id: "string",

snapshotTimes: ["string"],

lastSnapshotTime: "string"

}

jobs: []

}

}

}

]

List Mailbox Jobs

/package/{packageId}/web/timelineBackup/mailbox/{mailboxId}/jobs
GETList Mailbox Snapshot jobs

Returns any currently queued or running backup/restore jobs for this

mailbox item. Returns an empty array when no jobs are active.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/timelineBackup/mailbox/{mailboxId}/jobs");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • mailboxIdrequiredstringFIXME
Headers

Authorization: Bearer token



+ Body

[

]

List Timeline

/package/{packageId}/web/timelineBackup
GETRetrieve Timeline Storage site item

Returns the full detail for this timeline storage item, including all

available web, database, and mailbox snapshots together with their

associated job queues.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/timelineBackup");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

id: "string",

canBackUp: true,

hasDeadWeb: true,

database:{

(name):{

{

id: "string",

name: "string",

snapshotTimes: ["string"],

lastSnapshotTime: "string"

}

jobs: []

}

},

name: "string",

web:{

{

id: "string",

snapshotTimes: ["string"],

lastSnapshotTime: "string"

}

jobs: []

}

}

List Timeline

/reseller/{resellerId}/timelineStorage
GETRetrieve Timeline Storage service

Returns the full timeline storage service object, including all tracked

sites. Sites that have been deleted within the last 30 days are also

included and are indicated by `hasDeadWeb: true`.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/reseller/{resellerId}/timelineStorage");
  • resellerIdrequirednumberYour reseller ID.
Headers

Authorization: Bearer token



+ Body

{

id: "string",

items:{

id: "string",

name: "string",

hasDeadWeb: true

}

}

List Timeline

/timeline_storage
GETList Timeline Storage services

Returns a lightweight summary of this timeline storage service, including

the number of tracked sites and the current product tier.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/timeline_storage");
Headers

Authorization: Bearer token



+ Body

[

{

id: "string",

itemCount: 1,

productSpec: "string",

pro: true

}

]

List Web Jobs

/package/{packageId}/web/timelineBackup/web/jobs
GETList Web Snapshot jobs

Returns any currently queued or running backup/restore jobs for this web

item. Returns an empty array when no jobs are active.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/timelineBackup/web/jobs");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

[

]

Mailbox Backups

/package/{packageId}/web/timelineBackup/mailbox/{mailboxId}
GETList Mailbox Timeline Storage items

Returns the full detail for this mailbox backup item, including the email

address and all available snapshot timestamps.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/timelineBackup/mailbox/{mailboxId}");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • mailboxIdrequiredstringFIXME
Headers

Authorization: Bearer token



+ Body

{

id: "string",

name: "string",

snapshotTimes: ["string"],

lastSnapshotTime: "string"

}

Restore Database Snapshot

/package/{packageId}/web/timelineBackup/database/{databaseId}/restoreSnapshot
POSTRestore Database Snapshot Item

Enqueues a restore job for this database backup item. Use `action` to

choose between a full web restore (`restore`) or database-only restore

(`mysqlrestore`).

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/timelineBackup/database/{databaseId}/restoreSnapshot", [
            "action" => "string",
            "RestoreAsOf" => 1,
            "RestorePath" => "string",
            "target" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • databaseIdrequirednumberThe database ID.
  • actionrequiredstringThe restore action: `restore` for a full web restore, `mysqlrestore` for database only
  • RestoreAsOfrequirednumberUNIX timestamp of the snapshot to restore from
  • RestorePathrequiredstringFilesystem path to restore into
  • targetoptionalstring,nullableOptional override restore target
Headers

Authorization: Bearer token

+ Body

{
action: "string",
RestoreAsOf: 1,
RestorePath: "string",
target: "string"
}

+ Body

{

}

Restore Mailbox Snapshot

/package/{packageId}/web/timelineBackup/mailbox/{mailboxId}/restoreSnapshot
POSTRestore Mailbox Snapshot Item

Enqueues a restore job for this mailbox backup item. If the target mailbox

does not exist it will be created automatically (subject to the `mailbox`

limit). Pass `tempMailboxRestore: true` to restore into a `temp-` prefixed

mailbox instead of overwriting the original.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/timelineBackup/mailbox/{mailboxId}/restoreSnapshot", [
            "timestamp" => "string",
            "tempMailboxRestore" => true
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • mailboxIdrequiredstringFIXME
  • timestamprequiredstringISO8601 or `Y-m-d H:i:s` timestamp of the snapshot to restore
  • tempMailboxRestoreoptionalboolean,nullableIf `true`, restore into a `temp-` prefixed mailbox
Headers

Authorization: Bearer token

+ Body

{
timestamp: "string",
tempMailboxRestore: true
}

+ Body

{

id: "string",

status: "string",

createdAt: "string"

}

Restore Web Snapshot

/package/{packageId}/web/timelineBackup/web/restoreSnapshot
POSTRestore Web Snapshot Item

Enqueues a restore job for this web backup item. Use `action` to choose

between a full web restore (`restore`) or a database-only restore

(`mysqlrestore`).

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/timelineBackup/web/restoreSnapshot", [
            "action" => "string",
            "RestoreAsOf" => 1,
            "RestorePath" => "string",
            "target" => "string"
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • actionrequiredstringThe restore action: `restore` for a full web restore, `mysqlrestore` for database only
  • RestoreAsOfrequirednumberUNIX timestamp of the snapshot to restore from
  • RestorePathrequiredstringFilesystem path to restore into
  • targetoptionalstring,nullableOptional override restore target
Headers

Authorization: Bearer token

+ Body

{
action: "string",
RestoreAsOf: 1,
RestorePath: "string",
target: "string"
}

+ Body

{

}

Take Database Snapshot

/package/{packageId}/web/timelineBackup/database/{databaseId}/takeSnapshot
POSTTake Snapshot Item

Triggers an on-demand database snapshot outside of the normal backup

schedule. The job is queued immediately; poll `jobs` to track progress.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/timelineBackup/database/{databaseId}/takeSnapshot", [
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • databaseIdrequirednumberThe database ID.
Headers

Authorization: Bearer token

+ Body

{
}

+ Body

{

}

Take Mailbox Snapshot

/package/{packageId}/web/timelineBackup/mailbox/{mailboxId}/takeSnapshot
POSTTake Snapshot Item

Triggers an on-demand mailbox snapshot outside of the normal backup

schedule. The job is queued immediately; poll `jobs` to track progress.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/timelineBackup/mailbox/{mailboxId}/takeSnapshot", [
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
  • mailboxIdrequiredstringFIXME
Headers

Authorization: Bearer token

+ Body

{
}

+ Body

{

}

Take Web Snapshot

/package/{packageId}/web/timelineBackup/web/takeSnapshot
POSTTake Snapshot Item

Triggers an on-demand web snapshot outside of the normal backup schedule.

The job is queued immediately; poll `jobs` to track progress.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->postWithFields("/package/{packageId}/web/timelineBackup/web/takeSnapshot", [
    ]);
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token

+ Body

{
}

+ Body

{

}

Web Backups

/package/{packageId}/web/timelineBackup/web
GETList Web Timeline Storage items

Returns the full detail for this web backup item, including all available

snapshot timestamps.

    <?php
    $general_api_key = "API_KEY";
    $services_api = new \TwentyI\API\Services($general_api_key);

    $request = $services_api->getWithFields("/package/{packageId}/web/timelineBackup/web");
  • packageIdrequirednumberThe Package ID retrieved from get packages.
Headers

Authorization: Bearer token



+ Body

{

id: "string",

snapshotTimes: ["string"],

lastSnapshotTime: "string"

}