Getting Started

1. Registration

Create account on cubocloud.ir

2. Authorization in API

Use method api/Authorization/Login to get an authorization token

JS Jquery AJAX. api/Authorization/Login

var data = {
        login: "account-email@example.com",
        password: "MyVery^$tr0nGpaSSvvoRd"
    }
var settings = {
    "url": "http://api.cubocloud.ir/api/Authorization/Login",
    "method": "POST",
    "headers": {
        "content-type": "application/json",
    },
    "data": {
        login: "account-email@example.com",
        password: "MyVery^$tr0nGpaSSvvoRd"
    }
    "data": JSON.stringify(data)
}
$.ajax(settings).done(function (response) {
    console.log(response);
});

response api/Authorization/Login

{
  "Token": "eyJ0eXAiOiJciOiIUzI1NiJ9.eyJ1bmlxdwuY29tXCIsXCJVc2VyTmFtZVllMjc0ZGJjMVwiLFZCI6Im3NDB9.-kPIRmpWux3V6ljkldvP4",
  "StatusCode": 0,
  "ErrorMsg": null
}

Use the received token to make requests to the API. All requests to the API must contain http header "Authorization" with Bearer token received in the response above.

3. Create project

Let's create our first project using the method api/Project/CreateProject.

JS Jquery AJAX. api/Project/CreateProject

var data = {
    Domain: "example.com",
}
var settings = {
    "url": "http://api.cubocloud.ir/api/Project/CreateProject",
    "method": "POST",
    "headers": {
        "content-type": "application/json",
        "authorization": "eyJ0eXAiOiJciOiIUzI1NiJ9.eyJ1bmlxdwuY29tXCIsXCJVc2VyTmFtZVllMjc0ZGJjMVwiLFZCI6Im3NDB9.-kPIRmpWux3V6ljkldvP4"
    },
    "data": JSON.stringify(data)
}
$.ajax(settings).done(function (response) {
    console.log(response);
});
            

response api/Project/CreateProject

{
  "Id": 2508519,
  "Domain": "example.com",
  "Status": 2,
  "StatusCode": 0,
  "ErrorMsg": null
}

The project was successfully created, but it has not been started yet. Now you need to add keywords.

4. Adding keywords

To add keywords, you can use the method api/Keyword/AddKeywords.

JS Jquery AJAX. api/Keyword/AddKeywords

var data = {
    "ProjectId": 2508519,
    "Keywords": [
    {
        Title: "myFirstKeyword",
        Url: "example.com/main"
    },
    {
        Title: "keywordWithoutUrl",
    },
    {
        Title: "anotherKeyword",
    }]
}
var settings = {
    "url": "http://api.cubocloud.ir/api/Keyword/AddKeywords",
    "method": "POST",
    "headers": {
        "content-type": "application/json",
        "authorization": "eyJ0eXAiOiJciOiIUzI1NiJ9.eyJ1bmlxdwuY29tXCIsXCJVc2VyTmFtZVllMjc0ZGJjMVwiLFZCI6Im3NDB9.-kPIRmpWux3V6ljkldvP4"
    },
    "data": JSON.stringify(data)
}
$.ajax(settings).done(function (response) {
    console.log(response);
});

response api/Keyword/AddKeywords

{
  "AddKeywordsCount": 3,
  "KeywordsIds": [
    89822139,
    89822140,
    89822141
  ],
  "StatusCode": 0,
  "ErrorMsg": null
}

Method return keywords identifiers and the number of keywords added (repeated keywords are ignored).

5. Launching a campaign

To start a campaign, you can use the method api/Project/StartProject.

JS Jquery AJAX. api/Project/StartProject

var data = {
    "ProjectId": 2508519
}
var settings = {
    "url": "http://api.cubocloud.ir/api/Project/StartProject",
    "method": "POST",
    "headers": {
        "content-type": "application/json",
        "authorization": "eyJ0eXAiOiJciOiIUzI1NiJ9.eyJ1bmlxdwuY29tXCIsXCJVc2VyTmFtZVllMjc0ZGJjMVwiLFZCI6Im3NDB9.-kPIRmpWux3V6ljkldvP4"
    },
    "data": JSON.stringify(data);
}
$.ajax(settings).done(function (response) {
    console.log(response);
});

response api/Keyword/AddKeywords

{
  "Id": 2508519,
  "Domain": "example.com",
  "Status": 1,
  "StatusCode": 0,
  "ErrorMsg": null
}

The project is launched and if the balance is enough funds will start buying backlinks.