Register
curl --request POST \
--url https://api.superbox.ai/api/v1/auth/register \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>",
"display_name": "<string>"
}
'import requests
url = "https://api.superbox.ai/api/v1/auth/register"
payload = {
"email": "<string>",
"password": "<string>",
"display_name": "<string>"
}
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({email: '<string>', password: '<string>', display_name: '<string>'})
};
fetch('https://api.superbox.ai/api/v1/auth/register', 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.superbox.ai/api/v1/auth/register",
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([
'email' => '<string>',
'password' => '<string>',
'display_name' => '<string>'
]),
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.superbox.ai/api/v1/auth/register"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"password\": \"<string>\",\n \"display_name\": \"<string>\"\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.superbox.ai/api/v1/auth/register")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"password\": \"<string>\",\n \"display_name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.superbox.ai/api/v1/auth/register")
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 \"email\": \"<string>\",\n \"password\": \"<string>\",\n \"display_name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id_token": "<string>",
"refresh_token": "<string>",
"expires_in": 123,
"email": "<string>",
"local_id": "<string>"
}Auth API
Register
Create a new SuperBox account with email and password
POST
/
api
/
v1
/
auth
/
register
Register
curl --request POST \
--url https://api.superbox.ai/api/v1/auth/register \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>",
"display_name": "<string>"
}
'import requests
url = "https://api.superbox.ai/api/v1/auth/register"
payload = {
"email": "<string>",
"password": "<string>",
"display_name": "<string>"
}
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({email: '<string>', password: '<string>', display_name: '<string>'})
};
fetch('https://api.superbox.ai/api/v1/auth/register', 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.superbox.ai/api/v1/auth/register",
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([
'email' => '<string>',
'password' => '<string>',
'display_name' => '<string>'
]),
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.superbox.ai/api/v1/auth/register"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"password\": \"<string>\",\n \"display_name\": \"<string>\"\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.superbox.ai/api/v1/auth/register")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"password\": \"<string>\",\n \"display_name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.superbox.ai/api/v1/auth/register")
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 \"email\": \"<string>\",\n \"password\": \"<string>\",\n \"display_name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id_token": "<string>",
"refresh_token": "<string>",
"expires_in": 123,
"email": "<string>",
"local_id": "<string>"
}Endpoint
POST /api/v1/auth/register
Registration uses a two-step OTP verification flow. Call
/auth/register/send-otp first to trigger email verification, then call this endpoint after the user verifies.Request Body
string
required
User email address
string
required
Account password (minimum 8 characters)
string
Display name shown in the UI
Example Request
curl -X POST https://api.superbox.ai/api/v1/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "SecurePass123!",
"display_name": "Your Name"
}'
const response = await fetch("https://api.superbox.ai/api/v1/auth/register", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
email: "user@example.com",
password: "SecurePass123!",
display_name: "Your Name",
}),
});
const data = await response.json();
import requests
response = requests.post(
"https://api.superbox.ai/api/v1/auth/register",
json={
"email": "user@example.com",
"password": "SecurePass123!",
"display_name": "Your Name",
},
)
data = response.json()
Response
string
Firebase ID token (JWT). Use this as
Authorization: Bearer <id_token> for API requests.string
Long-lived refresh token used to obtain new ID tokens via
/auth/refresh.number
Seconds until the ID token expires (3600 = 1 hour).
string
Registered email address.
string
Firebase user ID.
Success Response (201)
{
"id_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6...",
"refresh_token": "AMf-vByW3...",
"expires_in": 3600,
"email": "user@example.com",
"local_id": "abc123def456"
}
Error Responses
{
"status": "error",
"detail": "Invalid request: email is required"
}
{
"status": "error",
"detail": "Email already registered"
}
⌘I