This function can only be used for metasite api keys. Use this function to add a new site to your metasite. The new site is created by making a copy of an existing site. You can additionally use optional parameters to override base site's settings.
base_site_id int required
ID of the site used as a base for the new site
admin_id int required
ID of the main administrator of the new site
name string required
Name of the new site
is_commission_based bool required
true for Planyo PRO-COMM sites, false for Planyo PRO
copy_resources bool optional
Set to true if you'd like to insert copies of all the resources of base_site_id.
payment_account_id string optional
You can override the base site's payment gateway account ID (e.g. in case of paypal it would be the paypal's registered address.
generate_api_key bool optional
Set to true if a new API key should be generated for the new site. Note: the API key will have no restrictions. Use the function add_api_key instead of this parameter if you'd like to create an API key with security mechanisms.
moderator_id int optional
ID of a user to assigned as the site moderator. Note: if this assignment cannot be done (for security reasons), the response will include a field name 'moderator_error' with the error text. Note 2: An email might be sent to the new moderator informing them of their new role.
copy_published_resources_only bool optional
Set this to false if you want to copy all resources from the base site, including the unpublished ones. By default only published resources will be copied.
language string optional
by specifying a 2-letter (ISO 639-1) language code (all capital letters e.g. EN, DE, FR, ES, IT) you can change the language of the text values returned
api_key string required
your API key - Click here to get your key
. If your API key uses a hash key, you must also include the parameters hash_key and hash_timestamp
ID of the newly created site
New API key for the site (only when generate_api_key was set to true)
Click here to test this function in the API playground.