Definition
The postCompetitor API Command will add additional competitors to an already created campaign. The command is processed in a queue, meaning that the result will be available after finishing creating the new campaign.
Cost
Using this command consumes 1 credit. *It will also consume credits from the site credits pool.
Module
The command is included in the Campaign API Module and will only consume credits assigned for Campaign API Operations.
Parameters
| campaignId | The ID number of the campaign you wish to add competitors to. |
| site | The URL of the website you wish to track. |
| siteType | The type of analysis done for the website. Can take the following values: url – analyzes the inbound links for the inserted url; prefix – analyzes the inbound links for the url’s prefix; subdomain – analyzes the inbound links for the url’s subdomain; domain – analyzes the inbound links for the url’s domain. |
Input URL Example
http://api.cognitiveseo.com/command.php?apiKey=your_api_key&command=postCompetitor&campaignId=2&site=http://www.cognitiveseo.com/&sitetype=url
Output Example
Running this command will result in the following JSON output:
{
"api": "cognitiveSEO API",
"data": {
"status": "success",
"data": {
"campaignId": "8",
"site1Id": 14,
"site1Url": "http:\/\/www.cognitiveseo.com"
},
"credits": 1
},
"time": 0.133
}
Output Details
| status | The status of the command (success or error). |
| campaignId | The ID number of the selected Campaign. |
| siteId | The ID number generated for the new website you entered in the campaign. |
| siteUrl | The URL of the competitor entered in the campaign. |
| credits | The credit cost of the command. |
| time | The time it took to process the command. |