Update a contact
curl --request PUT \
--url https://api.leanpay.fr/v1/public/contacts/{contactId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Madame",
"firstName": "Adeline",
"lastName": "Martin",
"email": "adeline.martin@acme.com",
"phoneNumber": "+33 1 84 80 12 34",
"mobilePhoneNumber": "+33 6 12 34 56 78",
"externalId": "CON-0042",
"main": true
}
'import requests
url = "https://api.leanpay.fr/v1/public/contacts/{contactId}"
payload = {
"title": "Madame",
"firstName": "Adeline",
"lastName": "Martin",
"email": "adeline.martin@acme.com",
"phoneNumber": "+33 1 84 80 12 34",
"mobilePhoneNumber": "+33 6 12 34 56 78",
"externalId": "CON-0042",
"main": True
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Madame',
firstName: 'Adeline',
lastName: 'Martin',
email: 'adeline.martin@acme.com',
phoneNumber: '+33 1 84 80 12 34',
mobilePhoneNumber: '+33 6 12 34 56 78',
externalId: 'CON-0042',
main: true
})
};
fetch('https://api.leanpay.fr/v1/public/contacts/{contactId}', 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.leanpay.fr/v1/public/contacts/{contactId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Madame',
'firstName' => 'Adeline',
'lastName' => 'Martin',
'email' => 'adeline.martin@acme.com',
'phoneNumber' => '+33 1 84 80 12 34',
'mobilePhoneNumber' => '+33 6 12 34 56 78',
'externalId' => 'CON-0042',
'main' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.leanpay.fr/v1/public/contacts/{contactId}"
payload := strings.NewReader("{\n \"title\": \"Madame\",\n \"firstName\": \"Adeline\",\n \"lastName\": \"Martin\",\n \"email\": \"adeline.martin@acme.com\",\n \"phoneNumber\": \"+33 1 84 80 12 34\",\n \"mobilePhoneNumber\": \"+33 6 12 34 56 78\",\n \"externalId\": \"CON-0042\",\n \"main\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.put("https://api.leanpay.fr/v1/public/contacts/{contactId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Madame\",\n \"firstName\": \"Adeline\",\n \"lastName\": \"Martin\",\n \"email\": \"adeline.martin@acme.com\",\n \"phoneNumber\": \"+33 1 84 80 12 34\",\n \"mobilePhoneNumber\": \"+33 6 12 34 56 78\",\n \"externalId\": \"CON-0042\",\n \"main\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.leanpay.fr/v1/public/contacts/{contactId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Madame\",\n \"firstName\": \"Adeline\",\n \"lastName\": \"Martin\",\n \"email\": \"adeline.martin@acme.com\",\n \"phoneNumber\": \"+33 1 84 80 12 34\",\n \"mobilePhoneNumber\": \"+33 6 12 34 56 78\",\n \"externalId\": \"CON-0042\",\n \"main\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "2e97b9eb-334e-4d6c-a9f0-2bbf7069826e",
"tenantId": "344ca963-6bf0-4bbb-b00f-3e377e5dc358",
"clientId": "9bfc607e-4e58-4f4e-a93b-cd934958933f",
"title": "Madame",
"firstName": "Adeline",
"lastName": "Martin",
"email": "adeline.martin@acme.com",
"phoneNumber": "+33 1 84 80 12 34",
"mobilePhoneNumber": "+33 6 12 34 56 78",
"externalId": "CON-0042",
"main": true,
"createdAt": "2026-03-12T09:41:27.000Z",
"updatedAt": "2026-10-06T08:00:12.000Z"
}contacts
Update a contact
Update the contact. The update is partial: a field left out keeps its value.
No field is required. null clears the field, except main: main: null is ignored.
PUT
/
contacts
/
{contactId}
Update a contact
curl --request PUT \
--url https://api.leanpay.fr/v1/public/contacts/{contactId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Madame",
"firstName": "Adeline",
"lastName": "Martin",
"email": "adeline.martin@acme.com",
"phoneNumber": "+33 1 84 80 12 34",
"mobilePhoneNumber": "+33 6 12 34 56 78",
"externalId": "CON-0042",
"main": true
}
'import requests
url = "https://api.leanpay.fr/v1/public/contacts/{contactId}"
payload = {
"title": "Madame",
"firstName": "Adeline",
"lastName": "Martin",
"email": "adeline.martin@acme.com",
"phoneNumber": "+33 1 84 80 12 34",
"mobilePhoneNumber": "+33 6 12 34 56 78",
"externalId": "CON-0042",
"main": True
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Madame',
firstName: 'Adeline',
lastName: 'Martin',
email: 'adeline.martin@acme.com',
phoneNumber: '+33 1 84 80 12 34',
mobilePhoneNumber: '+33 6 12 34 56 78',
externalId: 'CON-0042',
main: true
})
};
fetch('https://api.leanpay.fr/v1/public/contacts/{contactId}', 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.leanpay.fr/v1/public/contacts/{contactId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Madame',
'firstName' => 'Adeline',
'lastName' => 'Martin',
'email' => 'adeline.martin@acme.com',
'phoneNumber' => '+33 1 84 80 12 34',
'mobilePhoneNumber' => '+33 6 12 34 56 78',
'externalId' => 'CON-0042',
'main' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.leanpay.fr/v1/public/contacts/{contactId}"
payload := strings.NewReader("{\n \"title\": \"Madame\",\n \"firstName\": \"Adeline\",\n \"lastName\": \"Martin\",\n \"email\": \"adeline.martin@acme.com\",\n \"phoneNumber\": \"+33 1 84 80 12 34\",\n \"mobilePhoneNumber\": \"+33 6 12 34 56 78\",\n \"externalId\": \"CON-0042\",\n \"main\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.put("https://api.leanpay.fr/v1/public/contacts/{contactId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Madame\",\n \"firstName\": \"Adeline\",\n \"lastName\": \"Martin\",\n \"email\": \"adeline.martin@acme.com\",\n \"phoneNumber\": \"+33 1 84 80 12 34\",\n \"mobilePhoneNumber\": \"+33 6 12 34 56 78\",\n \"externalId\": \"CON-0042\",\n \"main\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.leanpay.fr/v1/public/contacts/{contactId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Madame\",\n \"firstName\": \"Adeline\",\n \"lastName\": \"Martin\",\n \"email\": \"adeline.martin@acme.com\",\n \"phoneNumber\": \"+33 1 84 80 12 34\",\n \"mobilePhoneNumber\": \"+33 6 12 34 56 78\",\n \"externalId\": \"CON-0042\",\n \"main\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "2e97b9eb-334e-4d6c-a9f0-2bbf7069826e",
"tenantId": "344ca963-6bf0-4bbb-b00f-3e377e5dc358",
"clientId": "9bfc607e-4e58-4f4e-a93b-cd934958933f",
"title": "Madame",
"firstName": "Adeline",
"lastName": "Martin",
"email": "adeline.martin@acme.com",
"phoneNumber": "+33 1 84 80 12 34",
"mobilePhoneNumber": "+33 6 12 34 56 78",
"externalId": "CON-0042",
"main": true,
"createdAt": "2026-03-12T09:41:27.000Z",
"updatedAt": "2026-10-06T08:00:12.000Z"
}Body
application/json
Response
The updated contact.
