Create an Organisation
curl --request POST \
--url https://{tenant}/admin/organisations \
--header 'Admin-Auth: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"cname": "jive.ly",
"cname_enabled": true,
"owner_name": "Jively"
}
'import requests
url = "https://{tenant}/admin/organisations"
payload = {
"cname": "jive.ly",
"cname_enabled": True,
"owner_name": "Jively"
}
headers = {
"Admin-Auth": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Admin-Auth': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({cname: 'jive.ly', cname_enabled: true, owner_name: 'Jively'})
};
fetch('https://{tenant}/admin/organisations', 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://{tenant}/admin/organisations",
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([
'cname' => 'jive.ly',
'cname_enabled' => true,
'owner_name' => 'Jively'
]),
CURLOPT_HTTPHEADER => [
"Admin-Auth: <api-key>",
"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://{tenant}/admin/organisations"
payload := strings.NewReader("{\n \"cname\": \"jive.ly\",\n \"cname_enabled\": true,\n \"owner_name\": \"Jively\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Admin-Auth", "<api-key>")
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://{tenant}/admin/organisations")
.header("Admin-Auth", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"cname\": \"jive.ly\",\n \"cname_enabled\": true,\n \"owner_name\": \"Jively\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}/admin/organisations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Admin-Auth"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cname\": \"jive.ly\",\n \"cname_enabled\": true,\n \"owner_name\": \"Jively\"\n}"
response = http.request(request)
puts response.read_body{
"Message": "Org created",
"Meta": "54b53d3aeba6db5c35000002",
"Status": "OK"
}{
"Message": "Request body malformed",
"Meta": null,
"Status": "Error"
}{
"Message": "Failed to read response body, body empty",
"Meta": null,
"Status": "Error"
}Organisations
Create an Organisation
Create an Organisation
POST
/
admin
/
organisations
Create an Organisation
curl --request POST \
--url https://{tenant}/admin/organisations \
--header 'Admin-Auth: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"cname": "jive.ly",
"cname_enabled": true,
"owner_name": "Jively"
}
'import requests
url = "https://{tenant}/admin/organisations"
payload = {
"cname": "jive.ly",
"cname_enabled": True,
"owner_name": "Jively"
}
headers = {
"Admin-Auth": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Admin-Auth': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({cname: 'jive.ly', cname_enabled: true, owner_name: 'Jively'})
};
fetch('https://{tenant}/admin/organisations', 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://{tenant}/admin/organisations",
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([
'cname' => 'jive.ly',
'cname_enabled' => true,
'owner_name' => 'Jively'
]),
CURLOPT_HTTPHEADER => [
"Admin-Auth: <api-key>",
"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://{tenant}/admin/organisations"
payload := strings.NewReader("{\n \"cname\": \"jive.ly\",\n \"cname_enabled\": true,\n \"owner_name\": \"Jively\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Admin-Auth", "<api-key>")
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://{tenant}/admin/organisations")
.header("Admin-Auth", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"cname\": \"jive.ly\",\n \"cname_enabled\": true,\n \"owner_name\": \"Jively\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}/admin/organisations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Admin-Auth"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cname\": \"jive.ly\",\n \"cname_enabled\": true,\n \"owner_name\": \"Jively\"\n}"
response = http.request(request)
puts response.read_body{
"Message": "Org created",
"Meta": "54b53d3aeba6db5c35000002",
"Status": "OK"
}{
"Message": "Request body malformed",
"Meta": null,
"Status": "Error"
}{
"Message": "Failed to read response body, body empty",
"Meta": null,
"Status": "Error"
}Authorizations
Api key
Body
application/json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I