Accounts
Create account
Create a new account with initial user
POST
/
api
/
v1
/
accounts
Create account
curl --request POST \
--url https://api.evoai.app/api/v1/accounts \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"account_name": "<string>",
"user_full_name": "<string>",
"email": "[email protected]",
"password": "<string>",
"locale": "en",
"support_email": "[email protected]"
}
'import requests
url = "https://api.evoai.app/api/v1/accounts"
payload = {
"account_name": "<string>",
"user_full_name": "<string>",
"email": "[email protected]",
"password": "<string>",
"locale": "en",
"support_email": "[email protected]"
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_name: '<string>',
user_full_name: '<string>',
email: '[email protected]',
password: '<string>',
locale: 'en',
support_email: '[email protected]'
})
};
fetch('https://api.evoai.app/api/v1/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.evoai.app/api/v1/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([
'account_name' => '<string>',
'user_full_name' => '<string>',
'email' => '[email protected]',
'password' => '<string>',
'locale' => 'en',
'support_email' => '[email protected]'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api_access_token: <api-key>"
],
]);
$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.evoai.app/api/v1/accounts"
payload := strings.NewReader("{\n \"account_name\": \"<string>\",\n \"user_full_name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"password\": \"<string>\",\n \"locale\": \"en\",\n \"support_email\": \"[email protected]\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api_access_token", "<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://api.evoai.app/api/v1/accounts")
.header("api_access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_name\": \"<string>\",\n \"user_full_name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"password\": \"<string>\",\n \"locale\": \"en\",\n \"support_email\": \"[email protected]\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evoai.app/api/v1/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_access_token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_name\": \"<string>\",\n \"user_full_name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"password\": \"<string>\",\n \"locale\": \"en\",\n \"support_email\": \"[email protected]\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"user": {
"id": "660e8400-e29b-41d4-a716-446655440001",
"name": "John Doe",
"email": "[email protected]",
"type": "User",
"confirmed": true
},
"account": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Acme Corporation",
"domain": "acme",
"support_email": "[email protected]",
"locale": "en",
"status": "active",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
},
"meta": {
"timestamp": "2024-01-01T00:00:00Z"
},
"message": "Account created successfully"
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/accounts",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "INVALID_TOKEN",
"message": "Invalid token"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/accounts",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "You do not have permission to access this resource"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/accounts",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Signup is disabled"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/accounts",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/accounts",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/accounts",
"method": "POST"
}
}Autorizaciones
API access token authentication
Cuerpo
application/json
⌘I
Create account
curl --request POST \
--url https://api.evoai.app/api/v1/accounts \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"account_name": "<string>",
"user_full_name": "<string>",
"email": "[email protected]",
"password": "<string>",
"locale": "en",
"support_email": "[email protected]"
}
'import requests
url = "https://api.evoai.app/api/v1/accounts"
payload = {
"account_name": "<string>",
"user_full_name": "<string>",
"email": "[email protected]",
"password": "<string>",
"locale": "en",
"support_email": "[email protected]"
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_name: '<string>',
user_full_name: '<string>',
email: '[email protected]',
password: '<string>',
locale: 'en',
support_email: '[email protected]'
})
};
fetch('https://api.evoai.app/api/v1/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.evoai.app/api/v1/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([
'account_name' => '<string>',
'user_full_name' => '<string>',
'email' => '[email protected]',
'password' => '<string>',
'locale' => 'en',
'support_email' => '[email protected]'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api_access_token: <api-key>"
],
]);
$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.evoai.app/api/v1/accounts"
payload := strings.NewReader("{\n \"account_name\": \"<string>\",\n \"user_full_name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"password\": \"<string>\",\n \"locale\": \"en\",\n \"support_email\": \"[email protected]\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api_access_token", "<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://api.evoai.app/api/v1/accounts")
.header("api_access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_name\": \"<string>\",\n \"user_full_name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"password\": \"<string>\",\n \"locale\": \"en\",\n \"support_email\": \"[email protected]\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evoai.app/api/v1/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_access_token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_name\": \"<string>\",\n \"user_full_name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"password\": \"<string>\",\n \"locale\": \"en\",\n \"support_email\": \"[email protected]\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"user": {
"id": "660e8400-e29b-41d4-a716-446655440001",
"name": "John Doe",
"email": "[email protected]",
"type": "User",
"confirmed": true
},
"account": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Acme Corporation",
"domain": "acme",
"support_email": "[email protected]",
"locale": "en",
"status": "active",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
},
"meta": {
"timestamp": "2024-01-01T00:00:00Z"
},
"message": "Account created successfully"
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/accounts",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "INVALID_TOKEN",
"message": "Invalid token"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/accounts",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "You do not have permission to access this resource"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/accounts",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Signup is disabled"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/accounts",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/accounts",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/accounts",
"method": "POST"
}
}