Create Instance User Endpoint
curl --request POST \
--url https://ccnnnnnn.cyrisma.com/app/partner/instances/users/create \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'instance_id=<string>' \
--data 'username=<string>' \
--data 'first_name=<string>' \
--data 'last_name=<string>'import requests
url = "https://ccnnnnnn.cyrisma.com/app/partner/instances/users/create"
payload = {
"instance_id": "<string>",
"username": "<string>",
"first_name": "<string>",
"last_name": "<string>"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
instance_id: '<string>',
username: '<string>',
first_name: '<string>',
last_name: '<string>'
})
};
fetch('https://ccnnnnnn.cyrisma.com/app/partner/instances/users/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://ccnnnnnn.cyrisma.com/app/partner/instances/users/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 => "instance_id=%3Cstring%3E&username=%3Cstring%3E&first_name=%3Cstring%3E&last_name=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://ccnnnnnn.cyrisma.com/app/partner/instances/users/create"
payload := strings.NewReader("instance_id=%3Cstring%3E&username=%3Cstring%3E&first_name=%3Cstring%3E&last_name=%3Cstring%3E")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://ccnnnnnn.cyrisma.com/app/partner/instances/users/create")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("instance_id=%3Cstring%3E&username=%3Cstring%3E&first_name=%3Cstring%3E&last_name=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("https://ccnnnnnn.cyrisma.com/app/partner/instances/users/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "instance_id=%3Cstring%3E&username=%3Cstring%3E&first_name=%3Cstring%3E&last_name=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"username": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"enabled": "<string>",
"instance_id": "<string>"
}{
"error": "<string>",
"error_description": "<string>"
}{
"error": "<string>",
"error_description": "<string>"
}{
"error": "<string>",
"error_description": "<string>"
}Instances
Create Instance User Endpoint
This endpoint will create a new user under a specific subordinate instance within your partner account.
Required headers:
Authorization: access_token {token}
POST
/
partner
/
instances
/
users
/
create
Create Instance User Endpoint
curl --request POST \
--url https://ccnnnnnn.cyrisma.com/app/partner/instances/users/create \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'instance_id=<string>' \
--data 'username=<string>' \
--data 'first_name=<string>' \
--data 'last_name=<string>'import requests
url = "https://ccnnnnnn.cyrisma.com/app/partner/instances/users/create"
payload = {
"instance_id": "<string>",
"username": "<string>",
"first_name": "<string>",
"last_name": "<string>"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
instance_id: '<string>',
username: '<string>',
first_name: '<string>',
last_name: '<string>'
})
};
fetch('https://ccnnnnnn.cyrisma.com/app/partner/instances/users/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://ccnnnnnn.cyrisma.com/app/partner/instances/users/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 => "instance_id=%3Cstring%3E&username=%3Cstring%3E&first_name=%3Cstring%3E&last_name=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://ccnnnnnn.cyrisma.com/app/partner/instances/users/create"
payload := strings.NewReader("instance_id=%3Cstring%3E&username=%3Cstring%3E&first_name=%3Cstring%3E&last_name=%3Cstring%3E")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://ccnnnnnn.cyrisma.com/app/partner/instances/users/create")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("instance_id=%3Cstring%3E&username=%3Cstring%3E&first_name=%3Cstring%3E&last_name=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("https://ccnnnnnn.cyrisma.com/app/partner/instances/users/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "instance_id=%3Cstring%3E&username=%3Cstring%3E&first_name=%3Cstring%3E&last_name=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"username": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"enabled": "<string>",
"instance_id": "<string>"
}{
"error": "<string>",
"error_description": "<string>"
}{
"error": "<string>",
"error_description": "<string>"
}{
"error": "<string>",
"error_description": "<string>"
}Body
application/x-www-form-urlencoded
Request data for creating a new user in an instance.
Response
OK
Represents the JSON structure for creating a new user.
