Create Workspace
curl --request POST \
--url https://api.opnform.com/open/workspaces/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"emoji": "<string>"
}
'import requests
url = "https://api.opnform.com/open/workspaces/create"
payload = {
"name": "<string>",
"emoji": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', emoji: '<string>'})
};
fetch('https://api.opnform.com/open/workspaces/create', 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/create",
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' => '<string>',
'emoji' => '<string>'
]),
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/create"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"emoji\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.opnform.com/open/workspaces/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"emoji\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opnform.com/open/workspaces/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"emoji\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"workspace_id": 123,
"workspace": {
"id": 1,
"name": "My Marketing Team",
"icon": "🚀",
"settings": {}
}
}Workspaces
Create Workspace
Requires workspaces-write.
POST
/
open
/
workspaces
/
create
Create Workspace
curl --request POST \
--url https://api.opnform.com/open/workspaces/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"emoji": "<string>"
}
'import requests
url = "https://api.opnform.com/open/workspaces/create"
payload = {
"name": "<string>",
"emoji": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', emoji: '<string>'})
};
fetch('https://api.opnform.com/open/workspaces/create', 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/create",
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' => '<string>',
'emoji' => '<string>'
]),
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/create"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"emoji\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.opnform.com/open/workspaces/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"emoji\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opnform.com/open/workspaces/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"emoji\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"workspace_id": 123,
"workspace": {
"id": 1,
"name": "My Marketing Team",
"icon": "🚀",
"settings": {}
}
}Create Workspace
Create a new workspace and automatically add the current user as an admin of that workspace.Authentication & Scope
Requires theworkspaces-write ability.
Request
POST /open/workspaces/create HTTP/1.1
Host: api.opnform.com
Content-Type: application/json
Authorization: Bearer <token>
Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Display name of the workspace. |
| emoji | string | No | Optional emoji/icon to represent it. |
{
"name": "Design Team",
"emoji": "🎨"
}
Response
200 OK – Returns the newly created workspace information.
{
"message": "Workspace created.",
"workspace_id": 7,
"workspace": {
"id": 7,
"name": "Design Team",
"icon": "🎨",
"settings": {},
"max_file_size": 25,
"is_readonly": false
}
}
403 Forbidden – Token lacks workspaces-write or user not allowed.Was this page helpful?
⌘I