Python
import requests
url = 'https://api.minimo.it/public/v1/contacts/by-email/customer@example.com'
headers = {'Authorization': 'Bearer {{BEARER_TOKEN}}'}
response = requests.get(url, headers=headers)
print(response.json())const response = await fetch(
'https://api.minimo.it/public/v1/contacts/by-email/customer@example.com',
{ headers: { 'Authorization': 'Bearer {{BEARER_TOKEN}}' } }
);
const contact = await response.json();
console.log(contact);curl --request GET \
--url 'https://api.minimo.it/public/v1/contacts/by-email/customer@example.com' \
--header 'Authorization: Bearer {{BEARER_TOKEN}}'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.minimo.it/public/v1/contacts/by-email/{email}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.minimo.it/public/v1/contacts/by-email/{email}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.minimo.it/public/v1/contacts/by-email/{email}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.minimo.it/public/v1/contacts/by-email/{email}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"email": "<string>",
"phone": "<string>",
"status": "<string>",
"source": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"custom_fields": {},
"company": 123,
"deleted": true,
"external_id": "<string>",
"external_connection_id": 123
}
}{
"message": "<string>"
}Contacts
Get Contact by Email
Retrieve a contact and all its data by email address
GET
/
public
/
v1
/
contacts
/
by-email
/
{email}
Python
import requests
url = 'https://api.minimo.it/public/v1/contacts/by-email/customer@example.com'
headers = {'Authorization': 'Bearer {{BEARER_TOKEN}}'}
response = requests.get(url, headers=headers)
print(response.json())const response = await fetch(
'https://api.minimo.it/public/v1/contacts/by-email/customer@example.com',
{ headers: { 'Authorization': 'Bearer {{BEARER_TOKEN}}' } }
);
const contact = await response.json();
console.log(contact);curl --request GET \
--url 'https://api.minimo.it/public/v1/contacts/by-email/customer@example.com' \
--header 'Authorization: Bearer {{BEARER_TOKEN}}'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.minimo.it/public/v1/contacts/by-email/{email}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.minimo.it/public/v1/contacts/by-email/{email}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.minimo.it/public/v1/contacts/by-email/{email}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.minimo.it/public/v1/contacts/by-email/{email}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"email": "<string>",
"phone": "<string>",
"status": "<string>",
"source": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"custom_fields": {},
"company": 123,
"deleted": true,
"external_id": "<string>",
"external_connection_id": 123
}
}{
"message": "<string>"
}Use this endpoint to look up a contact’s ID, then use Update by
ID to modify it — for example, to change the contact’s email
address.
Use Cases
- Look up contact ID: Find a contact’s internal ID to use with other endpoints
- Check if contact exists: Verify whether an email is already in your contact list
- Read contact data: Retrieve full contact details including custom fields
Response
Returns the full contact object:{
"data": {
"id": 42,
"email": "customer@example.com",
"phone": "+393391234567",
"status": "active",
"source": "API",
"custom_fields": {
"company": "Acme Corp",
"plan": "enterprise"
},
"company": 1,
"deleted": false,
"external_id": null,
"external_connection_id": null
}
}
Soft-deleted contacts are not returned — a
404 is returned instead.Common Errors
| Error | Cause | Solution |
|---|---|---|
bad_request | Invalid email format | Ensure the email address is valid |
not_found | No contact with this email | Check the email address |
unauthorized | Invalid API key | Verify API key in Authorization header |
Example: Look Up and Update a Contact
const API_URL = 'https://api.minimo.it/public/v1/contacts';
const headers = {
Authorization: 'Bearer mn-YOUR_CLIENT_ID-YOUR_API_KEY',
'Content-Type': 'application/json',
};
// Step 1: Get the contact by email
const email = 'customer@example.com';
const contact = await fetch(`${API_URL}/by-email/${encodeURIComponent(email)}`, { headers }).then((res) => res.json());
// Step 2: Update the contact by ID (e.g., change email)
await fetch(`${API_URL}/${contact.data.id}`, {
method: 'PUT',
headers,
body: JSON.stringify({ email: 'new-email@example.com' }),
});
Related Endpoints
- Create or Update Contact: Upsert a contact by email or phone
- Update Contact by ID: Update a specific contact
- Delete Contact: Soft-delete a contact
⌘I