Update an existing workspace
curl --request POST \
--url https://your-instance.example.com/api/workspaces.update \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"name": "<string>",
"website": "<string>",
"timezone": "<string>",
"currency": "<string>",
"logo_url": "<string>",
"settings": {
"timescore_reference": 2,
"bounce_threshold": 2,
"custom_dimensions": {},
"filters": [
{}
],
"integrations": [
{}
],
"geo_enabled": true,
"geo_store_city": true,
"geo_store_region": true,
"geo_coordinates_precision": 1,
"annotations": [
{
"id": "<string>",
"date": "<string>",
"time": "<string>",
"timezone": "<string>",
"title": "<string>",
"description": "<string>",
"color": "<string>"
}
],
"allowed_domains": [
"<string>"
]
}
}
'import requests
url = "https://your-instance.example.com/api/workspaces.update"
payload = {
"id": "<string>",
"name": "<string>",
"website": "<string>",
"timezone": "<string>",
"currency": "<string>",
"logo_url": "<string>",
"settings": {
"timescore_reference": 2,
"bounce_threshold": 2,
"custom_dimensions": {},
"filters": [{}],
"integrations": [{}],
"geo_enabled": True,
"geo_store_city": True,
"geo_store_region": True,
"geo_coordinates_precision": 1,
"annotations": [
{
"id": "<string>",
"date": "<string>",
"time": "<string>",
"timezone": "<string>",
"title": "<string>",
"description": "<string>",
"color": "<string>"
}
],
"allowed_domains": ["<string>"]
}
}
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({
id: '<string>',
name: '<string>',
website: '<string>',
timezone: '<string>',
currency: '<string>',
logo_url: '<string>',
settings: {
timescore_reference: 2,
bounce_threshold: 2,
custom_dimensions: {},
filters: [{}],
integrations: [{}],
geo_enabled: true,
geo_store_city: true,
geo_store_region: true,
geo_coordinates_precision: 1,
annotations: [
{
id: '<string>',
date: '<string>',
time: '<string>',
timezone: '<string>',
title: '<string>',
description: '<string>',
color: '<string>'
}
],
allowed_domains: ['<string>']
}
})
};
fetch('https://your-instance.example.com/api/workspaces.update', 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://your-instance.example.com/api/workspaces.update",
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([
'id' => '<string>',
'name' => '<string>',
'website' => '<string>',
'timezone' => '<string>',
'currency' => '<string>',
'logo_url' => '<string>',
'settings' => [
'timescore_reference' => 2,
'bounce_threshold' => 2,
'custom_dimensions' => [
],
'filters' => [
[
]
],
'integrations' => [
[
]
],
'geo_enabled' => true,
'geo_store_city' => true,
'geo_store_region' => true,
'geo_coordinates_precision' => 1,
'annotations' => [
[
'id' => '<string>',
'date' => '<string>',
'time' => '<string>',
'timezone' => '<string>',
'title' => '<string>',
'description' => '<string>',
'color' => '<string>'
]
],
'allowed_domains' => [
'<string>'
]
]
]),
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://your-instance.example.com/api/workspaces.update"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"website\": \"<string>\",\n \"timezone\": \"<string>\",\n \"currency\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"settings\": {\n \"timescore_reference\": 2,\n \"bounce_threshold\": 2,\n \"custom_dimensions\": {},\n \"filters\": [\n {}\n ],\n \"integrations\": [\n {}\n ],\n \"geo_enabled\": true,\n \"geo_store_city\": true,\n \"geo_store_region\": true,\n \"geo_coordinates_precision\": 1,\n \"annotations\": [\n {\n \"id\": \"<string>\",\n \"date\": \"<string>\",\n \"time\": \"<string>\",\n \"timezone\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": \"<string>\"\n }\n ],\n \"allowed_domains\": [\n \"<string>\"\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://your-instance.example.com/api/workspaces.update")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"website\": \"<string>\",\n \"timezone\": \"<string>\",\n \"currency\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"settings\": {\n \"timescore_reference\": 2,\n \"bounce_threshold\": 2,\n \"custom_dimensions\": {},\n \"filters\": [\n {}\n ],\n \"integrations\": [\n {}\n ],\n \"geo_enabled\": true,\n \"geo_store_city\": true,\n \"geo_store_region\": true,\n \"geo_coordinates_precision\": 1,\n \"annotations\": [\n {\n \"id\": \"<string>\",\n \"date\": \"<string>\",\n \"time\": \"<string>\",\n \"timezone\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": \"<string>\"\n }\n ],\n \"allowed_domains\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/workspaces.update")
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 \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"website\": \"<string>\",\n \"timezone\": \"<string>\",\n \"currency\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"settings\": {\n \"timescore_reference\": 2,\n \"bounce_threshold\": 2,\n \"custom_dimensions\": {},\n \"filters\": [\n {}\n ],\n \"integrations\": [\n {}\n ],\n \"geo_enabled\": true,\n \"geo_store_city\": true,\n \"geo_store_region\": true,\n \"geo_coordinates_precision\": 1,\n \"annotations\": [\n {\n \"id\": \"<string>\",\n \"date\": \"<string>\",\n \"time\": \"<string>\",\n \"timezone\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": \"<string>\"\n }\n ],\n \"allowed_domains\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{}Workspaces
Update an existing workspace
POST
/
api
/
workspaces.update
Update an existing workspace
curl --request POST \
--url https://your-instance.example.com/api/workspaces.update \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"name": "<string>",
"website": "<string>",
"timezone": "<string>",
"currency": "<string>",
"logo_url": "<string>",
"settings": {
"timescore_reference": 2,
"bounce_threshold": 2,
"custom_dimensions": {},
"filters": [
{}
],
"integrations": [
{}
],
"geo_enabled": true,
"geo_store_city": true,
"geo_store_region": true,
"geo_coordinates_precision": 1,
"annotations": [
{
"id": "<string>",
"date": "<string>",
"time": "<string>",
"timezone": "<string>",
"title": "<string>",
"description": "<string>",
"color": "<string>"
}
],
"allowed_domains": [
"<string>"
]
}
}
'import requests
url = "https://your-instance.example.com/api/workspaces.update"
payload = {
"id": "<string>",
"name": "<string>",
"website": "<string>",
"timezone": "<string>",
"currency": "<string>",
"logo_url": "<string>",
"settings": {
"timescore_reference": 2,
"bounce_threshold": 2,
"custom_dimensions": {},
"filters": [{}],
"integrations": [{}],
"geo_enabled": True,
"geo_store_city": True,
"geo_store_region": True,
"geo_coordinates_precision": 1,
"annotations": [
{
"id": "<string>",
"date": "<string>",
"time": "<string>",
"timezone": "<string>",
"title": "<string>",
"description": "<string>",
"color": "<string>"
}
],
"allowed_domains": ["<string>"]
}
}
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({
id: '<string>',
name: '<string>',
website: '<string>',
timezone: '<string>',
currency: '<string>',
logo_url: '<string>',
settings: {
timescore_reference: 2,
bounce_threshold: 2,
custom_dimensions: {},
filters: [{}],
integrations: [{}],
geo_enabled: true,
geo_store_city: true,
geo_store_region: true,
geo_coordinates_precision: 1,
annotations: [
{
id: '<string>',
date: '<string>',
time: '<string>',
timezone: '<string>',
title: '<string>',
description: '<string>',
color: '<string>'
}
],
allowed_domains: ['<string>']
}
})
};
fetch('https://your-instance.example.com/api/workspaces.update', 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://your-instance.example.com/api/workspaces.update",
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([
'id' => '<string>',
'name' => '<string>',
'website' => '<string>',
'timezone' => '<string>',
'currency' => '<string>',
'logo_url' => '<string>',
'settings' => [
'timescore_reference' => 2,
'bounce_threshold' => 2,
'custom_dimensions' => [
],
'filters' => [
[
]
],
'integrations' => [
[
]
],
'geo_enabled' => true,
'geo_store_city' => true,
'geo_store_region' => true,
'geo_coordinates_precision' => 1,
'annotations' => [
[
'id' => '<string>',
'date' => '<string>',
'time' => '<string>',
'timezone' => '<string>',
'title' => '<string>',
'description' => '<string>',
'color' => '<string>'
]
],
'allowed_domains' => [
'<string>'
]
]
]),
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://your-instance.example.com/api/workspaces.update"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"website\": \"<string>\",\n \"timezone\": \"<string>\",\n \"currency\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"settings\": {\n \"timescore_reference\": 2,\n \"bounce_threshold\": 2,\n \"custom_dimensions\": {},\n \"filters\": [\n {}\n ],\n \"integrations\": [\n {}\n ],\n \"geo_enabled\": true,\n \"geo_store_city\": true,\n \"geo_store_region\": true,\n \"geo_coordinates_precision\": 1,\n \"annotations\": [\n {\n \"id\": \"<string>\",\n \"date\": \"<string>\",\n \"time\": \"<string>\",\n \"timezone\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": \"<string>\"\n }\n ],\n \"allowed_domains\": [\n \"<string>\"\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://your-instance.example.com/api/workspaces.update")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"website\": \"<string>\",\n \"timezone\": \"<string>\",\n \"currency\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"settings\": {\n \"timescore_reference\": 2,\n \"bounce_threshold\": 2,\n \"custom_dimensions\": {},\n \"filters\": [\n {}\n ],\n \"integrations\": [\n {}\n ],\n \"geo_enabled\": true,\n \"geo_store_city\": true,\n \"geo_store_region\": true,\n \"geo_coordinates_precision\": 1,\n \"annotations\": [\n {\n \"id\": \"<string>\",\n \"date\": \"<string>\",\n \"time\": \"<string>\",\n \"timezone\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": \"<string>\"\n }\n ],\n \"allowed_domains\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/workspaces.update")
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 \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"website\": \"<string>\",\n \"timezone\": \"<string>\",\n \"currency\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"settings\": {\n \"timescore_reference\": 2,\n \"bounce_threshold\": 2,\n \"custom_dimensions\": {},\n \"filters\": [\n {}\n ],\n \"integrations\": [\n {}\n ],\n \"geo_enabled\": true,\n \"geo_store_city\": true,\n \"geo_store_region\": true,\n \"geo_coordinates_precision\": 1,\n \"annotations\": [\n {\n \"id\": \"<string>\",\n \"date\": \"<string>\",\n \"time\": \"<string>\",\n \"timezone\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": \"<string>\"\n }\n ],\n \"allowed_domains\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{}⌘I