Create a project
curl --request POST \
--url https://api.mentionlab.io/api/v2/organisations/{organisationId}/projects \
--header 'Content-Type: application/json' \
--data '
{
"name": "Acme",
"website": "https://www.mentionlab.io",
"industry": "Cosmetics",
"description": "Skincare and haircare lines sold in Europe",
"entityType": "countries_cities",
"analysisInstructions": "Do not count retailers or marketplaces as brands.",
"themeAnalysisEnabled": true,
"themeLanguage": "auto"
}
'import requests
url = "https://api.mentionlab.io/api/v2/organisations/{organisationId}/projects"
payload = {
"name": "Acme",
"website": "https://www.mentionlab.io",
"industry": "Cosmetics",
"description": "Skincare and haircare lines sold in Europe",
"entityType": "countries_cities",
"analysisInstructions": "Do not count retailers or marketplaces as brands.",
"themeAnalysisEnabled": True,
"themeLanguage": "auto"
}
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: 'Acme',
website: 'https://www.mentionlab.io',
industry: 'Cosmetics',
description: 'Skincare and haircare lines sold in Europe',
entityType: 'countries_cities',
analysisInstructions: 'Do not count retailers or marketplaces as brands.',
themeAnalysisEnabled: true,
themeLanguage: 'auto'
})
};
fetch('https://api.mentionlab.io/api/v2/organisations/{organisationId}/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.mentionlab.io/api/v2/organisations/{organisationId}/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' => 'Acme',
'website' => 'https://www.mentionlab.io',
'industry' => 'Cosmetics',
'description' => 'Skincare and haircare lines sold in Europe',
'entityType' => 'countries_cities',
'analysisInstructions' => 'Do not count retailers or marketplaces as brands.',
'themeAnalysisEnabled' => true,
'themeLanguage' => 'auto'
]),
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.mentionlab.io/api/v2/organisations/{organisationId}/projects"
payload := strings.NewReader("{\n \"name\": \"Acme\",\n \"website\": \"https://www.mentionlab.io\",\n \"industry\": \"Cosmetics\",\n \"description\": \"Skincare and haircare lines sold in Europe\",\n \"entityType\": \"countries_cities\",\n \"analysisInstructions\": \"Do not count retailers or marketplaces as brands.\",\n \"themeAnalysisEnabled\": true,\n \"themeLanguage\": \"auto\"\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.mentionlab.io/api/v2/organisations/{organisationId}/projects")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Acme\",\n \"website\": \"https://www.mentionlab.io\",\n \"industry\": \"Cosmetics\",\n \"description\": \"Skincare and haircare lines sold in Europe\",\n \"entityType\": \"countries_cities\",\n \"analysisInstructions\": \"Do not count retailers or marketplaces as brands.\",\n \"themeAnalysisEnabled\": true,\n \"themeLanguage\": \"auto\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mentionlab.io/api/v2/organisations/{organisationId}/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\": \"Acme\",\n \"website\": \"https://www.mentionlab.io\",\n \"industry\": \"Cosmetics\",\n \"description\": \"Skincare and haircare lines sold in Europe\",\n \"entityType\": \"countries_cities\",\n \"analysisInstructions\": \"Do not count retailers or marketplaces as brands.\",\n \"themeAnalysisEnabled\": true,\n \"themeLanguage\": \"auto\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"slug": "<string>",
"entityType": "brands",
"analysisInstructions": "<string>",
"themeAnalysisEnabled": false,
"themeLanguage": "en",
"queryCount": 123,
"permissions": [
"project:read"
],
"customFilters": [
{
"type": "tag-group",
"id": "01234567-89ab-cdef-0123-456789abcdef"
}
],
"website": "<string>",
"industry": "<string>",
"description": "<string>",
"role": "project_manager"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}Projects
Create a project
Creates a project in the organisation, with its primary entity.
POST
/
api
/
v2
/
organisations
/
{organisationId}
/
projects
Create a project
curl --request POST \
--url https://api.mentionlab.io/api/v2/organisations/{organisationId}/projects \
--header 'Content-Type: application/json' \
--data '
{
"name": "Acme",
"website": "https://www.mentionlab.io",
"industry": "Cosmetics",
"description": "Skincare and haircare lines sold in Europe",
"entityType": "countries_cities",
"analysisInstructions": "Do not count retailers or marketplaces as brands.",
"themeAnalysisEnabled": true,
"themeLanguage": "auto"
}
'import requests
url = "https://api.mentionlab.io/api/v2/organisations/{organisationId}/projects"
payload = {
"name": "Acme",
"website": "https://www.mentionlab.io",
"industry": "Cosmetics",
"description": "Skincare and haircare lines sold in Europe",
"entityType": "countries_cities",
"analysisInstructions": "Do not count retailers or marketplaces as brands.",
"themeAnalysisEnabled": True,
"themeLanguage": "auto"
}
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: 'Acme',
website: 'https://www.mentionlab.io',
industry: 'Cosmetics',
description: 'Skincare and haircare lines sold in Europe',
entityType: 'countries_cities',
analysisInstructions: 'Do not count retailers or marketplaces as brands.',
themeAnalysisEnabled: true,
themeLanguage: 'auto'
})
};
fetch('https://api.mentionlab.io/api/v2/organisations/{organisationId}/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.mentionlab.io/api/v2/organisations/{organisationId}/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' => 'Acme',
'website' => 'https://www.mentionlab.io',
'industry' => 'Cosmetics',
'description' => 'Skincare and haircare lines sold in Europe',
'entityType' => 'countries_cities',
'analysisInstructions' => 'Do not count retailers or marketplaces as brands.',
'themeAnalysisEnabled' => true,
'themeLanguage' => 'auto'
]),
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.mentionlab.io/api/v2/organisations/{organisationId}/projects"
payload := strings.NewReader("{\n \"name\": \"Acme\",\n \"website\": \"https://www.mentionlab.io\",\n \"industry\": \"Cosmetics\",\n \"description\": \"Skincare and haircare lines sold in Europe\",\n \"entityType\": \"countries_cities\",\n \"analysisInstructions\": \"Do not count retailers or marketplaces as brands.\",\n \"themeAnalysisEnabled\": true,\n \"themeLanguage\": \"auto\"\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.mentionlab.io/api/v2/organisations/{organisationId}/projects")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Acme\",\n \"website\": \"https://www.mentionlab.io\",\n \"industry\": \"Cosmetics\",\n \"description\": \"Skincare and haircare lines sold in Europe\",\n \"entityType\": \"countries_cities\",\n \"analysisInstructions\": \"Do not count retailers or marketplaces as brands.\",\n \"themeAnalysisEnabled\": true,\n \"themeLanguage\": \"auto\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mentionlab.io/api/v2/organisations/{organisationId}/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\": \"Acme\",\n \"website\": \"https://www.mentionlab.io\",\n \"industry\": \"Cosmetics\",\n \"description\": \"Skincare and haircare lines sold in Europe\",\n \"entityType\": \"countries_cities\",\n \"analysisInstructions\": \"Do not count retailers or marketplaces as brands.\",\n \"themeAnalysisEnabled\": true,\n \"themeLanguage\": \"auto\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"slug": "<string>",
"entityType": "brands",
"analysisInstructions": "<string>",
"themeAnalysisEnabled": false,
"themeLanguage": "en",
"queryCount": 123,
"permissions": [
"project:read"
],
"customFilters": [
{
"type": "tag-group",
"id": "01234567-89ab-cdef-0123-456789abcdef"
}
],
"website": "<string>",
"industry": "<string>",
"description": "<string>",
"role": "project_manager"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}Body
application/json