curl --request POST \
--url https://apimgmt.cometchat.io/tenants \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Example User",
"email": "my-email@example.com",
"password": "somePassword#!",
"contactNumber": "1234567890",
"role": "engineer",
"appName": "Create App",
"appRegion": "us"
}
'import requests
url = "https://apimgmt.cometchat.io/tenants"
payload = {
"name": "Example User",
"email": "my-email@example.com",
"password": "somePassword#!",
"contactNumber": "1234567890",
"role": "engineer",
"appName": "Create App",
"appRegion": "us"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Example User',
email: 'my-email@example.com',
password: 'somePassword#!',
contactNumber: '1234567890',
role: 'engineer',
appName: 'Create App',
appRegion: 'us'
})
};
fetch('https://apimgmt.cometchat.io/tenants', 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://apimgmt.cometchat.io/tenants",
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' => 'Example User',
'email' => 'my-email@example.com',
'password' => 'somePassword#!',
'contactNumber' => '1234567890',
'role' => 'engineer',
'appName' => 'Create App',
'appRegion' => 'us'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://apimgmt.cometchat.io/tenants"
payload := strings.NewReader("{\n \"name\": \"Example User\",\n \"email\": \"my-email@example.com\",\n \"password\": \"somePassword#!\",\n \"contactNumber\": \"1234567890\",\n \"role\": \"engineer\",\n \"appName\": \"Create App\",\n \"appRegion\": \"us\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://apimgmt.cometchat.io/tenants")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Example User\",\n \"email\": \"my-email@example.com\",\n \"password\": \"somePassword#!\",\n \"contactNumber\": \"1234567890\",\n \"role\": \"engineer\",\n \"appName\": \"Create App\",\n \"appRegion\": \"us\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apimgmt.cometchat.io/tenants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Example User\",\n \"email\": \"my-email@example.com\",\n \"password\": \"somePassword#!\",\n \"contactNumber\": \"1234567890\",\n \"role\": \"engineer\",\n \"appName\": \"Create App\",\n \"appRegion\": \"us\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"name": "Sachin Bahukhandi",
"email": "sachin.bahukhandi+113@cometchat.com",
"createdAt": 1715947984,
"contactNumber": "8936985734",
"app": {
"name": "Create APP",
"appId": "2531446b588709f6",
"region": "us",
"authKey": "05753974edb58b7ce7c1ab10eb3eb3033e3dd1e9",
"apiKey": "5db447476272190a2cda793e10e59f58bcc17317",
"createdAt": 1715947984,
"plan": "Build"
}
}
}Add Tenant
Add Tenant
curl --request POST \
--url https://apimgmt.cometchat.io/tenants \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Example User",
"email": "my-email@example.com",
"password": "somePassword#!",
"contactNumber": "1234567890",
"role": "engineer",
"appName": "Create App",
"appRegion": "us"
}
'import requests
url = "https://apimgmt.cometchat.io/tenants"
payload = {
"name": "Example User",
"email": "my-email@example.com",
"password": "somePassword#!",
"contactNumber": "1234567890",
"role": "engineer",
"appName": "Create App",
"appRegion": "us"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Example User',
email: 'my-email@example.com',
password: 'somePassword#!',
contactNumber: '1234567890',
role: 'engineer',
appName: 'Create App',
appRegion: 'us'
})
};
fetch('https://apimgmt.cometchat.io/tenants', 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://apimgmt.cometchat.io/tenants",
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' => 'Example User',
'email' => 'my-email@example.com',
'password' => 'somePassword#!',
'contactNumber' => '1234567890',
'role' => 'engineer',
'appName' => 'Create App',
'appRegion' => 'us'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://apimgmt.cometchat.io/tenants"
payload := strings.NewReader("{\n \"name\": \"Example User\",\n \"email\": \"my-email@example.com\",\n \"password\": \"somePassword#!\",\n \"contactNumber\": \"1234567890\",\n \"role\": \"engineer\",\n \"appName\": \"Create App\",\n \"appRegion\": \"us\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://apimgmt.cometchat.io/tenants")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Example User\",\n \"email\": \"my-email@example.com\",\n \"password\": \"somePassword#!\",\n \"contactNumber\": \"1234567890\",\n \"role\": \"engineer\",\n \"appName\": \"Create App\",\n \"appRegion\": \"us\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apimgmt.cometchat.io/tenants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Example User\",\n \"email\": \"my-email@example.com\",\n \"password\": \"somePassword#!\",\n \"contactNumber\": \"1234567890\",\n \"role\": \"engineer\",\n \"appName\": \"Create App\",\n \"appRegion\": \"us\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"name": "Sachin Bahukhandi",
"email": "sachin.bahukhandi+113@cometchat.com",
"createdAt": 1715947984,
"contactNumber": "8936985734",
"app": {
"name": "Create APP",
"appId": "2531446b588709f6",
"region": "us",
"authKey": "05753974edb58b7ce7c1ab10eb3eb3033e3dd1e9",
"apiKey": "5db447476272190a2cda793e10e59f58bcc17317",
"createdAt": 1715947984,
"plan": "Build"
}
}
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
Specifies the name of the customer.
Specifies the email address of the customer, this will be the account identifier
For the purpose of accessing the CometChat account, a password in plain text format is required.
This defines the name of the application within CometChat.
This refers to the selected region for the app. Users should select a region that is geographically close to their customer base for optimal performance.
us, eu, in This represents the user's contact number information.
This indicates the role associated with the created account, such as developer, product manager, business owner, and so on.
This pertains to the specific domain that the app is associated with.
This refers to a single-string representation of the primary technology or framework utilized by the customer, examples of which may include 'ReactJS', 'Angular', 'Vue', 'Android', 'iOS', and so on.
Response
Map Settings
Show child attributes
Show child attributes