Skip to main content
POST
/
customer
Onboard customer
curl --request POST \
  --url https://api.example.com/customer \
  --header 'Content-Type: application/json' \
  --data '
{
  "wallets": [
    {
      "address": "0x1234567890123456789012345678901234567890"
    }
  ],
  "type": "INDIVIDUAL",
  "countryCode": "US",
  "username": "john_doe",
  "name": "John Doe",
  "email": "john.doe@example.com",
  "phone": "+1234567890",
  "metadata": {
    "userId": "2b634b51-7f4a-470b-9bd6-c7a968e665d9"
  },
  "address": {
    "line1": "1234 Main St",
    "line2": "Suite 200",
    "city": "Anytown",
    "state": "CA",
    "postalCode": "12345"
  }
}
'
import requests

url = "https://api.example.com/customer"

payload = {
"wallets": [{ "address": "0x1234567890123456789012345678901234567890" }],
"type": "INDIVIDUAL",
"countryCode": "US",
"username": "john_doe",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"metadata": { "userId": "2b634b51-7f4a-470b-9bd6-c7a968e665d9" },
"address": {
"line1": "1234 Main St",
"line2": "Suite 200",
"city": "Anytown",
"state": "CA",
"postalCode": "12345"
}
}
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({
wallets: [{address: '0x1234567890123456789012345678901234567890'}],
type: 'INDIVIDUAL',
countryCode: 'US',
username: 'john_doe',
name: 'John Doe',
email: 'john.doe@example.com',
phone: '+1234567890',
metadata: {userId: '2b634b51-7f4a-470b-9bd6-c7a968e665d9'},
address: {
line1: '1234 Main St',
line2: 'Suite 200',
city: 'Anytown',
state: 'CA',
postalCode: '12345'
}
})
};

fetch('https://api.example.com/customer', 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.example.com/customer",
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([
'wallets' => [
[
'address' => '0x1234567890123456789012345678901234567890'
]
],
'type' => 'INDIVIDUAL',
'countryCode' => 'US',
'username' => 'john_doe',
'name' => 'John Doe',
'email' => 'john.doe@example.com',
'phone' => '+1234567890',
'metadata' => [
'userId' => '2b634b51-7f4a-470b-9bd6-c7a968e665d9'
],
'address' => [
'line1' => '1234 Main St',
'line2' => 'Suite 200',
'city' => 'Anytown',
'state' => 'CA',
'postalCode' => '12345'
]
]),
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.example.com/customer"

payload := strings.NewReader("{\n \"wallets\": [\n {\n \"address\": \"0x1234567890123456789012345678901234567890\"\n }\n ],\n \"type\": \"INDIVIDUAL\",\n \"countryCode\": \"US\",\n \"username\": \"john_doe\",\n \"name\": \"John Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"+1234567890\",\n \"metadata\": {\n \"userId\": \"2b634b51-7f4a-470b-9bd6-c7a968e665d9\"\n },\n \"address\": {\n \"line1\": \"1234 Main St\",\n \"line2\": \"Suite 200\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"postalCode\": \"12345\"\n }\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.example.com/customer")
.header("Content-Type", "application/json")
.body("{\n \"wallets\": [\n {\n \"address\": \"0x1234567890123456789012345678901234567890\"\n }\n ],\n \"type\": \"INDIVIDUAL\",\n \"countryCode\": \"US\",\n \"username\": \"john_doe\",\n \"name\": \"John Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"+1234567890\",\n \"metadata\": {\n \"userId\": \"2b634b51-7f4a-470b-9bd6-c7a968e665d9\"\n },\n \"address\": {\n \"line1\": \"1234 Main St\",\n \"line2\": \"Suite 200\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"postalCode\": \"12345\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/customer")

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 \"wallets\": [\n {\n \"address\": \"0x1234567890123456789012345678901234567890\"\n }\n ],\n \"type\": \"INDIVIDUAL\",\n \"countryCode\": \"US\",\n \"username\": \"john_doe\",\n \"name\": \"John Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"+1234567890\",\n \"metadata\": {\n \"userId\": \"2b634b51-7f4a-470b-9bd6-c7a968e665d9\"\n },\n \"address\": {\n \"line1\": \"1234 Main St\",\n \"line2\": \"Suite 200\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"postalCode\": \"12345\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "id": "customer_c7a968e665d9",
  "object": "customer",
  "verificationStatus": "IN_PROGRESS",
  "wallets": [
    {
      "address": "0x1234567890123456789012345678901234567890",
      "object": "wallet",
      "balances": {
        "token": "0x4dad19801eff64eaaa7c78e466ce3678d0b1fd94",
        "total": "1000",
        "available": {
          "amount": "0"
        },
        "frozen": {
          "amount": "1000"
        }
      }
    }
  ],
  "type": "INDIVIDUAL",
  "countryCode": "US",
  "hasCompletedMoneriumSetup": true,
  "referralCode": "REF123456",
  "createdAt": "2023-10-01T12:00:00Z",
  "username": "john_doe",
  "name": "John Doe",
  "email": "john.doe@example.com",
  "phone": "+1234567890",
  "metadata": {
    "userId": "2b634b51-7f4a-470b-9bd6-c7a968e665d9"
  },
  "address": {
    "line1": "1234 Main St",
    "line2": "Suite 200",
    "city": "Anytown",
    "state": "CA",
    "postalCode": "12345"
  }
}

Body

application/json
wallets
object[]
required

The wallet associated with the customer

Example:
[
{
"address": "0x1234567890123456789012345678901234567890"
}
]
type
enum<string>
required

This is the type of the customer

Available options:
INDIVIDUAL,
ORGANIZATION
Example:

"INDIVIDUAL"

countryCode
object
required

The country code of the address, following the ISO 3166-1 alpha-2 standard

Example:

"US"

username
string
required

Username of the customer

Example:

"john_doe"

name
string

The name of the customer

Example:

"John Doe"

email
string

The email of the customer

Example:

"john.doe@example.com"

phone
string

The phone number of the customer

Example:

"+1234567890"

metadata
object

The metadata of the customer

Example:
{
"userId": "2b634b51-7f4a-470b-9bd6-c7a968e665d9"
}
address
object

The address of the customer

Example:
{
"line1": "1234 Main St",
"line2": "Suite 200",
"city": "Anytown",
"state": "CA",
"postalCode": "12345"
}

Response

The customer has been successfully onboarded

id
string
required

Unique identifier for the customer object.

Example:

"customer_c7a968e665d9"

object
string
required

A string that specifies the type of the object. All objects of the same type share this value.

Example:

"customer"

verificationStatus
enum<string>
required

The verification status of the customer

Available options:
INCOMPLETE,
IN_PROGRESS,
COMPLETED
Example:

"IN_PROGRESS"

wallets
object[]
required

The wallet associated with the customer

type
enum<string>
required

This is the type of the customer

Available options:
INDIVIDUAL,
ORGANIZATION
Example:

"INDIVIDUAL"

countryCode
object
required

The country code of the address, following the ISO 3166-1 alpha-2 standard

Example:

"US"

hasCompletedMoneriumSetup
boolean
required

Indicates whether the customer has completed the Monerium setup

Example:

true

referralCode
string
required

The unique referral code associated with the customer

Example:

"REF123456"

createdAt
string<date-time>
required

The date and time when the customer was created

Example:

"2023-10-01T12:00:00Z"

username
string
required

The username of the customer

Example:

"john_doe"

name
string

The name of the customer

Example:

"John Doe"

email
string

The email of the customer

Example:

"john.doe@example.com"

phone
string

The phone number of the customer

Example:

"+1234567890"

metadata
object

The metadata of the customer

Example:
{
"userId": "2b634b51-7f4a-470b-9bd6-c7a968e665d9"
}
address
object

The address of the customer

Example:
{
"line1": "1234 Main St",
"line2": "Suite 200",
"city": "Anytown",
"state": "CA",
"postalCode": "12345"
}