Create User
curl --request POST \
--url https://2d89d8691199.ngrok-free.app/api/v1/sdk/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"appUserId": "<string>",
"userPlatform": "<string>",
"locale": "<string>",
"email": "<string>",
"country": "<string>"
}
'import requests
url = "https://2d89d8691199.ngrok-free.app/api/v1/sdk/users"
payload = {
"appUserId": "<string>",
"userPlatform": "<string>",
"locale": "<string>",
"email": "<string>",
"country": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
appUserId: '<string>',
userPlatform: '<string>',
locale: '<string>',
email: '<string>',
country: '<string>'
})
};
fetch('https://2d89d8691199.ngrok-free.app/api/v1/sdk/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://2d89d8691199.ngrok-free.app/api/v1/sdk/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([
'appUserId' => '<string>',
'userPlatform' => '<string>',
'locale' => '<string>',
'email' => '<string>',
'country' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://2d89d8691199.ngrok-free.app/api/v1/sdk/users"
payload := strings.NewReader("{\n \"appUserId\": \"<string>\",\n \"userPlatform\": \"<string>\",\n \"locale\": \"<string>\",\n \"email\": \"<string>\",\n \"country\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://2d89d8691199.ngrok-free.app/api/v1/sdk/users")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"appUserId\": \"<string>\",\n \"userPlatform\": \"<string>\",\n \"locale\": \"<string>\",\n \"email\": \"<string>\",\n \"country\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://2d89d8691199.ngrok-free.app/api/v1/sdk/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"appUserId\": \"<string>\",\n \"userPlatform\": \"<string>\",\n \"locale\": \"<string>\",\n \"email\": \"<string>\",\n \"country\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyUsers
Create User
Create a new user in your project
POST
/
api
/
v1
/
sdk
/
users
Create User
curl --request POST \
--url https://2d89d8691199.ngrok-free.app/api/v1/sdk/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"appUserId": "<string>",
"userPlatform": "<string>",
"locale": "<string>",
"email": "<string>",
"country": "<string>"
}
'import requests
url = "https://2d89d8691199.ngrok-free.app/api/v1/sdk/users"
payload = {
"appUserId": "<string>",
"userPlatform": "<string>",
"locale": "<string>",
"email": "<string>",
"country": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
appUserId: '<string>',
userPlatform: '<string>',
locale: '<string>',
email: '<string>',
country: '<string>'
})
};
fetch('https://2d89d8691199.ngrok-free.app/api/v1/sdk/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://2d89d8691199.ngrok-free.app/api/v1/sdk/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([
'appUserId' => '<string>',
'userPlatform' => '<string>',
'locale' => '<string>',
'email' => '<string>',
'country' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://2d89d8691199.ngrok-free.app/api/v1/sdk/users"
payload := strings.NewReader("{\n \"appUserId\": \"<string>\",\n \"userPlatform\": \"<string>\",\n \"locale\": \"<string>\",\n \"email\": \"<string>\",\n \"country\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://2d89d8691199.ngrok-free.app/api/v1/sdk/users")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"appUserId\": \"<string>\",\n \"userPlatform\": \"<string>\",\n \"locale\": \"<string>\",\n \"email\": \"<string>\",\n \"country\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://2d89d8691199.ngrok-free.app/api/v1/sdk/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"appUserId\": \"<string>\",\n \"userPlatform\": \"<string>\",\n \"locale\": \"<string>\",\n \"email\": \"<string>\",\n \"country\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyCreate a new user in your project. This endpoint allows you to register users with platform and locale information.
string
Your app’s custom user identifier
string
required
Platform (IOS, ANDROID, WEB, OTHER)
string
required
User’s locale/language (e.g., “en_US”)
string
User email address (must be valid email)
string
User’s country code
Response Fields
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Unique user identifier (auto-generated) |
| projectId | string | Yes | Project this user belongs to |
| appUserId | string | No | Your app’s custom user identifier |
| string | No | User email address | |
| monthlyRevenue | number | No | User’s monthly revenue (null initially) |
| country | string | No | User’s country |
| userPlatform | string | No | Platform |
| locale | string | No | User’s locale |
| createdAt | string | Yes | User creation timestamp (ISO 8601) |
| updatedAt | string | Yes | Last update timestamp (ISO 8601) |
Example Request
{
"appUserId": "my_user_789",
"userPlatform": "IOS",
"locale": "en_US",
"email": "newuser@example.com",
"country": "US"
}
Example Response
{
"id": "clm7x1a2b000008l7h3k1b2c3",
"projectId": "clm7x1a2b000008l7h3k1b2c3",
"appUserId": "my_user_789",
"email": "newuser@example.com",
"monthlyRevenue": null,
"country": "US",
"userPlatform": "IOS",
"locale": "en_US",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
}
Error Responses
| Status Code | Description | Example Response |
|---|---|---|
| 400 | Bad request - Missing required fields | {"error": "userPlatform and locale are required"} |
| 401 | Unauthorized - Invalid API key | {"error": "Unauthorized"} |
| 500 | Internal server error | {"error": "Failed to create user"} |
Was this page helpful?
⌘I