Python
import requests
url = 'https://api.minimo.it/public/v1/contacts/42'
headers = {'Authorization': 'Bearer {{BEARER_TOKEN}}', 'Content-Type': 'application/json'}
data = {'email': 'new-email@example.com'}
response = requests.put(url, json=data, headers=headers)
print(response.json())const response = await fetch('https://api.minimo.it/public/v1/contacts/42', {
method: 'PUT',
headers: {
'Authorization': 'Bearer {{BEARER_TOKEN}}',
'Content-Type': 'application/json'
},
body: JSON.stringify({ email: 'new-email@example.com' })
});
const result = await response.json();
console.log(result);curl --request PUT \
--url 'https://api.minimo.it/public/v1/contacts/42' \
--header 'Authorization: Bearer {{BEARER_TOKEN}}' \
--header 'Content-Type: application/json' \
--data '{"email": "new-email@example.com"}'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.minimo.it/public/v1/contacts/{id}",
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([
'email' => 'new-email@example.com'
]),
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://api.minimo.it/public/v1/contacts/{id}"
payload := strings.NewReader("{\n \"email\": \"new-email@example.com\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.minimo.it/public/v1/contacts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"new-email@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.minimo.it/public/v1/contacts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"new-email@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 42,
"email": "customer@example.com",
"phone": "+393391234567",
"status": "active",
"source": "API",
"source_type": "third_party",
"created_at": "2026-01-15T10:30:00Z",
"custom_fields": {},
"company": 123,
"deleted": false,
"external_id": "<string>",
"external_connection_id": 123
}
}{
"message": "Contact not found"
}Contacts
Update Contact by ID
Update an existing contact using their ID
PUT
/
public
/
v1
/
contacts
/
{id}
Python
import requests
url = 'https://api.minimo.it/public/v1/contacts/42'
headers = {'Authorization': 'Bearer {{BEARER_TOKEN}}', 'Content-Type': 'application/json'}
data = {'email': 'new-email@example.com'}
response = requests.put(url, json=data, headers=headers)
print(response.json())const response = await fetch('https://api.minimo.it/public/v1/contacts/42', {
method: 'PUT',
headers: {
'Authorization': 'Bearer {{BEARER_TOKEN}}',
'Content-Type': 'application/json'
},
body: JSON.stringify({ email: 'new-email@example.com' })
});
const result = await response.json();
console.log(result);curl --request PUT \
--url 'https://api.minimo.it/public/v1/contacts/42' \
--header 'Authorization: Bearer {{BEARER_TOKEN}}' \
--header 'Content-Type: application/json' \
--data '{"email": "new-email@example.com"}'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.minimo.it/public/v1/contacts/{id}",
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([
'email' => 'new-email@example.com'
]),
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://api.minimo.it/public/v1/contacts/{id}"
payload := strings.NewReader("{\n \"email\": \"new-email@example.com\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.minimo.it/public/v1/contacts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"new-email@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.minimo.it/public/v1/contacts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"new-email@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 42,
"email": "customer@example.com",
"phone": "+393391234567",
"status": "active",
"source": "API",
"source_type": "third_party",
"created_at": "2026-01-15T10:30:00Z",
"custom_fields": {},
"company": 123,
"deleted": false,
"external_id": "<string>",
"external_connection_id": 123
}
}{
"message": "Contact not found"
}Unlike the upsert endpoint which matches by email or phone, this endpoint
updates a specific contact by their ID. Use this when you need a deterministic update by ID — especially when changing
a contact’s email address.
When to Use This
| Scenario | Use this endpoint | Use upsert instead |
|---|---|---|
| Change a contact’s email | Yes | Only if phone number is also provided (upsert falls back to phone matching) |
| Update a known contact by ID | Yes | Either works |
| Create a new contact | No (returns 404) | Yes |
| Update by email/phone match | No | Yes |
How It Works
- Only provided fields are updated — omitted fields are preserved
- Custom fields are deep merged — existing custom fields not included in the request are kept
- Automations are triggered — field change detection and automation triggers work the same as upsert
- Soft-deleted contacts are restored — if the contact was deleted, it will be restored with the provided data
Marketing Consent
Update channel-specific marketing consent for a contact:{
"marketingConsent": {
"email": true,
"whatsapp": false
}
}
| Field | Type | Description |
|---|---|---|
email | boolean | Email marketing opt-in (true) or opt-out (false) |
whatsapp | boolean | WhatsApp marketing opt-in (true) or opt-out (false) |
Both fields are optional. Omitting a channel leaves its current consent status unchanged. Setting
true opts the
contact in, false opts them out.This endpoint does not create new contacts. If no contact exists with the given ID, a
404 error is returned.Example: Change a Contact’s Email
1
Look up the contact by email
curl --request GET \
--url 'https://api.minimo.it/public/v1/contacts/by-email/old@example.com' \
--header 'Authorization: Bearer mn-YOUR_CLIENT_ID-YOUR_API_KEY'
{ "data": { "id": 42, "email": "old@example.com", ... } }2
Update using the contact ID
curl --request PUT \
--url 'https://api.minimo.it/public/v1/contacts/42' \
--header 'Authorization: Bearer mn-YOUR_CLIENT_ID-YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{ "email": "new@example.com" }'
Common Errors
| Error | Cause | Solution |
|---|---|---|
not_found | No contact with this ID | Verify the contact ID |
unauthorized | Invalid API key | Verify API key in Authorization header |
Related Endpoints
- Get Contact by Email: Look up a contact’s ID by email
- Create or Update Contact: Upsert by email or phone
- Delete Contact: Soft-delete a contact
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Contact ID
Body
application/json
New email address
New phone number
Contact status
Contact source tag
Contact source type classification
Available options:
database, minimo, third_party Custom fields to update (merged with existing)
Channel-specific marketing consent preferences
Show child attributes
Show child attributes
Response
Contact updated
Show child attributes
Show child attributes