projects
Create a project
Schedules default to every job daily at midnight UTC when omitted. Creating a project queues its first run of every job straight away, so its pages fill in over the following minutes.
POST
/
v1
/
organizations
/
{orgId}
/
projects
Create a project
curl --request POST \
--url https://api.surnex.io/v1/organizations/{orgId}/projects \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"domain": "<string>",
"keywords": [],
"competitors": [
"<string>"
],
"location_code": 2840,
"language_code": "en",
"search_engine": "google",
"research_location_code": 1,
"research_language_code": "<string>",
"ai_location_code": 1,
"ai_language_code": "<string>",
"local_location_code": 1,
"local_language_code": "<string>",
"schedules": [
{
"runHour": 11,
"timezone": "<string>",
"enabled": true
}
]
}
'import requests
url = "https://api.surnex.io/v1/organizations/{orgId}/projects"
payload = {
"name": "<string>",
"domain": "<string>",
"keywords": [],
"competitors": ["<string>"],
"location_code": 2840,
"language_code": "en",
"search_engine": "google",
"research_location_code": 1,
"research_language_code": "<string>",
"ai_location_code": 1,
"ai_language_code": "<string>",
"local_location_code": 1,
"local_language_code": "<string>",
"schedules": [
{
"runHour": 11,
"timezone": "<string>",
"enabled": True
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
domain: '<string>',
keywords: [],
competitors: ['<string>'],
location_code: 2840,
language_code: 'en',
search_engine: 'google',
research_location_code: 1,
research_language_code: '<string>',
ai_location_code: 1,
ai_language_code: '<string>',
local_location_code: 1,
local_language_code: '<string>',
schedules: [{runHour: 11, timezone: '<string>', enabled: true}]
})
};
fetch('https://api.surnex.io/v1/organizations/{orgId}/projects', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.surnex.io/v1/organizations/{orgId}/projects",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'domain' => '<string>',
'keywords' => [
],
'competitors' => [
'<string>'
],
'location_code' => 2840,
'language_code' => 'en',
'search_engine' => 'google',
'research_location_code' => 1,
'research_language_code' => '<string>',
'ai_location_code' => 1,
'ai_language_code' => '<string>',
'local_location_code' => 1,
'local_language_code' => '<string>',
'schedules' => [
[
'runHour' => 11,
'timezone' => '<string>',
'enabled' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.surnex.io/v1/organizations/{orgId}/projects"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"keywords\": [],\n \"competitors\": [\n \"<string>\"\n ],\n \"location_code\": 2840,\n \"language_code\": \"en\",\n \"search_engine\": \"google\",\n \"research_location_code\": 1,\n \"research_language_code\": \"<string>\",\n \"ai_location_code\": 1,\n \"ai_language_code\": \"<string>\",\n \"local_location_code\": 1,\n \"local_language_code\": \"<string>\",\n \"schedules\": [\n {\n \"runHour\": 11,\n \"timezone\": \"<string>\",\n \"enabled\": true\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.surnex.io/v1/organizations/{orgId}/projects")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"keywords\": [],\n \"competitors\": [\n \"<string>\"\n ],\n \"location_code\": 2840,\n \"language_code\": \"en\",\n \"search_engine\": \"google\",\n \"research_location_code\": 1,\n \"research_language_code\": \"<string>\",\n \"ai_location_code\": 1,\n \"ai_language_code\": \"<string>\",\n \"local_location_code\": 1,\n \"local_language_code\": \"<string>\",\n \"schedules\": [\n {\n \"runHour\": 11,\n \"timezone\": \"<string>\",\n \"enabled\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.surnex.io/v1/organizations/{orgId}/projects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"keywords\": [],\n \"competitors\": [\n \"<string>\"\n ],\n \"location_code\": 2840,\n \"language_code\": \"en\",\n \"search_engine\": \"google\",\n \"research_location_code\": 1,\n \"research_language_code\": \"<string>\",\n \"ai_location_code\": 1,\n \"ai_language_code\": \"<string>\",\n \"local_location_code\": 1,\n \"local_language_code\": \"<string>\",\n \"schedules\": [\n {\n \"runHour\": 11,\n \"timezone\": \"<string>\",\n \"enabled\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"domain": "<string>",
"is_demo": true,
"location_code": 123,
"language_code": "<string>",
"search_engine": "google",
"tracking_location_code": 123,
"tracking_language_code": "<string>",
"ai_location_code": 123,
"ai_language_code": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"schedules": [
{
"jobType": "rank_check",
"cadence": "daily",
"runHour": 11,
"timezone": "<string>",
"enabled": true,
"next_run_at": "2023-11-07T05:31:56Z",
"last_run_at": "2023-11-07T05:31:56Z"
}
]
}
}{}{}Body
application/json
⌘I
Create a project
curl --request POST \
--url https://api.surnex.io/v1/organizations/{orgId}/projects \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"domain": "<string>",
"keywords": [],
"competitors": [
"<string>"
],
"location_code": 2840,
"language_code": "en",
"search_engine": "google",
"research_location_code": 1,
"research_language_code": "<string>",
"ai_location_code": 1,
"ai_language_code": "<string>",
"local_location_code": 1,
"local_language_code": "<string>",
"schedules": [
{
"runHour": 11,
"timezone": "<string>",
"enabled": true
}
]
}
'import requests
url = "https://api.surnex.io/v1/organizations/{orgId}/projects"
payload = {
"name": "<string>",
"domain": "<string>",
"keywords": [],
"competitors": ["<string>"],
"location_code": 2840,
"language_code": "en",
"search_engine": "google",
"research_location_code": 1,
"research_language_code": "<string>",
"ai_location_code": 1,
"ai_language_code": "<string>",
"local_location_code": 1,
"local_language_code": "<string>",
"schedules": [
{
"runHour": 11,
"timezone": "<string>",
"enabled": True
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
domain: '<string>',
keywords: [],
competitors: ['<string>'],
location_code: 2840,
language_code: 'en',
search_engine: 'google',
research_location_code: 1,
research_language_code: '<string>',
ai_location_code: 1,
ai_language_code: '<string>',
local_location_code: 1,
local_language_code: '<string>',
schedules: [{runHour: 11, timezone: '<string>', enabled: true}]
})
};
fetch('https://api.surnex.io/v1/organizations/{orgId}/projects', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.surnex.io/v1/organizations/{orgId}/projects",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'domain' => '<string>',
'keywords' => [
],
'competitors' => [
'<string>'
],
'location_code' => 2840,
'language_code' => 'en',
'search_engine' => 'google',
'research_location_code' => 1,
'research_language_code' => '<string>',
'ai_location_code' => 1,
'ai_language_code' => '<string>',
'local_location_code' => 1,
'local_language_code' => '<string>',
'schedules' => [
[
'runHour' => 11,
'timezone' => '<string>',
'enabled' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.surnex.io/v1/organizations/{orgId}/projects"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"keywords\": [],\n \"competitors\": [\n \"<string>\"\n ],\n \"location_code\": 2840,\n \"language_code\": \"en\",\n \"search_engine\": \"google\",\n \"research_location_code\": 1,\n \"research_language_code\": \"<string>\",\n \"ai_location_code\": 1,\n \"ai_language_code\": \"<string>\",\n \"local_location_code\": 1,\n \"local_language_code\": \"<string>\",\n \"schedules\": [\n {\n \"runHour\": 11,\n \"timezone\": \"<string>\",\n \"enabled\": true\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.surnex.io/v1/organizations/{orgId}/projects")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"keywords\": [],\n \"competitors\": [\n \"<string>\"\n ],\n \"location_code\": 2840,\n \"language_code\": \"en\",\n \"search_engine\": \"google\",\n \"research_location_code\": 1,\n \"research_language_code\": \"<string>\",\n \"ai_location_code\": 1,\n \"ai_language_code\": \"<string>\",\n \"local_location_code\": 1,\n \"local_language_code\": \"<string>\",\n \"schedules\": [\n {\n \"runHour\": 11,\n \"timezone\": \"<string>\",\n \"enabled\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.surnex.io/v1/organizations/{orgId}/projects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"keywords\": [],\n \"competitors\": [\n \"<string>\"\n ],\n \"location_code\": 2840,\n \"language_code\": \"en\",\n \"search_engine\": \"google\",\n \"research_location_code\": 1,\n \"research_language_code\": \"<string>\",\n \"ai_location_code\": 1,\n \"ai_language_code\": \"<string>\",\n \"local_location_code\": 1,\n \"local_language_code\": \"<string>\",\n \"schedules\": [\n {\n \"runHour\": 11,\n \"timezone\": \"<string>\",\n \"enabled\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"domain": "<string>",
"is_demo": true,
"location_code": 123,
"language_code": "<string>",
"search_engine": "google",
"tracking_location_code": 123,
"tracking_language_code": "<string>",
"ai_location_code": 123,
"ai_language_code": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"schedules": [
{
"jobType": "rank_check",
"cadence": "daily",
"runHour": 11,
"timezone": "<string>",
"enabled": true,
"next_run_at": "2023-11-07T05:31:56Z",
"last_run_at": "2023-11-07T05:31:56Z"
}
]
}
}{}{}