PATCH /accounts/external-ids
Bulk writes your system’s external IDs into existing Recotap accounts, matched by domain. Max 100 mappings per request. Designed for the initial ID backfill. Use List Unmapped Accounts first to identify which accounts need IDs, then call this endpoint to write them all in one pass.
curl -X PATCH "https://eapi.recotap.com/api/v1/accounts/external-ids" \
-H "X-Api-Key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"mappings": [
{ "domain": "acme.com", "externalId": "crm-001" },
{ "domain": "globex.com", "externalId": "crm-002" }
]
}'
Request body
| Field | Type | Required | Description |
|---|
mappings | array | Yes | Min 1, max 100 mapping objects |
Mapping object
| Field | Type | Required | Description |
|---|
domain | string | Yes | Domain used to match the Recotap account e.g. "acme.com" |
externalId | string | Yes | Your system’s unique ID to write onto the matched account e.g. "crm-001" |
Response data
{
"matched": 2,
"updated": 2,
"notFound": []
}
| Field | Type | Description |
|---|
matched | number | Accounts found by domain |
updated | number | Accounts successfully written |
notFound | string[] | Domains that did not match any Recotap account e.g. ["unknown.com"] |
Existing externalId values are overwritten without warning. If the same domain appears more than once in the request, the last mapping takes precedence.