Update Workspace
curl --request PUT \
--url https://api.opnform.com/open/workspaces/{workspaceId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My Marketing Team",
"icon": "🚀",
"settings": {}
}
'import requests
url = "https://api.opnform.com/open/workspaces/{workspaceId}"
payload = {
"name": "My Marketing Team",
"icon": "🚀",
"settings": {}
}
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: 'My Marketing Team', icon: '🚀', settings: {}})
};
fetch('https://api.opnform.com/open/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://api.opnform.com/open/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' => 'My Marketing Team',
'icon' => '🚀',
'settings' => [
]
]),
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://api.opnform.com/open/workspaces/{workspaceId}"
payload := strings.NewReader("{\n \"name\": \"My Marketing Team\",\n \"icon\": \"🚀\",\n \"settings\": {}\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://api.opnform.com/open/workspaces/{workspaceId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Marketing Team\",\n \"icon\": \"🚀\",\n \"settings\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opnform.com/open/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\": \"My Marketing Team\",\n \"icon\": \"🚀\",\n \"settings\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"name": "My Marketing Team",
"icon": "🚀",
"settings": {}
}Workspaces
Update Workspace
Update workspace name or icon. Requires workspaces-write.
PUT
/
open
/
workspaces
/
{workspaceId}
Update Workspace
curl --request PUT \
--url https://api.opnform.com/open/workspaces/{workspaceId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My Marketing Team",
"icon": "🚀",
"settings": {}
}
'import requests
url = "https://api.opnform.com/open/workspaces/{workspaceId}"
payload = {
"name": "My Marketing Team",
"icon": "🚀",
"settings": {}
}
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: 'My Marketing Team', icon: '🚀', settings: {}})
};
fetch('https://api.opnform.com/open/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://api.opnform.com/open/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' => 'My Marketing Team',
'icon' => '🚀',
'settings' => [
]
]),
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://api.opnform.com/open/workspaces/{workspaceId}"
payload := strings.NewReader("{\n \"name\": \"My Marketing Team\",\n \"icon\": \"🚀\",\n \"settings\": {}\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://api.opnform.com/open/workspaces/{workspaceId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Marketing Team\",\n \"icon\": \"🚀\",\n \"settings\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opnform.com/open/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\": \"My Marketing Team\",\n \"icon\": \"🚀\",\n \"settings\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"name": "My Marketing Team",
"icon": "🚀",
"settings": {}
}Update Workspace
Rename a workspace or change its icon.Authentication & Scope
Requires theworkspaces-write ability. The authenticated user must be an admin of the workspace.
Request
PUT /open/workspaces/{workspaceId} HTTP/1.1
Host: api.opnform.com
Content-Type: application/json
Authorization: Bearer <token>
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| workspaceId | number | Numeric identifier of the workspace. |
Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | New name of the workspace. |
| emoji | string | No | New emoji/icon (leave blank to clear). |
{
"name": "Marketing Team",
"emoji": "🚀"
}
Response
200 OK – Returns a confirmation plus the updated workspace object.
{
"message": "Workspace updated.",
"workspace": {
"id": 1,
"name": "Marketing Team",
"icon": "🚀",
"max_file_size": 25,
"is_readonly": false
}
}
403 Forbidden – Token lacks workspaces-write or user lacks permission.Authorizations
Personal Access Token
Path Parameters
Body
application/json
Was this page helpful?
⌘I