Python SDK
from metrifox_sdk import MetrifoxClient
client = MetrifoxClient(api_key="your_api_key")
result = client.customers.archive("cust-mit7k5v8obzs")
print(result['data']['archived_at'])import { init } from "metrifox-js";
const metrifoxClient = init({
apiKey: process.env.METRIFOX_API_KEY
});
const result = await metrifoxClient.customers.archive("cust-mit7k5v8obzs");
console.log(result.data.archived_at);
require 'metrifox-sdk'
METRIFOX_SDK = MetrifoxSDK.init({ api_key: "your-api-key" })
result = METRIFOX_SDK.customers.archive("cust-mit7k5v8obzs")
puts result["data"]["archived_at"]
curl -X POST "https://api.metrifox.com/api/v1/customers/cust-mit7k5v8obzs/archive" \
-H "x-api-key: your-api-key"
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{defaultHost}/api/v1/customers/{customer_key}/archive",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"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://{defaultHost}/api/v1/customers/{customer_key}/archive"
req, _ := http.NewRequest("POST", url, nil)
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://{defaultHost}/api/v1/customers/{customer_key}/archive")
.header("x-api-key", "<api-key>")
.asString();{
"statusCode": 200,
"message": "Customer archived successfully",
"meta": {},
"data": {
"customer_key": "cust-mit7k5v8obzs",
"archived_at": "2026-05-13T04:30:00.000Z"
},
"errors": {}
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"errors": {}
}Customers
Archive Customer
Archive a customer to mark them as inactive while preserving their full history.
POST
/
api
/
v1
/
customers
/
{customer_key}
/
archive
Python SDK
from metrifox_sdk import MetrifoxClient
client = MetrifoxClient(api_key="your_api_key")
result = client.customers.archive("cust-mit7k5v8obzs")
print(result['data']['archived_at'])import { init } from "metrifox-js";
const metrifoxClient = init({
apiKey: process.env.METRIFOX_API_KEY
});
const result = await metrifoxClient.customers.archive("cust-mit7k5v8obzs");
console.log(result.data.archived_at);
require 'metrifox-sdk'
METRIFOX_SDK = MetrifoxSDK.init({ api_key: "your-api-key" })
result = METRIFOX_SDK.customers.archive("cust-mit7k5v8obzs")
puts result["data"]["archived_at"]
curl -X POST "https://api.metrifox.com/api/v1/customers/cust-mit7k5v8obzs/archive" \
-H "x-api-key: your-api-key"
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{defaultHost}/api/v1/customers/{customer_key}/archive",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"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://{defaultHost}/api/v1/customers/{customer_key}/archive"
req, _ := http.NewRequest("POST", url, nil)
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://{defaultHost}/api/v1/customers/{customer_key}/archive")
.header("x-api-key", "<api-key>")
.asString();{
"statusCode": 200,
"message": "Customer archived successfully",
"meta": {},
"data": {
"customer_key": "cust-mit7k5v8obzs",
"archived_at": "2026-05-13T04:30:00.000Z"
},
"errors": {}
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"errors": {}
}Authorizations
Path Parameters
The unique identifier for the customer
⌘I

