curl --request PUT \
--url https://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "workspace new name",
"description": "workspace description"
}
'import requests
url = "https://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}"
payload = {
"name": "workspace new name",
"description": "workspace description"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'workspace new name', description: 'workspace description'})
};
fetch('https://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}', 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://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'workspace new name',
'description' => 'workspace description'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}"
payload := strings.NewReader("{\n \"name\": \"workspace new name\",\n \"description\": \"workspace description\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"workspace new name\",\n \"description\": \"workspace description\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"workspace new name\",\n \"description\": \"workspace description\"\n}"
response = http.request(request)
puts response.read_body{
"id": "8eefb5a9-59f7-43cc-bacb-f0b0e0d1b0ea",
"name": "workspace new name",
"createdBy": "1673d60f-a0ea-41f4-9420-c91dbc2864f5",
"organizationId": "d0d3c83f-29ed-4f2e-899d-1bfa00eb3cef",
"description": "workspace description",
"createdAt": null,
"defaultWorkspace": false
}Update Workspace
Updates the specified Workspace within an Organization.
A Workspace is a collaborative environment within an Organization that groups Projects together, facilitating team collaboration and resource management.
The hierarchical structure in Peaka is:
Organization (top-level) → Workspace → Project
Projects contain data catalogs and workflows that teams manage within a Workspace.
curl --request PUT \
--url https://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "workspace new name",
"description": "workspace description"
}
'import requests
url = "https://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}"
payload = {
"name": "workspace new name",
"description": "workspace description"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'workspace new name', description: 'workspace description'})
};
fetch('https://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}', 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://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'workspace new name',
'description' => 'workspace description'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}"
payload := strings.NewReader("{\n \"name\": \"workspace new name\",\n \"description\": \"workspace description\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"workspace new name\",\n \"description\": \"workspace description\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"workspace new name\",\n \"description\": \"workspace description\"\n}"
response = http.request(request)
puts response.read_body{
"id": "8eefb5a9-59f7-43cc-bacb-f0b0e0d1b0ea",
"name": "workspace new name",
"createdBy": "1673d60f-a0ea-41f4-9420-c91dbc2864f5",
"organizationId": "d0d3c83f-29ed-4f2e-899d-1bfa00eb3cef",
"description": "workspace description",
"createdAt": null,
"defaultWorkspace": false
}
Authorizations
Use the Authorization header with the value 'Bearer ' to authenticate. Partner API Keys have full access; Project API Keys are limited to their project scope. Learn more: https://docs.peaka.com/api-reference/authentication
Body
Update Workspace
Response
Successful operation
The unique identifier of the workspace
The name of the workspace
The unique identifier of the user who created the workspace
The unique identifier of the organization to which the workspace belongs
Descriptive text about the workspace
The date and time the workspace was created
Whether the workspace is the default workspace for the organization.
This is a backward compatibility field in order to create projects in the default workspace if the workspace is not specified.