Which of these values the workspace already holds, so a paid step (Apollo enrichment) is not asked about people already imported.
Body: {space_id, entity: "contacts" | "businesses", field, values}. field is email (contacts), domain (businesses) or a custom field's key or name (for example the field an import stores Apollo's person id in). Up to 500 values. Answers ``{existing: [the values found, in the order sent], checked, field}``; nothing is written.
Cost: email and domain are read within the workspace (the space index), compared case-insensitively. A custom field is read through the value table's custom_field index, so the database reads every stored value of THAT one field in the organization and compares them; that is linear in how many records carry the field, not a scan of all values. A (custom_field, value) index would make it a direct lookup.
URL
- User APIhttps://sales.mattering.io/api/user/v1/records/existing/
- Service tierhttps://sales.mattering.io/api/internal/records/existing/
Body keys (JSON)
| Key | Required | Default |
|---|---|---|
entity | optional or conditional | none |
field | optional or conditional | none |
space_id | optional or conditional | none |
values | optional or conditional | none |
Keys the view reads. A key not in this list is ignored by the view, silently. Where a key is required only for some actions (for example the action dispatch), the description above says which.
Responses
200 data and meta envelope
{
"data": {
"entity": "contacts",
"field": "...",
"existing": [
"..."
],
"checked": 0
}
}
Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).
Errors
| Status | Code |
|---|---|
| 400 | invalid_value |
| 400 | missing_field |
| 400 | too_many_values |
| 401 | unauthorized |
| 404 | field_not_found |
| 404 | space_not_found_or_forbidden |
Example
curl -X POST "https://sales.mattering.io/api/user/v1/records/existing/" \
-H "Authorization: Bearer $MATTERING_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entity": "...",
"field": "...",
"space_id": "...",
"values": "..."
}'curl -X POST "https://sales.mattering.io/api/internal/records/existing/" \
-H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
-H "X-Internal-Org-Id: $ORG_ID" \
-H "X-Internal-User-Email: you@example.com" \
-H "Content-Type: application/json" \
-d '{
"entity": "...",
"field": "...",
"space_id": "...",
"values": "..."
}'
Source: CRMCore/internal_api.py (internal_api.existing_records)