Create account
curl --request POST \
--url https://api.quiva.ai/accounts \
--header 'Content-Type: application/json' \
--data '
{
"name": "acme",
"root_first_name": "John",
"root_last_name": "Doe",
"root_email": "admin@acme.com",
"password": "SecureP@ssw0rd!",
"country": "US",
"company_name": "ACME Corporation",
"address": "123 Main St, Anytown, USA",
"website": "https://acme.com",
"phone_number": "+1234567890"
}
'import requests
url = "https://api.quiva.ai/accounts"
payload = {
"name": "acme",
"root_first_name": "John",
"root_last_name": "Doe",
"root_email": "admin@acme.com",
"password": "SecureP@ssw0rd!",
"country": "US",
"company_name": "ACME Corporation",
"address": "123 Main St, Anytown, USA",
"website": "https://acme.com",
"phone_number": "+1234567890"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'acme',
root_first_name: 'John',
root_last_name: 'Doe',
root_email: 'admin@acme.com',
password: 'SecureP@ssw0rd!',
country: 'US',
company_name: 'ACME Corporation',
address: '123 Main St, Anytown, USA',
website: 'https://acme.com',
phone_number: '+1234567890'
})
};
fetch('https://api.quiva.ai/accounts', 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.quiva.ai/accounts",
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' => 'acme',
'root_first_name' => 'John',
'root_last_name' => 'Doe',
'root_email' => 'admin@acme.com',
'password' => 'SecureP@ssw0rd!',
'country' => 'US',
'company_name' => 'ACME Corporation',
'address' => '123 Main St, Anytown, USA',
'website' => 'https://acme.com',
'phone_number' => '+1234567890'
]),
CURLOPT_HTTPHEADER => [
"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.quiva.ai/accounts"
payload := strings.NewReader("{\n \"name\": \"acme\",\n \"root_first_name\": \"John\",\n \"root_last_name\": \"Doe\",\n \"root_email\": \"admin@acme.com\",\n \"password\": \"SecureP@ssw0rd!\",\n \"country\": \"US\",\n \"company_name\": \"ACME Corporation\",\n \"address\": \"123 Main St, Anytown, USA\",\n \"website\": \"https://acme.com\",\n \"phone_number\": \"+1234567890\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.quiva.ai/accounts")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"acme\",\n \"root_first_name\": \"John\",\n \"root_last_name\": \"Doe\",\n \"root_email\": \"admin@acme.com\",\n \"password\": \"SecureP@ssw0rd!\",\n \"country\": \"US\",\n \"company_name\": \"ACME Corporation\",\n \"address\": \"123 Main St, Anytown, USA\",\n \"website\": \"https://acme.com\",\n \"phone_number\": \"+1234567890\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quiva.ai/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"acme\",\n \"root_first_name\": \"John\",\n \"root_last_name\": \"Doe\",\n \"root_email\": \"admin@acme.com\",\n \"password\": \"SecureP@ssw0rd!\",\n \"country\": \"US\",\n \"company_name\": \"ACME Corporation\",\n \"address\": \"123 Main St, Anytown, USA\",\n \"website\": \"https://acme.com\",\n \"phone_number\": \"+1234567890\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"email_confirmed": false,
"description": "This flag confirms whether a new or an existing user is the root of the newly created account."
}
}{
"error": "<string>"
}Account Management
Create account
- Creates a new account and a user if the provided email does not exist on the system.
- Associates the user with the account with root privileges.
- Sends an email to the user to verify their email address if the email is not already verified on the system.
- A user can be a member of any number of accounts but they can be a root of at most one account.
POST
/
accounts
Create account
curl --request POST \
--url https://api.quiva.ai/accounts \
--header 'Content-Type: application/json' \
--data '
{
"name": "acme",
"root_first_name": "John",
"root_last_name": "Doe",
"root_email": "admin@acme.com",
"password": "SecureP@ssw0rd!",
"country": "US",
"company_name": "ACME Corporation",
"address": "123 Main St, Anytown, USA",
"website": "https://acme.com",
"phone_number": "+1234567890"
}
'import requests
url = "https://api.quiva.ai/accounts"
payload = {
"name": "acme",
"root_first_name": "John",
"root_last_name": "Doe",
"root_email": "admin@acme.com",
"password": "SecureP@ssw0rd!",
"country": "US",
"company_name": "ACME Corporation",
"address": "123 Main St, Anytown, USA",
"website": "https://acme.com",
"phone_number": "+1234567890"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'acme',
root_first_name: 'John',
root_last_name: 'Doe',
root_email: 'admin@acme.com',
password: 'SecureP@ssw0rd!',
country: 'US',
company_name: 'ACME Corporation',
address: '123 Main St, Anytown, USA',
website: 'https://acme.com',
phone_number: '+1234567890'
})
};
fetch('https://api.quiva.ai/accounts', 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.quiva.ai/accounts",
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' => 'acme',
'root_first_name' => 'John',
'root_last_name' => 'Doe',
'root_email' => 'admin@acme.com',
'password' => 'SecureP@ssw0rd!',
'country' => 'US',
'company_name' => 'ACME Corporation',
'address' => '123 Main St, Anytown, USA',
'website' => 'https://acme.com',
'phone_number' => '+1234567890'
]),
CURLOPT_HTTPHEADER => [
"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.quiva.ai/accounts"
payload := strings.NewReader("{\n \"name\": \"acme\",\n \"root_first_name\": \"John\",\n \"root_last_name\": \"Doe\",\n \"root_email\": \"admin@acme.com\",\n \"password\": \"SecureP@ssw0rd!\",\n \"country\": \"US\",\n \"company_name\": \"ACME Corporation\",\n \"address\": \"123 Main St, Anytown, USA\",\n \"website\": \"https://acme.com\",\n \"phone_number\": \"+1234567890\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.quiva.ai/accounts")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"acme\",\n \"root_first_name\": \"John\",\n \"root_last_name\": \"Doe\",\n \"root_email\": \"admin@acme.com\",\n \"password\": \"SecureP@ssw0rd!\",\n \"country\": \"US\",\n \"company_name\": \"ACME Corporation\",\n \"address\": \"123 Main St, Anytown, USA\",\n \"website\": \"https://acme.com\",\n \"phone_number\": \"+1234567890\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quiva.ai/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"acme\",\n \"root_first_name\": \"John\",\n \"root_last_name\": \"Doe\",\n \"root_email\": \"admin@acme.com\",\n \"password\": \"SecureP@ssw0rd!\",\n \"country\": \"US\",\n \"company_name\": \"ACME Corporation\",\n \"address\": \"123 Main St, Anytown, USA\",\n \"website\": \"https://acme.com\",\n \"phone_number\": \"+1234567890\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"email_confirmed": false,
"description": "This flag confirms whether a new or an existing user is the root of the newly created account."
}
}{
"error": "<string>"
}Body
application/json
Account name that members of the account will be using when signing in. It is case-insensitive. Heading and trailing spaces are trimmed
Root user email. A user is not allowed to use the same email as a root email for multiple accounts.
Root user password. It has to be a new password if the user is new to the system. If the user exists, they must provide their current password. New password requirements:
- Minimum length: 8 characters
- Must contain at least one uppercase letter
- Must contain at least one lowercase letter
- Must contain at least one digit (number)
- Must contain at least one special character (punctuation or symbol)
- Maximum length: 99 characters
Root user first name
Root user last name
Country
Company name
Company address
Company website
Company phone number
Response
Account created successfully
Show child attributes
Show child attributes
⌘I