Add site

POST https://umobilizer.com/partner/api/site/add/

Description

Adding a new wesbite for service. There are two options for linking the wesbite for the user:
  • Bind to existing
  • Creation and binding to the new

Input parameters

In the event of a website additon to an existing user:
Parameter Type Required Description
userId integer yes
User ID
siteName string yes
The name of the website that will be displayed in the users account
Restrictions:
  • Allowed characters: Letters, numbers, spaces, commas, hypens and underscores
  • Length: From 3 to 50 characters
siteUrl string yes
Abosolute link on the main page of the website
Addition of websites through IP not permitted.
You can add IDN domain names.
successCallbackUrl string No
Absolute URL for notification for the successful addition of the website to the service.
If the parameter is not specified, then the URL from the API settings is taken
Two GET parameters will be added to the specified URL:
  • result=success
  • siteId=siteId
failCallbackUrl string No
Error notification for Absolute URL when adding a website to the service
If the parameter is not specified, then the URL from the API settings is taken
Two GET parameters will be added to the specified URL:
  • result=fail
  • siteId=siteId
In the case of adding a site to a new user:
Parameter Type Required Description
userName string yes
Username for service authorization
userEmail string yes
User e-mail
userPass string No
User password If nothing is specified, a password will be generated by the service.
siteName string yes
The name of the website that will be displayed in the users account
Restrictions:
  • Allowed characters: Letters, numbers, spaces, commas, hypens and underscores
  • Length: From 3 to 50 characters
siteUrl string yes
Abosolute link on the main page of the website
Addition of websites through IP not permitted.
You can add IDN domain names.
successCallbackUrl string No
Absolute URL for notification for the successful addition of the website to the service.
If the parameter is not specified, then the URL from the API settings is taken
Two GET parameters will be added to the specified URL:
  • result=success
  • siteId=siteId
failCallbackUrl string No
Error notification for Absolute URL when adding a website to the service
If the parameter is not specified, then the URL from the API settings is taken
Two GET parameters will be added to the specified URL:
  • result=fail
  • siteId=siteId

Output parameter

In the event of a website additon to an existing user:
{
    "site": {
        "siteId": 1000,
        "siteName": "site.com",
        "siteUrl": "http://site.com",
        "published": false,
        "paidDate": null,
        "recognitionPreview": "//umobilizer.com/add-site/preview/1000",
        "result": true
    },
    "user": {
        "userId": 100,
        "userName": "userName",
        "userEmail": "email@gmail.com"
    }
}
In the case of adding a site to a new user:
{
    "site": {
        "siteId": 1000,
        "siteName": "site.com",
        "siteUrl": "http://site.com",
        "published": false,
        "paidDate": null,
        "recognitionPreview": "//umobilizer.com/add-site/preview/1000",
        "result": true
    },
    "user": {
        "userId": 100,
        "userName": "userName",
        "userEmail": "email@gmail.com",
        "userPass": "I9C5PC2dHK"
    }
}

User structure

Parameter Type Description
userId integer
User ID
userName string
Username
userEmail string
User e-mail
userPass string
User password

Site structure

Parameter Type Description
siteId integer
Site ID
siteName string
Site name
siteUrl string
URL of site
published boolean
Is the website publish:
  • true - published
  • false - not published
paidDate string
Data in format Y-m-dUnsuccessful payment will result in the mobilized websites suspension. null.
recognitionPreview string
Link to site preview, also includes a comparision with original version of the website.
result boolean
Result of adding a webstie