Create User
curl -X POST "https://sandbox-api.aparatech.io/v1/public/users/individual" \
-H "Content-Type: application/json" \
-H "MID: example_string" \
-d '{
"Name": "John Doe",
"email": "user@example.com",
"phone": "+1-555-0123",
"phoneCode": "+1-555-0123"
}'
import requests
import json
url = "https://sandbox-api.aparatech.io/v1/public/users/individual"
headers = {
"Content-Type": "application/json",
"MID": "example_string"
}
data = {
"Name": "John Doe",
"email": "user@example.com",
"phone": "+1-555-0123",
"phoneCode": "+1-555-0123"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://sandbox-api.aparatech.io/v1/public/users/individual", {
method: "POST",
headers: {
"Content-Type": "application/json",
"MID": "example_string"
},
body: JSON.stringify({
"Name": "John Doe",
"email": "user@example.com",
"phone": "+1-555-0123",
"phoneCode": "+1-555-0123"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"Name": "John Doe",
"email": "user@example.com",
"phone": "+1-555-0123",
"phoneCode": "+1-555-0123"
}`)
req, err := http.NewRequest("POST", "https://sandbox-api.aparatech.io/v1/public/users/individual", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("MID", "example_string")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://sandbox-api.aparatech.io/v1/public/users/individual')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['MID'] = 'example_string'
request.body = '{
"Name": "John Doe",
"email": "user@example.com",
"phone": "+1-555-0123",
"phoneCode": "+1-555-0123"
}'
response = http.request(request)
puts response.body
{
"status": "success",
"data": {
"userId": "OCUX-17787572552482148"
}
}
POST
/v1/public/users/individual
POST
Base URLstring
Target server for requests. Edit to use your own host.
Content-Typestring
RequiredThe media type of the request body
Options: application/json
Request Preview
Response
Response will appear here after sending the request
Headers
Responses
statusstring
dataobject
userIdstring
Was this page helpful?