Create a new user
curl --request POST \
--url https://api.tapti.ai/users \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890"
}
'import requests
url = "https://api.tapti.ai/users"
payload = {
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'John Doe', email: 'john.doe@example.com', phone: '+1234567890'})
};
fetch('https://api.tapti.ai/users', 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.tapti.ai/users",
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' => 'John Doe',
'email' => 'john.doe@example.com',
'phone' => '+1234567890'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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.tapti.ai/users"
payload := strings.NewReader("{\n \"name\": \"John Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"+1234567890\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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.tapti.ai/users")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"John Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"+1234567890\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tapti.ai/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"John Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"+1234567890\"\n}"
response = http.request(request)
puts response.read_body{
"id": "690739f7-3e1b-4ceb-a439-23bd9c7ae573",
"created_at": "2024-12-09T19:15:03.738Z",
"updated_at": "2024-12-09T19:15:03.738Z",
"name": "Dev's User 2",
"email": "devU2@devweb.com",
"phone": "9546557824",
"tenant_app_id": "2bac016b-ad8f-4bf9-afb3-a63814bca95f"
}User
Create User
POST
/
users
Create a new user
curl --request POST \
--url https://api.tapti.ai/users \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890"
}
'import requests
url = "https://api.tapti.ai/users"
payload = {
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'John Doe', email: 'john.doe@example.com', phone: '+1234567890'})
};
fetch('https://api.tapti.ai/users', 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.tapti.ai/users",
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' => 'John Doe',
'email' => 'john.doe@example.com',
'phone' => '+1234567890'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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.tapti.ai/users"
payload := strings.NewReader("{\n \"name\": \"John Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"+1234567890\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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.tapti.ai/users")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"John Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"+1234567890\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tapti.ai/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"John Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"+1234567890\"\n}"
response = http.request(request)
puts response.read_body{
"id": "690739f7-3e1b-4ceb-a439-23bd9c7ae573",
"created_at": "2024-12-09T19:15:03.738Z",
"updated_at": "2024-12-09T19:15:03.738Z",
"name": "Dev's User 2",
"email": "devU2@devweb.com",
"phone": "9546557824",
"tenant_app_id": "2bac016b-ad8f-4bf9-afb3-a63814bca95f"
}Create a new user.
Authorizations
Body
application/json
The user to create
Response
User created successfully
The unique identifier of the user
Example:
"690739f7-3e1b-4ceb-a439-23bd9c7ae573"
The timestamp when the user was created
Example:
"2024-12-09T19:15:03.738Z"
The timestamp when the user was last updated
Example:
"2024-12-09T19:15:03.738Z"
The name of the user
Example:
"Dev's User 2"
The email of the user
Example:
"devU2@devweb.com"
The phone number of the user
Example:
"9546557824"
The ID of the tenant app this user belongs to
Example:
"2bac016b-ad8f-4bf9-afb3-a63814bca95f"
