Export a customer's verified MoonPay identity
curl --request POST \
--url https://api.moonpay.com/platform/v1/customers/export \
--header 'Authorization: Bearer <token>' \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.moonpay.com/platform/v1/customers/export"
headers = {
"Authorization": "Bearer <token>",
"X-Api-Key": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'X-Api-Key': '<api-key>'}
};
fetch('https://api.moonpay.com/platform/v1/customers/export', 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.moonpay.com/platform/v1/customers/export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.moonpay.com/platform/v1/customers/export"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-Api-Key", "<api-key>")
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.moonpay.com/platform/v1/customers/export")
.header("Authorization", "Bearer <token>")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moonpay.com/platform/v1/customers/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"basicDetails": {
"firstName": "Jane",
"lastName": "Doe",
"dateOfBirth": "1990-01-15",
"nationality": "USA"
},
"residentialAddress": {
"country": "USA",
"locality": "New York",
"street": "350 Fifth Avenue",
"postalCode": "10118",
"administrativeArea": "NY",
"subStreet": "<string>"
},
"phoneNumber": {
"number": "+14155551234"
},
"taxIdentifiers": [
{
"value": "<string>",
"country": "<string>"
}
],
"files": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"uploadedAt": "2023-11-07T05:31:56Z",
"downloadUrl": "<string>"
}
]
}
}{
"code": "unauthorized",
"message": "Not authorized"
}{
"code": "forbidden",
"message": "Forbidden"
}{
"code": "conflict",
"message": "Conflict"
}Customers
Export customer data
Export MoonPay-verified customer data using a consent token
POST
/
platform
/
v1
/
customers
/
export
Export a customer's verified MoonPay identity
curl --request POST \
--url https://api.moonpay.com/platform/v1/customers/export \
--header 'Authorization: Bearer <token>' \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.moonpay.com/platform/v1/customers/export"
headers = {
"Authorization": "Bearer <token>",
"X-Api-Key": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'X-Api-Key': '<api-key>'}
};
fetch('https://api.moonpay.com/platform/v1/customers/export', 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.moonpay.com/platform/v1/customers/export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.moonpay.com/platform/v1/customers/export"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-Api-Key", "<api-key>")
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.moonpay.com/platform/v1/customers/export")
.header("Authorization", "Bearer <token>")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moonpay.com/platform/v1/customers/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"basicDetails": {
"firstName": "Jane",
"lastName": "Doe",
"dateOfBirth": "1990-01-15",
"nationality": "USA"
},
"residentialAddress": {
"country": "USA",
"locality": "New York",
"street": "350 Fifth Avenue",
"postalCode": "10118",
"administrativeArea": "NY",
"subStreet": "<string>"
},
"phoneNumber": {
"number": "+14155551234"
},
"taxIdentifiers": [
{
"value": "<string>",
"country": "<string>"
}
],
"files": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"uploadedAt": "2023-11-07T05:31:56Z",
"downloadUrl": "<string>"
}
]
}
}{
"code": "unauthorized",
"message": "Not authorized"
}{
"code": "forbidden",
"message": "Forbidden"
}{
"code": "conflict",
"message": "Conflict"
}Some Platform API capabilities must be enabled on your account by MoonPay
before you can call them. If this endpoint returns an unexpected
404, see
Capability
enablement.Authorizations
Bearer authentication header using an access token.
Example: Authorization: Bearer <accessToken>
Secret key authentication via the X-Api-Key header.
Example: X-Api-Key: <secretKey>
Response
The request has succeeded.
The customer's MoonPay-verified identity. All fields are populated from the customer's latest approved identity verification.
Show child attributes
Show child attributes
⌘I