curl --request PATCH \
--url https://lazyapp.in/v1/platform/customers/{customer} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"external_id": "<string>",
"email": "jsmith@example.com",
"metadata": {},
"invoice_metadata": {},
"spending_limit_cents": 1,
"wallet_balance_cents": 123,
"usage_alert_cents": 1
}
'import requests
url = "https://lazyapp.in/v1/platform/customers/{customer}"
payload = {
"name": "<string>",
"external_id": "<string>",
"email": "jsmith@example.com",
"metadata": {},
"invoice_metadata": {},
"spending_limit_cents": 1,
"wallet_balance_cents": 123,
"usage_alert_cents": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
external_id: '<string>',
email: 'jsmith@example.com',
metadata: {},
invoice_metadata: {},
spending_limit_cents: 1,
wallet_balance_cents: 123,
usage_alert_cents: 1
})
};
fetch('https://lazyapp.in/v1/platform/customers/{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://lazyapp.in/v1/platform/customers/{customer}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'external_id' => '<string>',
'email' => 'jsmith@example.com',
'metadata' => [
],
'invoice_metadata' => [
],
'spending_limit_cents' => 1,
'wallet_balance_cents' => 123,
'usage_alert_cents' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://lazyapp.in/v1/platform/customers/{customer}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"external_id\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {},\n \"invoice_metadata\": {},\n \"spending_limit_cents\": 1,\n \"wallet_balance_cents\": 123,\n \"usage_alert_cents\": 1\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://lazyapp.in/v1/platform/customers/{customer}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"external_id\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {},\n \"invoice_metadata\": {},\n \"spending_limit_cents\": 1,\n \"wallet_balance_cents\": 123,\n \"usage_alert_cents\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://lazyapp.in/v1/platform/customers/{customer}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"external_id\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {},\n \"invoice_metadata\": {},\n \"spending_limit_cents\": 1,\n \"wallet_balance_cents\": 123,\n \"usage_alert_cents\": 1\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"name": "<string>",
"email": "<string>",
"status": "<string>",
"billing_mode": "inherit",
"metadata": {},
"invoice_metadata": {},
"spending_limit_cents": 123,
"wallet_balance_cents": 123,
"usage_alert_cents": 123,
"suspended_at": "2023-11-07T05:31:56Z",
"archived_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"connections": [
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phone_number_id": "<string>",
"waba_id": "<string>",
"display_phone_number": "<string>",
"verified_name": "<string>",
"status": "<string>",
"quality_rating": "<string>",
"mode": "live",
"is_default": true
}
],
"usage": {
"period": "<string>",
"messages": 123,
"total_charge": "<string>"
}
}{
"message": "<string>",
"code": "<string>"
}{
"message": "The API is on the Pro plan. Upgrade in Billing to use live keys. Test keys keep working.",
"code": "plan_limit_reached"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>"
}Update a customer
Only the fields you send change.
markup_bps, pricing_mode, category_markups and platform_fee are deprecated. They are no longer stored or returned. A request that still sends them succeeds and the fields are ignored, because LazyApp adds nothing to Meta’s rates, so there is no per-customer markup to set.
Required scope: customers:write
curl --request PATCH \
--url https://lazyapp.in/v1/platform/customers/{customer} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"external_id": "<string>",
"email": "jsmith@example.com",
"metadata": {},
"invoice_metadata": {},
"spending_limit_cents": 1,
"wallet_balance_cents": 123,
"usage_alert_cents": 1
}
'import requests
url = "https://lazyapp.in/v1/platform/customers/{customer}"
payload = {
"name": "<string>",
"external_id": "<string>",
"email": "jsmith@example.com",
"metadata": {},
"invoice_metadata": {},
"spending_limit_cents": 1,
"wallet_balance_cents": 123,
"usage_alert_cents": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
external_id: '<string>',
email: 'jsmith@example.com',
metadata: {},
invoice_metadata: {},
spending_limit_cents: 1,
wallet_balance_cents: 123,
usage_alert_cents: 1
})
};
fetch('https://lazyapp.in/v1/platform/customers/{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://lazyapp.in/v1/platform/customers/{customer}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'external_id' => '<string>',
'email' => 'jsmith@example.com',
'metadata' => [
],
'invoice_metadata' => [
],
'spending_limit_cents' => 1,
'wallet_balance_cents' => 123,
'usage_alert_cents' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://lazyapp.in/v1/platform/customers/{customer}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"external_id\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {},\n \"invoice_metadata\": {},\n \"spending_limit_cents\": 1,\n \"wallet_balance_cents\": 123,\n \"usage_alert_cents\": 1\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://lazyapp.in/v1/platform/customers/{customer}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"external_id\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {},\n \"invoice_metadata\": {},\n \"spending_limit_cents\": 1,\n \"wallet_balance_cents\": 123,\n \"usage_alert_cents\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://lazyapp.in/v1/platform/customers/{customer}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"external_id\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {},\n \"invoice_metadata\": {},\n \"spending_limit_cents\": 1,\n \"wallet_balance_cents\": 123,\n \"usage_alert_cents\": 1\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"name": "<string>",
"email": "<string>",
"status": "<string>",
"billing_mode": "inherit",
"metadata": {},
"invoice_metadata": {},
"spending_limit_cents": 123,
"wallet_balance_cents": 123,
"usage_alert_cents": 123,
"suspended_at": "2023-11-07T05:31:56Z",
"archived_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"connections": [
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phone_number_id": "<string>",
"waba_id": "<string>",
"display_phone_number": "<string>",
"verified_name": "<string>",
"status": "<string>",
"quality_rating": "<string>",
"mode": "live",
"is_default": true
}
],
"usage": {
"period": "<string>",
"messages": 123,
"total_charge": "<string>"
}
}{
"message": "<string>",
"code": "<string>"
}{
"message": "The API is on the Pro plan. Upgrade in Billing to use live keys. Test keys keep working.",
"code": "plan_limit_reached"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>"
}Authorizations
Your API key, e.g. sk_live_... or sk_test_....
Headers
Optional. Makes this write safe to retry: the same key replays the first response instead of acting twice.
255Path Parameters
Customer public id, e.g. cus_....
Body
markup_bps, pricing_mode, category_markups and platform_fee are deprecated. They are no longer stored or returned. A request that still sends them succeeds and the fields are ignored, because LazyApp adds nothing to Meta's rates, so there is no per-customer markup to set.
255191inherit, prepaid, postpaid x >= 0Prepaid balance in minor units, used when billing_mode is prepaid. It is debited only for sends LazyApp pays Meta for, at Meta's rate. Sends on numbers where Meta bills the business directly cost nothing here.
x >= 0Response
Updated.
markup_bps, pricing_mode, category_markups and platform_fee are deprecated. They are no longer stored or returned. A request that still sends them succeeds and the fields are ignored, because LazyApp adds nothing to Meta's rates, so there is no per-customer markup to set.
Public id, prefixed cus_.
inherit, prepaid, postpaid Prepaid balance in minor units, used when billing_mode is prepaid. It is debited only for sends LazyApp pays Meta for, at Meta's rate. Sends on numbers where Meta bills the business directly cost nothing here.
The customer's WhatsApp numbers in this key's mode, default first.
Show child attributes
Show child attributes
This calendar month's usage in this key's mode.
Show child attributes
Show child attributes