The domain, language and layout of the public pages that contacts see, such as the subscription, confirmation and unsubscribe pages. Each account has one default site. Create, update and delete sites, and set the default site and the welcome delivery of each site.
Get sites
Returns all your sites with their settings and full domain. Use data to also include properties, mailing lists, layout, marketing settings, authorization settings or parent sites; without data, no extra data is returned. For one site with all its data, use site. For settings only, use getCustomerSites.
Get sites › Request Body
Extra data to include for each site. Omitted keys default to false.
Get sites › Responses
OK
succeedResponse status.
Array of site objects.
Get site
Returns one of your sites with all its data: settings, full domain, properties, mailing lists, labels, HTML elements, layout, marketing settings and authorization settings. Returns an error if no site matches. For settings only, use getCustomerSite; for all your sites, use sites.
Get site › Request Body
domainSite domain name.
childrenSet to 1 to also look up parent sites of your sites. Defaults to 0.
Site options.
Get site › Responses
OK
succeedResponse status.
Get all site settings
Returns the settings of all your sites, sorted by domain. Deleted sites are left out. To also get the full domain and extra data such as mailing lists, properties and layout, use sites.
Get all site settings › Request Body
idYour own customer ID, or 0. Other IDs return an error.
Get all site settings › Responses
OK
succeedResponse status.
Get site settings
Returns the settings of one of your sites by domain, or of your default site if site is empty. If the domain is the parent site of one of your sites, the parent site is returned. If no site matches, result is false. To also get the mailing lists, properties, layout and other extra data of the site, use site.
Get site settings › Request Body
siteSite domain. If empty, the default site is returned.
Get site settings › Responses
OK
succeedResponse status.
Get default site settings
Returns the settings of your default site. This is the same as getCustomerSite with an empty site.
Get default site settings › Request Body
idYour own customer ID, or 0. Other IDs return an error.
Get default site settings › Responses
OK
succeedResponse status.
Create site
Creates a site for your account and returns its domain. If the domain is already taken, a suffix such as -2 is added to its first label, so use the returned domain in later calls. If you already have a site with this domain, that site is updated instead.
Create site › Request Body
domainSite domain name.
Site settings. has_csrf and deny_framing default to true.
Create site › Responses
OK
succeedResponse status.
resultSite domain name.
Update site
Updates the settings of one of your sites. Returns an error if you have no site with this domain. The settings in attrs are saved only when attrs has site.
The language is read from language, not lang as in siteCreate, and a missing language sets the site to FI. Other settings left out of attrs are reset too:
has_csrfanddeny_framingbecomefalse, althoughsiteCreatedefaults them totrue.welcome,ssl,is_default,whitelist_*,redirect,postfix,envelope_sender,embed_*androbots_txtare reset. For example, leaving outis_defaultmakes the site no longer the default site.domain_aliases,recaptcha_*,cspandparentare kept.
Get the current settings with site first and send them all with your changes.
Update site › Request Body
domainSite domain name.
Site settings. They are saved only when site is given, and settings left out are then reset, as described in siteUpdate.
Update site › Responses
OK
succeedResponse status.
resultReturns 1 on success.
Delete site
Deletes one of your sites. Fails if it is your only site, if a mailing list uses it, or if a scheduled delivery that has not been sent yet uses it. If the deleted site was your default site, another site becomes the default.
Delete site › Request Body
domainSite domain name.
Delete site › Responses
OK
succeedResponse status.
resultReturns true on success.
Set site welcome message
Sets or removes the welcome message of one of your sites. Returns 1 even if you have no site with the given domain. You can also set the welcome message with the welcome setting of siteCreate and siteUpdate.
Set site welcome message › Request Body
siteDomain of your site.
deliveryDelivery ID sent as the welcome message when a contact joins through the site. 0 removes the welcome message.
Set site welcome message › Responses
OK
succeedResponse status.
resultReturns 1 on success.
Set default site
Legacy method. Prefer siteCreate and siteUpdate, which accept all site settings. Creates the site if it does not exist, or updates its language, welcome message and HTTPS setting, and makes it the default site. Other settings, such as redirect, postfix and the embedding and security options, are reset to their defaults. Returns the site domain, which can have a suffix such as -2 if a new site's domain is already taken.
Set default site › Request Body
idSet to 0. Other values, including your own customer ID, return an error.
siteSite domain. The site is created if it does not exist and set as the default site.
languageSite language, such as EN.
welcomeDelivery ID of the site welcome message.
sslWhether the site uses HTTPS: 1 or 0. Defaults to 0.
Set default site › Responses
OK
succeedResponse status.
resultDomain name of the new default site.
Set default site by customer ID
Creates or updates a site of your own customer account or of your parent or child account, and makes it the default site of that account. Settings not in the request, such as redirect, postfix and the embedding and security options, are reset to their defaults. For your own sites, prefer siteCreate and siteUpdate, which accept all site settings.
Set default site by customer ID › Request Body
siteDomain of the site to modify. If empty or not found, a new site is created.
customerIdCustomer ID: your own, or that of your parent or child customer.
newNameNew site domain. For a new site, a suffix such as -2 is added to the first label if the domain is taken.
languageSite language, such as EN.
welcomeDelivery ID of the site welcome message.
sslWhether the site uses HTTPS: 1 or 0. Defaults to 0.
Set default site by customer ID › Responses
OK
succeedResponse status.
resultDomain name of the new or modified site.
Get domain postfixes
Returns the shared domains (postfixes) available for sites. A site whose domain is only a name, such as newsletter, is served under a postfix, for example newsletter.example.net. Use one as the postfix setting in siteCreate or siteUpdate. The list is the same for all customers.
Get domain postfixes › Responses
OK
succeedResponse status.
resultArray of available site postfixes.
Get default domain postfix
Returns the postfix used for sites that have no postfix setting. See postfixes.
Get default domain postfix › Responses
OK
succeedResponse status.
resultDomain postfix.
Get site by name
Deprecated. Returns an error in the current version. Use getCustomerSite to get a site by domain.
Get site by name › Responses
OK
succeedResponse status.