Create Workspace
curl --request POST \
--url https://api.sonderplan.com/v2/workspace \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Sydney Studio",
"id": 9458,
"description": "Sydney Office, Level 2",
"resources": [
{
"name": "Edit Suite 1",
"description": "Sydney Office, Level 2",
"type_id": 1,
"type_person_id": 0,
"parent_id": 2908,
"parent_name": "Cameras",
"icon": [
{
"name": "Avid_Icon",
"size": 174285,
"alias": "7e73ab25155974c230d09494548201b9f5056ef",
"extension": "png",
"mime_type": "image/png"
}
]
}
],
"access": [
{
"id": 4,
"acl": "RW",
"name": "Administrators",
"type": "group"
}
],
"feed": "<string>",
"working_week": 3,
"country_region": "AU-NSW",
"show_public_holiday": true
}
'import requests
url = "https://api.sonderplan.com/v2/workspace"
payload = {
"name": "Sydney Studio",
"id": 9458,
"description": "Sydney Office, Level 2",
"resources": [
{
"name": "Edit Suite 1",
"description": "Sydney Office, Level 2",
"type_id": 1,
"type_person_id": 0,
"parent_id": 2908,
"parent_name": "Cameras",
"icon": [
{
"name": "Avid_Icon",
"size": 174285,
"alias": "7e73ab25155974c230d09494548201b9f5056ef",
"extension": "png",
"mime_type": "image/png"
}
]
}
],
"access": [
{
"id": 4,
"acl": "RW",
"name": "Administrators",
"type": "group"
}
],
"feed": "<string>",
"working_week": 3,
"country_region": "AU-NSW",
"show_public_holiday": True
}
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: 'Sydney Studio',
id: 9458,
description: 'Sydney Office, Level 2',
resources: [
{
name: 'Edit Suite 1',
description: 'Sydney Office, Level 2',
type_id: 1,
type_person_id: 0,
parent_id: 2908,
parent_name: 'Cameras',
icon: [
{
name: 'Avid_Icon',
size: 174285,
alias: '7e73ab25155974c230d09494548201b9f5056ef',
extension: 'png',
mime_type: 'image/png'
}
]
}
],
access: [{id: 4, acl: 'RW', name: 'Administrators', type: 'group'}],
feed: '<string>',
working_week: 3,
country_region: 'AU-NSW',
show_public_holiday: true
})
};
fetch('https://api.sonderplan.com/v2/workspace', 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.sonderplan.com/v2/workspace",
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' => 'Sydney Studio',
'id' => 9458,
'description' => 'Sydney Office, Level 2',
'resources' => [
[
'name' => 'Edit Suite 1',
'description' => 'Sydney Office, Level 2',
'type_id' => 1,
'type_person_id' => 0,
'parent_id' => 2908,
'parent_name' => 'Cameras',
'icon' => [
[
'name' => 'Avid_Icon',
'size' => 174285,
'alias' => '7e73ab25155974c230d09494548201b9f5056ef',
'extension' => 'png',
'mime_type' => 'image/png'
]
]
]
],
'access' => [
[
'id' => 4,
'acl' => 'RW',
'name' => 'Administrators',
'type' => 'group'
]
],
'feed' => '<string>',
'working_week' => 3,
'country_region' => 'AU-NSW',
'show_public_holiday' => true
]),
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.sonderplan.com/v2/workspace"
payload := strings.NewReader("{\n \"name\": \"Sydney Studio\",\n \"id\": 9458,\n \"description\": \"Sydney Office, Level 2\",\n \"resources\": [\n {\n \"name\": \"Edit Suite 1\",\n \"description\": \"Sydney Office, Level 2\",\n \"type_id\": 1,\n \"type_person_id\": 0,\n \"parent_id\": 2908,\n \"parent_name\": \"Cameras\",\n \"icon\": [\n {\n \"name\": \"Avid_Icon\",\n \"size\": 174285,\n \"alias\": \"7e73ab25155974c230d09494548201b9f5056ef\",\n \"extension\": \"png\",\n \"mime_type\": \"image/png\"\n }\n ]\n }\n ],\n \"access\": [\n {\n \"id\": 4,\n \"acl\": \"RW\",\n \"name\": \"Administrators\",\n \"type\": \"group\"\n }\n ],\n \"feed\": \"<string>\",\n \"working_week\": 3,\n \"country_region\": \"AU-NSW\",\n \"show_public_holiday\": true\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.sonderplan.com/v2/workspace")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Sydney Studio\",\n \"id\": 9458,\n \"description\": \"Sydney Office, Level 2\",\n \"resources\": [\n {\n \"name\": \"Edit Suite 1\",\n \"description\": \"Sydney Office, Level 2\",\n \"type_id\": 1,\n \"type_person_id\": 0,\n \"parent_id\": 2908,\n \"parent_name\": \"Cameras\",\n \"icon\": [\n {\n \"name\": \"Avid_Icon\",\n \"size\": 174285,\n \"alias\": \"7e73ab25155974c230d09494548201b9f5056ef\",\n \"extension\": \"png\",\n \"mime_type\": \"image/png\"\n }\n ]\n }\n ],\n \"access\": [\n {\n \"id\": 4,\n \"acl\": \"RW\",\n \"name\": \"Administrators\",\n \"type\": \"group\"\n }\n ],\n \"feed\": \"<string>\",\n \"working_week\": 3,\n \"country_region\": \"AU-NSW\",\n \"show_public_holiday\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sonderplan.com/v2/workspace")
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\": \"Sydney Studio\",\n \"id\": 9458,\n \"description\": \"Sydney Office, Level 2\",\n \"resources\": [\n {\n \"name\": \"Edit Suite 1\",\n \"description\": \"Sydney Office, Level 2\",\n \"type_id\": 1,\n \"type_person_id\": 0,\n \"parent_id\": 2908,\n \"parent_name\": \"Cameras\",\n \"icon\": [\n {\n \"name\": \"Avid_Icon\",\n \"size\": 174285,\n \"alias\": \"7e73ab25155974c230d09494548201b9f5056ef\",\n \"extension\": \"png\",\n \"mime_type\": \"image/png\"\n }\n ]\n }\n ],\n \"access\": [\n {\n \"id\": 4,\n \"acl\": \"RW\",\n \"name\": \"Administrators\",\n \"type\": \"group\"\n }\n ],\n \"feed\": \"<string>\",\n \"working_week\": 3,\n \"country_region\": \"AU-NSW\",\n \"show_public_holiday\": true\n}"
response = http.request(request)
puts response.read_body{
"success": {
"id": 1
}
}{
"error": {
"code": "404",
"message": "Requested resource was not found"
}
}Workspace
Create Workspace
WRITE access to the ADMIN module is required to access this endpointThe
scheduleCreated webhook will be fired when this endpoint has run successfullyPOST
/
v2
/
workspace
Create Workspace
curl --request POST \
--url https://api.sonderplan.com/v2/workspace \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Sydney Studio",
"id": 9458,
"description": "Sydney Office, Level 2",
"resources": [
{
"name": "Edit Suite 1",
"description": "Sydney Office, Level 2",
"type_id": 1,
"type_person_id": 0,
"parent_id": 2908,
"parent_name": "Cameras",
"icon": [
{
"name": "Avid_Icon",
"size": 174285,
"alias": "7e73ab25155974c230d09494548201b9f5056ef",
"extension": "png",
"mime_type": "image/png"
}
]
}
],
"access": [
{
"id": 4,
"acl": "RW",
"name": "Administrators",
"type": "group"
}
],
"feed": "<string>",
"working_week": 3,
"country_region": "AU-NSW",
"show_public_holiday": true
}
'import requests
url = "https://api.sonderplan.com/v2/workspace"
payload = {
"name": "Sydney Studio",
"id": 9458,
"description": "Sydney Office, Level 2",
"resources": [
{
"name": "Edit Suite 1",
"description": "Sydney Office, Level 2",
"type_id": 1,
"type_person_id": 0,
"parent_id": 2908,
"parent_name": "Cameras",
"icon": [
{
"name": "Avid_Icon",
"size": 174285,
"alias": "7e73ab25155974c230d09494548201b9f5056ef",
"extension": "png",
"mime_type": "image/png"
}
]
}
],
"access": [
{
"id": 4,
"acl": "RW",
"name": "Administrators",
"type": "group"
}
],
"feed": "<string>",
"working_week": 3,
"country_region": "AU-NSW",
"show_public_holiday": True
}
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: 'Sydney Studio',
id: 9458,
description: 'Sydney Office, Level 2',
resources: [
{
name: 'Edit Suite 1',
description: 'Sydney Office, Level 2',
type_id: 1,
type_person_id: 0,
parent_id: 2908,
parent_name: 'Cameras',
icon: [
{
name: 'Avid_Icon',
size: 174285,
alias: '7e73ab25155974c230d09494548201b9f5056ef',
extension: 'png',
mime_type: 'image/png'
}
]
}
],
access: [{id: 4, acl: 'RW', name: 'Administrators', type: 'group'}],
feed: '<string>',
working_week: 3,
country_region: 'AU-NSW',
show_public_holiday: true
})
};
fetch('https://api.sonderplan.com/v2/workspace', 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.sonderplan.com/v2/workspace",
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' => 'Sydney Studio',
'id' => 9458,
'description' => 'Sydney Office, Level 2',
'resources' => [
[
'name' => 'Edit Suite 1',
'description' => 'Sydney Office, Level 2',
'type_id' => 1,
'type_person_id' => 0,
'parent_id' => 2908,
'parent_name' => 'Cameras',
'icon' => [
[
'name' => 'Avid_Icon',
'size' => 174285,
'alias' => '7e73ab25155974c230d09494548201b9f5056ef',
'extension' => 'png',
'mime_type' => 'image/png'
]
]
]
],
'access' => [
[
'id' => 4,
'acl' => 'RW',
'name' => 'Administrators',
'type' => 'group'
]
],
'feed' => '<string>',
'working_week' => 3,
'country_region' => 'AU-NSW',
'show_public_holiday' => true
]),
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.sonderplan.com/v2/workspace"
payload := strings.NewReader("{\n \"name\": \"Sydney Studio\",\n \"id\": 9458,\n \"description\": \"Sydney Office, Level 2\",\n \"resources\": [\n {\n \"name\": \"Edit Suite 1\",\n \"description\": \"Sydney Office, Level 2\",\n \"type_id\": 1,\n \"type_person_id\": 0,\n \"parent_id\": 2908,\n \"parent_name\": \"Cameras\",\n \"icon\": [\n {\n \"name\": \"Avid_Icon\",\n \"size\": 174285,\n \"alias\": \"7e73ab25155974c230d09494548201b9f5056ef\",\n \"extension\": \"png\",\n \"mime_type\": \"image/png\"\n }\n ]\n }\n ],\n \"access\": [\n {\n \"id\": 4,\n \"acl\": \"RW\",\n \"name\": \"Administrators\",\n \"type\": \"group\"\n }\n ],\n \"feed\": \"<string>\",\n \"working_week\": 3,\n \"country_region\": \"AU-NSW\",\n \"show_public_holiday\": true\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.sonderplan.com/v2/workspace")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Sydney Studio\",\n \"id\": 9458,\n \"description\": \"Sydney Office, Level 2\",\n \"resources\": [\n {\n \"name\": \"Edit Suite 1\",\n \"description\": \"Sydney Office, Level 2\",\n \"type_id\": 1,\n \"type_person_id\": 0,\n \"parent_id\": 2908,\n \"parent_name\": \"Cameras\",\n \"icon\": [\n {\n \"name\": \"Avid_Icon\",\n \"size\": 174285,\n \"alias\": \"7e73ab25155974c230d09494548201b9f5056ef\",\n \"extension\": \"png\",\n \"mime_type\": \"image/png\"\n }\n ]\n }\n ],\n \"access\": [\n {\n \"id\": 4,\n \"acl\": \"RW\",\n \"name\": \"Administrators\",\n \"type\": \"group\"\n }\n ],\n \"feed\": \"<string>\",\n \"working_week\": 3,\n \"country_region\": \"AU-NSW\",\n \"show_public_holiday\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sonderplan.com/v2/workspace")
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\": \"Sydney Studio\",\n \"id\": 9458,\n \"description\": \"Sydney Office, Level 2\",\n \"resources\": [\n {\n \"name\": \"Edit Suite 1\",\n \"description\": \"Sydney Office, Level 2\",\n \"type_id\": 1,\n \"type_person_id\": 0,\n \"parent_id\": 2908,\n \"parent_name\": \"Cameras\",\n \"icon\": [\n {\n \"name\": \"Avid_Icon\",\n \"size\": 174285,\n \"alias\": \"7e73ab25155974c230d09494548201b9f5056ef\",\n \"extension\": \"png\",\n \"mime_type\": \"image/png\"\n }\n ]\n }\n ],\n \"access\": [\n {\n \"id\": 4,\n \"acl\": \"RW\",\n \"name\": \"Administrators\",\n \"type\": \"group\"\n }\n ],\n \"feed\": \"<string>\",\n \"working_week\": 3,\n \"country_region\": \"AU-NSW\",\n \"show_public_holiday\": true\n}"
response = http.request(request)
puts response.read_body{
"success": {
"id": 1
}
}{
"error": {
"code": "404",
"message": "Requested resource was not found"
}
}Authorizations
Body
application/json
Workspace object that needs to be added
Workspace model