curl --request GET \
--url https://app.marro.si/api/v1/lead-fields \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.marro.si/api/v1/lead-fields', 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://app.marro.si/api/v1/lead-fields",
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;
}import requests
url = "https://app.marro.si/api/v1/lead-fields"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"items": [
{
"key": "preferred_time",
"label": "Preferred time to call",
"type": "select",
"section": "Preferences",
"storage": "custom",
"options": [
{
"value": "morning",
"label": "Morning"
},
{
"value": "evening",
"label": "Evening"
}
],
"requiredOnCreate": false,
"requiredOnEdit": false,
"showWhen": null
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}List lead fields
The organization’s active lead fields, its own custom fields included: their keys, types, options and whether each is required. Use the keys in fields when reading, writing and capturing leads. A leads.capture key may read this list too, to build a form. Fields an organization adds later appear here at once and are accepted straight away.
Scope: leads.read or leads.capture.
curl --request GET \
--url https://app.marro.si/api/v1/lead-fields \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.marro.si/api/v1/lead-fields', 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://app.marro.si/api/v1/lead-fields",
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;
}import requests
url = "https://app.marro.si/api/v1/lead-fields"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"items": [
{
"key": "preferred_time",
"label": "Preferred time to call",
"type": "select",
"section": "Preferences",
"storage": "custom",
"options": [
{
"value": "morning",
"label": "Morning"
},
{
"value": "evening",
"label": "Evening"
}
],
"requiredOnCreate": false,
"requiredOnEdit": false,
"showWhen": null
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Authorizations
An organization API key, created in Settings → Integrations → API keys. Keys start with mk_live_. Marro stores only a hash of a key, so it is shown once, when it is created: copy it then. Revoking a key ends its access at once. To replace a key without downtime, create the new one, switch your server to it, then revoke the old one. Changes made with a key appear on the lead’s timeline as made by the person who created the key, via the API. Scopes: objects.records.read (Read custom objects), objects.records.write (Create and update custom-object records), objects.records.delete (Delete custom-object records), leads.read (Read leads), leads.write (Create and update leads), leads.capture (Capture leads), crm.records.read (Read customers and opportunities), crm.records.write (Create and update customers and opportunities), reports.read (Read reports), money.read (Read products, quotes, invoices and payments), money.write (Create quotes and invoices and record payments), agent.tools (AI agent tools (MCP)).