Create Customer
Create a customer, terms must already be accepted via one of the two ToS paths.
curl -X POST "https://sandbox.rasto.co/api/customers" \
-H "Content-Type: application/json" \
-H "Api-Key: example_string" \
-H "Api-Version: example_string" \
-H "Idempotency-Key: example_string" \
-H "Api-Key: YOUR_API_KEY" \
-d '{
"kind": "individual",
"first_name": "John Doe",
"last_name": "John Doe",
"id_document": {
"kind": "passport",
"number": "example_string"
},
"legal_name": "John Doe",
"business_kind": "example_string",
"registration_number": "example_string",
"incorporation_date": "2024-12-25",
"vat_number": "example_string",
"website": "example_string",
"controllers": [
{
"first_name": "John Doe",
"last_name": "John Doe",
"date_of_birth": "2024-12-25",
"nationality": "example_string",
"address": {
"street_line_1": "example_string",
"street_line_2": "example_string",
"postal_code": "example_string",
"city": "New York",
"country": "USA",
"state": "example_string"
},
"phone": "+1-555-0123",
"email": "user@example.com",
"has_ownership": true,
"ownership_percentage": 3.14,
"has_control": true,
"is_signer": true,
"is_director": true,
"role": "example_string",
"id_document": {
"kind": "passport",
"number": "example_string"
}
}
],
"email": "user@example.com",
"phone": "+1-555-0123",
"date_of_birth": "2024-12-25",
"nationality": "example_string",
"residence_country": "USA",
"address": {
"street_line_1": "example_string",
"street_line_2": "example_string",
"postal_code": "example_string",
"city": "New York",
"country": "USA",
"state": "example_string"
},
"economic_profile": {
"occupation": "example_string",
"source_of_funds": "example_string",
"annual_income": "example_string",
"monthly_turnover": "example_string",
"monthly_transaction_count": "example_string",
"activities": [
"example_string"
],
"is_public_official": true,
"is_funds_owner": true,
"is_us_citizen": true,
"is_us_tax_person": true,
"tin": "example_string",
"tax_residence_country": "USA"
},
"identifying_information": [
{
"kind": "passport",
"issuing_country": "USA",
"number": "example_string",
"image_front": "example_string",
"image_back": "example_string"
}
],
"documents": [
{
"purpose": "selfie",
"file": "example_string"
}
],
"endorsements": [
"example_string"
],
"signed_tos_id": "example_string",
"tos_acceptance": {
"ip_address": "123 Main St"
},
"partner_reference_id": "example_string"
}'
import requests
import json
url = "https://sandbox.rasto.co/api/customers"
headers = {
"Content-Type": "application/json",
"Api-Key": "YOUR_API_KEY",
"Api-Version": "example_string",
"Idempotency-Key": "example_string"
}
data = {
"kind": "individual",
"first_name": "John Doe",
"last_name": "John Doe",
"id_document": {
"kind": "passport",
"number": "example_string"
},
"legal_name": "John Doe",
"business_kind": "example_string",
"registration_number": "example_string",
"incorporation_date": "2024-12-25",
"vat_number": "example_string",
"website": "example_string",
"controllers": [
{
"first_name": "John Doe",
"last_name": "John Doe",
"date_of_birth": "2024-12-25",
"nationality": "example_string",
"address": {
"street_line_1": "example_string",
"street_line_2": "example_string",
"postal_code": "example_string",
"city": "New York",
"country": "USA",
"state": "example_string"
},
"phone": "+1-555-0123",
"email": "user@example.com",
"has_ownership": true,
"ownership_percentage": 3.14,
"has_control": true,
"is_signer": true,
"is_director": true,
"role": "example_string",
"id_document": {
"kind": "passport",
"number": "example_string"
}
}
],
"email": "user@example.com",
"phone": "+1-555-0123",
"date_of_birth": "2024-12-25",
"nationality": "example_string",
"residence_country": "USA",
"address": {
"street_line_1": "example_string",
"street_line_2": "example_string",
"postal_code": "example_string",
"city": "New York",
"country": "USA",
"state": "example_string"
},
"economic_profile": {
"occupation": "example_string",
"source_of_funds": "example_string",
"annual_income": "example_string",
"monthly_turnover": "example_string",
"monthly_transaction_count": "example_string",
"activities": [
"example_string"
],
"is_public_official": true,
"is_funds_owner": true,
"is_us_citizen": true,
"is_us_tax_person": true,
"tin": "example_string",
"tax_residence_country": "USA"
},
"identifying_information": [
{
"kind": "passport",
"issuing_country": "USA",
"number": "example_string",
"image_front": "example_string",
"image_back": "example_string"
}
],
"documents": [
{
"purpose": "selfie",
"file": "example_string"
}
],
"endorsements": [
"example_string"
],
"signed_tos_id": "example_string",
"tos_acceptance": {
"ip_address": "123 Main St"
},
"partner_reference_id": "example_string"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://sandbox.rasto.co/api/customers", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Api-Key": "YOUR_API_KEY",
"Api-Version": "example_string",
"Idempotency-Key": "example_string"
},
body: JSON.stringify({
"kind": "individual",
"first_name": "John Doe",
"last_name": "John Doe",
"id_document": {
"kind": "passport",
"number": "example_string"
},
"legal_name": "John Doe",
"business_kind": "example_string",
"registration_number": "example_string",
"incorporation_date": "2024-12-25",
"vat_number": "example_string",
"website": "example_string",
"controllers": [
{
"first_name": "John Doe",
"last_name": "John Doe",
"date_of_birth": "2024-12-25",
"nationality": "example_string",
"address": {
"street_line_1": "example_string",
"street_line_2": "example_string",
"postal_code": "example_string",
"city": "New York",
"country": "USA",
"state": "example_string"
},
"phone": "+1-555-0123",
"email": "user@example.com",
"has_ownership": true,
"ownership_percentage": 3.14,
"has_control": true,
"is_signer": true,
"is_director": true,
"role": "example_string",
"id_document": {
"kind": "passport",
"number": "example_string"
}
}
],
"email": "user@example.com",
"phone": "+1-555-0123",
"date_of_birth": "2024-12-25",
"nationality": "example_string",
"residence_country": "USA",
"address": {
"street_line_1": "example_string",
"street_line_2": "example_string",
"postal_code": "example_string",
"city": "New York",
"country": "USA",
"state": "example_string"
},
"economic_profile": {
"occupation": "example_string",
"source_of_funds": "example_string",
"annual_income": "example_string",
"monthly_turnover": "example_string",
"monthly_transaction_count": "example_string",
"activities": [
"example_string"
],
"is_public_official": true,
"is_funds_owner": true,
"is_us_citizen": true,
"is_us_tax_person": true,
"tin": "example_string",
"tax_residence_country": "USA"
},
"identifying_information": [
{
"kind": "passport",
"issuing_country": "USA",
"number": "example_string",
"image_front": "example_string",
"image_back": "example_string"
}
],
"documents": [
{
"purpose": "selfie",
"file": "example_string"
}
],
"endorsements": [
"example_string"
],
"signed_tos_id": "example_string",
"tos_acceptance": {
"ip_address": "123 Main St"
},
"partner_reference_id": "example_string"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"kind": "individual",
"first_name": "John Doe",
"last_name": "John Doe",
"id_document": {
"kind": "passport",
"number": "example_string"
},
"legal_name": "John Doe",
"business_kind": "example_string",
"registration_number": "example_string",
"incorporation_date": "2024-12-25",
"vat_number": "example_string",
"website": "example_string",
"controllers": [
{
"first_name": "John Doe",
"last_name": "John Doe",
"date_of_birth": "2024-12-25",
"nationality": "example_string",
"address": {
"street_line_1": "example_string",
"street_line_2": "example_string",
"postal_code": "example_string",
"city": "New York",
"country": "USA",
"state": "example_string"
},
"phone": "+1-555-0123",
"email": "user@example.com",
"has_ownership": true,
"ownership_percentage": 3.14,
"has_control": true,
"is_signer": true,
"is_director": true,
"role": "example_string",
"id_document": {
"kind": "passport",
"number": "example_string"
}
}
],
"email": "user@example.com",
"phone": "+1-555-0123",
"date_of_birth": "2024-12-25",
"nationality": "example_string",
"residence_country": "USA",
"address": {
"street_line_1": "example_string",
"street_line_2": "example_string",
"postal_code": "example_string",
"city": "New York",
"country": "USA",
"state": "example_string"
},
"economic_profile": {
"occupation": "example_string",
"source_of_funds": "example_string",
"annual_income": "example_string",
"monthly_turnover": "example_string",
"monthly_transaction_count": "example_string",
"activities": [
"example_string"
],
"is_public_official": true,
"is_funds_owner": true,
"is_us_citizen": true,
"is_us_tax_person": true,
"tin": "example_string",
"tax_residence_country": "USA"
},
"identifying_information": [
{
"kind": "passport",
"issuing_country": "USA",
"number": "example_string",
"image_front": "example_string",
"image_back": "example_string"
}
],
"documents": [
{
"purpose": "selfie",
"file": "example_string"
}
],
"endorsements": [
"example_string"
],
"signed_tos_id": "example_string",
"tos_acceptance": {
"ip_address": "123 Main St"
},
"partner_reference_id": "example_string"
}`)
req, err := http.NewRequest("POST", "https://sandbox.rasto.co/api/customers", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Api-Key", "example_string")
req.Header.Set("Api-Version", "example_string")
req.Header.Set("Idempotency-Key", "example_string")
req.Header.Set("Api-Key", "YOUR_API_KEY")
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.rasto.co/api/customers')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Api-Key'] = 'example_string'
request['Api-Version'] = 'example_string'
request['Idempotency-Key'] = 'example_string'
request['Api-Key'] = 'YOUR_API_KEY'
request.body = '{
"kind": "individual",
"first_name": "John Doe",
"last_name": "John Doe",
"id_document": {
"kind": "passport",
"number": "example_string"
},
"legal_name": "John Doe",
"business_kind": "example_string",
"registration_number": "example_string",
"incorporation_date": "2024-12-25",
"vat_number": "example_string",
"website": "example_string",
"controllers": [
{
"first_name": "John Doe",
"last_name": "John Doe",
"date_of_birth": "2024-12-25",
"nationality": "example_string",
"address": {
"street_line_1": "example_string",
"street_line_2": "example_string",
"postal_code": "example_string",
"city": "New York",
"country": "USA",
"state": "example_string"
},
"phone": "+1-555-0123",
"email": "user@example.com",
"has_ownership": true,
"ownership_percentage": 3.14,
"has_control": true,
"is_signer": true,
"is_director": true,
"role": "example_string",
"id_document": {
"kind": "passport",
"number": "example_string"
}
}
],
"email": "user@example.com",
"phone": "+1-555-0123",
"date_of_birth": "2024-12-25",
"nationality": "example_string",
"residence_country": "USA",
"address": {
"street_line_1": "example_string",
"street_line_2": "example_string",
"postal_code": "example_string",
"city": "New York",
"country": "USA",
"state": "example_string"
},
"economic_profile": {
"occupation": "example_string",
"source_of_funds": "example_string",
"annual_income": "example_string",
"monthly_turnover": "example_string",
"monthly_transaction_count": "example_string",
"activities": [
"example_string"
],
"is_public_official": true,
"is_funds_owner": true,
"is_us_citizen": true,
"is_us_tax_person": true,
"tin": "example_string",
"tax_residence_country": "USA"
},
"identifying_information": [
{
"kind": "passport",
"issuing_country": "USA",
"number": "example_string",
"image_front": "example_string",
"image_back": "example_string"
}
],
"documents": [
{
"purpose": "selfie",
"file": "example_string"
}
],
"endorsements": [
"example_string"
],
"signed_tos_id": "example_string",
"tos_acceptance": {
"ip_address": "123 Main St"
},
"partner_reference_id": "example_string"
}'
response = http.request(request)
puts response.body
{}
{
"error": "Unprocessable Entity",
"message": "The request was well-formed but contains semantic errors",
"code": 422,
"details": [
{
"field": "password",
"message": "Password must be at least 8 characters long"
}
]
}
/api/customers
Target server for requests. Edit to use your own host.
API key (sent in header)
The media type of the request body
The /api contract to serve this request under, as an ISO date. Omit to use the default (2026-08-01), omitting it always keeps today's behaviour, so a future breaking change cannot move you. Supported: 2026-08-01.
Unique per request; a retry with the same key replays the stored response byte-for-byte.
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Provide your API key in the header.
Headers
The /api contract to serve this request under, as an ISO date. Omit to use the default (2026-08-01), omitting it always keeps today's behaviour, so a future breaking change cannot move you. Supported: 2026-08-01.
Unique per request; a retry with the same key replays the stored response byte-for-byte.
Body
individualbusiness