Rename a project and/or update its white-label branding
curl --request PATCH \
--url https://test-api.segmnt.cloud/v1/projects/{projectId} \
--header 'Content-Type: application/json' \
--cookie segmnt_session= \
--data '
{
"name": "Client A courses",
"branding": {
"hideLogo": true,
"primaryColor": "<string>",
"logoUrl": "<string>"
}
}
'import requests
url = "https://test-api.segmnt.cloud/v1/projects/{projectId}"
payload = {
"name": "Client A courses",
"branding": {
"hideLogo": True,
"primaryColor": "<string>",
"logoUrl": "<string>"
}
}
headers = {
"cookie": "segmnt_session=",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {cookie: 'segmnt_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Client A courses',
branding: {hideLogo: true, primaryColor: '<string>', logoUrl: '<string>'}
})
};
fetch('https://test-api.segmnt.cloud/v1/projects/{projectId}', 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://test-api.segmnt.cloud/v1/projects/{projectId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Client A courses',
'branding' => [
'hideLogo' => true,
'primaryColor' => '<string>',
'logoUrl' => '<string>'
]
]),
CURLOPT_COOKIE => "segmnt_session=",
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://test-api.segmnt.cloud/v1/projects/{projectId}"
payload := strings.NewReader("{\n \"name\": \"Client A courses\",\n \"branding\": {\n \"hideLogo\": true,\n \"primaryColor\": \"<string>\",\n \"logoUrl\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("cookie", "segmnt_session=")
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.patch("https://test-api.segmnt.cloud/v1/projects/{projectId}")
.header("cookie", "segmnt_session=")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Client A courses\",\n \"branding\": {\n \"hideLogo\": true,\n \"primaryColor\": \"<string>\",\n \"logoUrl\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://test-api.segmnt.cloud/v1/projects/{projectId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["cookie"] = 'segmnt_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Client A courses\",\n \"branding\": {\n \"hideLogo\": true,\n \"primaryColor\": \"<string>\",\n \"logoUrl\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "prj_8fK2mQ",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"whiteLabel": true,
"branding": {
"hideLogo": false,
"primaryColor": "#0B5D42",
"logoUrl": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "plan_limit_reached",
"detail": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "plan_limit_reached",
"detail": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "plan_limit_reached",
"detail": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "plan_limit_reached",
"detail": "<string>"
}Projects
Rename a project and/or update its white-label branding
PATCH
/
v1
/
projects
/
{projectId}
Rename a project and/or update its white-label branding
curl --request PATCH \
--url https://test-api.segmnt.cloud/v1/projects/{projectId} \
--header 'Content-Type: application/json' \
--cookie segmnt_session= \
--data '
{
"name": "Client A courses",
"branding": {
"hideLogo": true,
"primaryColor": "<string>",
"logoUrl": "<string>"
}
}
'import requests
url = "https://test-api.segmnt.cloud/v1/projects/{projectId}"
payload = {
"name": "Client A courses",
"branding": {
"hideLogo": True,
"primaryColor": "<string>",
"logoUrl": "<string>"
}
}
headers = {
"cookie": "segmnt_session=",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {cookie: 'segmnt_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Client A courses',
branding: {hideLogo: true, primaryColor: '<string>', logoUrl: '<string>'}
})
};
fetch('https://test-api.segmnt.cloud/v1/projects/{projectId}', 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://test-api.segmnt.cloud/v1/projects/{projectId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Client A courses',
'branding' => [
'hideLogo' => true,
'primaryColor' => '<string>',
'logoUrl' => '<string>'
]
]),
CURLOPT_COOKIE => "segmnt_session=",
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://test-api.segmnt.cloud/v1/projects/{projectId}"
payload := strings.NewReader("{\n \"name\": \"Client A courses\",\n \"branding\": {\n \"hideLogo\": true,\n \"primaryColor\": \"<string>\",\n \"logoUrl\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("cookie", "segmnt_session=")
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.patch("https://test-api.segmnt.cloud/v1/projects/{projectId}")
.header("cookie", "segmnt_session=")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Client A courses\",\n \"branding\": {\n \"hideLogo\": true,\n \"primaryColor\": \"<string>\",\n \"logoUrl\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://test-api.segmnt.cloud/v1/projects/{projectId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["cookie"] = 'segmnt_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Client A courses\",\n \"branding\": {\n \"hideLogo\": true,\n \"primaryColor\": \"<string>\",\n \"logoUrl\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "prj_8fK2mQ",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"whiteLabel": true,
"branding": {
"hideLogo": false,
"primaryColor": "#0B5D42",
"logoUrl": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "plan_limit_reached",
"detail": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "plan_limit_reached",
"detail": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "plan_limit_reached",
"detail": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "plan_limit_reached",
"detail": "<string>"
}Authorizations
Dashboard session cookie, set after SSO sign-in.
Path Parameters
Pattern:
^prj_[A-Za-z0-9]+$Body
application/json
Response
Project updated.
Example:
"prj_8fK2mQ"
True when the account's plan may hide our logo and brand the player (Pro and Agency; Free and Starter always keep our logo and brand colour).
White-label player branding. Pro and Agency only (Free and Starter always keep our logo and brand colour).
Show child attributes
Show child attributes