Map excess fields for contact payload
curl --request POST \
--url https://your-instance.example.com/api/contact/map-excess-data \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceText": "Jane Doe, +1-416-555-0100, jane@example.com, lead from referral",
"existingSchema": {
"firstName": {
"type": "string"
},
"email": {
"type": "string"
},
"phoneNumber": {
"type": "string"
}
},
"mappedData": {
"firstName": "Jane",
"email": "jane@example.com",
"phoneNumber": "+14165550100"
},
"excessData": {
"note": "lead from referral"
}
}
'import requests
url = "https://your-instance.example.com/api/contact/map-excess-data"
payload = {
"sourceText": "Jane Doe, +1-416-555-0100, jane@example.com, lead from referral",
"existingSchema": {
"firstName": { "type": "string" },
"email": { "type": "string" },
"phoneNumber": { "type": "string" }
},
"mappedData": {
"firstName": "Jane",
"email": "jane@example.com",
"phoneNumber": "+14165550100"
},
"excessData": { "note": "lead from referral" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sourceText: 'Jane Doe, +1-416-555-0100, jane@example.com, lead from referral',
existingSchema: {
firstName: {type: 'string'},
email: {type: 'string'},
phoneNumber: {type: 'string'}
},
mappedData: {firstName: 'Jane', email: 'jane@example.com', phoneNumber: '+14165550100'},
excessData: {note: 'lead from referral'}
})
};
fetch('https://your-instance.example.com/api/contact/map-excess-data', 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://your-instance.example.com/api/contact/map-excess-data",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sourceText' => 'Jane Doe, +1-416-555-0100, jane@example.com, lead from referral',
'existingSchema' => [
'firstName' => [
'type' => 'string'
],
'email' => [
'type' => 'string'
],
'phoneNumber' => [
'type' => 'string'
]
],
'mappedData' => [
'firstName' => 'Jane',
'email' => 'jane@example.com',
'phoneNumber' => '+14165550100'
],
'excessData' => [
'note' => 'lead from referral'
]
]),
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://your-instance.example.com/api/contact/map-excess-data"
payload := strings.NewReader("{\n \"sourceText\": \"Jane Doe, +1-416-555-0100, jane@example.com, lead from referral\",\n \"existingSchema\": {\n \"firstName\": {\n \"type\": \"string\"\n },\n \"email\": {\n \"type\": \"string\"\n },\n \"phoneNumber\": {\n \"type\": \"string\"\n }\n },\n \"mappedData\": {\n \"firstName\": \"Jane\",\n \"email\": \"jane@example.com\",\n \"phoneNumber\": \"+14165550100\"\n },\n \"excessData\": {\n \"note\": \"lead from referral\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://your-instance.example.com/api/contact/map-excess-data")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sourceText\": \"Jane Doe, +1-416-555-0100, jane@example.com, lead from referral\",\n \"existingSchema\": {\n \"firstName\": {\n \"type\": \"string\"\n },\n \"email\": {\n \"type\": \"string\"\n },\n \"phoneNumber\": {\n \"type\": \"string\"\n }\n },\n \"mappedData\": {\n \"firstName\": \"Jane\",\n \"email\": \"jane@example.com\",\n \"phoneNumber\": \"+14165550100\"\n },\n \"excessData\": {\n \"note\": \"lead from referral\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/contact/map-excess-data")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sourceText\": \"Jane Doe, +1-416-555-0100, jane@example.com, lead from referral\",\n \"existingSchema\": {\n \"firstName\": {\n \"type\": \"string\"\n },\n \"email\": {\n \"type\": \"string\"\n },\n \"phoneNumber\": {\n \"type\": \"string\"\n }\n },\n \"mappedData\": {\n \"firstName\": \"Jane\",\n \"email\": \"jane@example.com\",\n \"phoneNumber\": \"+14165550100\"\n },\n \"excessData\": {\n \"note\": \"lead from referral\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Excess data mapped successfully"
}{
"success": false,
"message": "Contact not found",
"error": {
"code": "NOT_FOUND",
"message": "Contact not found"
}
}{
"success": false,
"message": "Contact not found",
"error": {
"code": "NOT_FOUND",
"message": "Contact not found"
}
}Contacts
Map excess fields for contact payload
Re-runs the AI lead-mapper on a contact’s misc (excess) data to promote previously-unmapped values to first-class fields. Never overwrites an existing firstName/lastName/email; persists the remaining excess fields back to misc.
POST
/
api
/
contact
/
map-excess-data
Map excess fields for contact payload
curl --request POST \
--url https://your-instance.example.com/api/contact/map-excess-data \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceText": "Jane Doe, +1-416-555-0100, jane@example.com, lead from referral",
"existingSchema": {
"firstName": {
"type": "string"
},
"email": {
"type": "string"
},
"phoneNumber": {
"type": "string"
}
},
"mappedData": {
"firstName": "Jane",
"email": "jane@example.com",
"phoneNumber": "+14165550100"
},
"excessData": {
"note": "lead from referral"
}
}
'import requests
url = "https://your-instance.example.com/api/contact/map-excess-data"
payload = {
"sourceText": "Jane Doe, +1-416-555-0100, jane@example.com, lead from referral",
"existingSchema": {
"firstName": { "type": "string" },
"email": { "type": "string" },
"phoneNumber": { "type": "string" }
},
"mappedData": {
"firstName": "Jane",
"email": "jane@example.com",
"phoneNumber": "+14165550100"
},
"excessData": { "note": "lead from referral" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sourceText: 'Jane Doe, +1-416-555-0100, jane@example.com, lead from referral',
existingSchema: {
firstName: {type: 'string'},
email: {type: 'string'},
phoneNumber: {type: 'string'}
},
mappedData: {firstName: 'Jane', email: 'jane@example.com', phoneNumber: '+14165550100'},
excessData: {note: 'lead from referral'}
})
};
fetch('https://your-instance.example.com/api/contact/map-excess-data', 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://your-instance.example.com/api/contact/map-excess-data",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sourceText' => 'Jane Doe, +1-416-555-0100, jane@example.com, lead from referral',
'existingSchema' => [
'firstName' => [
'type' => 'string'
],
'email' => [
'type' => 'string'
],
'phoneNumber' => [
'type' => 'string'
]
],
'mappedData' => [
'firstName' => 'Jane',
'email' => 'jane@example.com',
'phoneNumber' => '+14165550100'
],
'excessData' => [
'note' => 'lead from referral'
]
]),
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://your-instance.example.com/api/contact/map-excess-data"
payload := strings.NewReader("{\n \"sourceText\": \"Jane Doe, +1-416-555-0100, jane@example.com, lead from referral\",\n \"existingSchema\": {\n \"firstName\": {\n \"type\": \"string\"\n },\n \"email\": {\n \"type\": \"string\"\n },\n \"phoneNumber\": {\n \"type\": \"string\"\n }\n },\n \"mappedData\": {\n \"firstName\": \"Jane\",\n \"email\": \"jane@example.com\",\n \"phoneNumber\": \"+14165550100\"\n },\n \"excessData\": {\n \"note\": \"lead from referral\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://your-instance.example.com/api/contact/map-excess-data")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sourceText\": \"Jane Doe, +1-416-555-0100, jane@example.com, lead from referral\",\n \"existingSchema\": {\n \"firstName\": {\n \"type\": \"string\"\n },\n \"email\": {\n \"type\": \"string\"\n },\n \"phoneNumber\": {\n \"type\": \"string\"\n }\n },\n \"mappedData\": {\n \"firstName\": \"Jane\",\n \"email\": \"jane@example.com\",\n \"phoneNumber\": \"+14165550100\"\n },\n \"excessData\": {\n \"note\": \"lead from referral\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/contact/map-excess-data")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sourceText\": \"Jane Doe, +1-416-555-0100, jane@example.com, lead from referral\",\n \"existingSchema\": {\n \"firstName\": {\n \"type\": \"string\"\n },\n \"email\": {\n \"type\": \"string\"\n },\n \"phoneNumber\": {\n \"type\": \"string\"\n }\n },\n \"mappedData\": {\n \"firstName\": \"Jane\",\n \"email\": \"jane@example.com\",\n \"phoneNumber\": \"+14165550100\"\n },\n \"excessData\": {\n \"note\": \"lead from referral\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Excess data mapped successfully"
}{
"success": false,
"message": "Contact not found",
"error": {
"code": "NOT_FOUND",
"message": "Contact not found"
}
}{
"success": false,
"message": "Contact not found",
"error": {
"code": "NOT_FOUND",
"message": "Contact not found"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Raw lead text the AI mapper should re-parse into structured contact fields.
Field definitions describing the target schema the mapper should populate.
Already-mapped first-class fields; the server protects these from being overwritten when re-mapping.
Previously-unmapped key/value pairs (from misc) to re-evaluate for promotion to first-class fields.
Response
Mapped excess data
The response is of type object.
⌘I