Preview import
curl --request POST \
--url https://api.sendrealm.com/imports/{import_id}/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Sendrealm-Project-Id: <x-sendrealm-project-id>' \
--data '{}'const options = {
method: 'POST',
headers: {
'X-Sendrealm-Project-Id': '<x-sendrealm-project-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
};
fetch('https://api.sendrealm.com/imports/{import_id}/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/imports/{import_id}/preview"
payload = {}
headers = {
"X-Sendrealm-Project-Id": "<x-sendrealm-project-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": 123,
"data": {
"import_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"prepared_action_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"operation": "imports.commit",
"expires_at": "2023-11-07T05:31:56Z",
"counts": [
{
"status": "<string>",
"rows": 1
}
],
"sample": [
{
"row_number": 123,
"status": "<string>",
"error_code": "<string>",
"result": {
"action": "create",
"identity": "<string>",
"mapped": {},
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>",
"changes": [
"contacts_created"
]
}
}
],
"effects": {
"import_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"valid_rows": 1,
"invalid_rows": 1,
"automation_effects": "suppress",
"changes": {
"contacts_created": 1,
"contacts_updated": 1,
"properties_created": 1,
"audiences_created": 1,
"memberships_created": 1,
"memberships_updated": 1,
"subscriptions_created": 1,
"subscriptions_updated": 1
}
},
"changes": {
"contacts_created": 1,
"contacts_updated": 1,
"properties_created": 1,
"audiences_created": 1,
"memberships_created": 1,
"memberships_updated": 1,
"subscriptions_created": 1,
"subscriptions_updated": 1
}
}
}Agent import API
Preview import
POST
/
imports
/
{import_id}
/
preview
Preview import
curl --request POST \
--url https://api.sendrealm.com/imports/{import_id}/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Sendrealm-Project-Id: <x-sendrealm-project-id>' \
--data '{}'const options = {
method: 'POST',
headers: {
'X-Sendrealm-Project-Id': '<x-sendrealm-project-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
};
fetch('https://api.sendrealm.com/imports/{import_id}/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/imports/{import_id}/preview"
payload = {}
headers = {
"X-Sendrealm-Project-Id": "<x-sendrealm-project-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": 123,
"data": {
"import_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"prepared_action_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"operation": "imports.commit",
"expires_at": "2023-11-07T05:31:56Z",
"counts": [
{
"status": "<string>",
"rows": 1
}
],
"sample": [
{
"row_number": 123,
"status": "<string>",
"error_code": "<string>",
"result": {
"action": "create",
"identity": "<string>",
"mapped": {},
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>",
"changes": [
"contacts_created"
]
}
}
],
"effects": {
"import_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"valid_rows": 1,
"invalid_rows": 1,
"automation_effects": "suppress",
"changes": {
"contacts_created": 1,
"contacts_updated": 1,
"properties_created": 1,
"audiences_created": 1,
"memberships_created": 1,
"memberships_updated": 1,
"subscriptions_created": 1,
"subscriptions_updated": 1
}
},
"changes": {
"contacts_created": 1,
"contacts_updated": 1,
"properties_created": 1,
"audiences_created": 1,
"memberships_created": 1,
"memberships_updated": 1,
"subscriptions_created": 1,
"subscriptions_updated": 1
}
}
}Requires a scoped personal key, explicit project selection, and current role authorization. See Agent imports for validation, consent, preparation, and recovery.
Authorizations
Integration key for backend workloads, or a scoped personal key (sr_user_) for account discovery and supported project operations. MCP accepts only personal keys.
Headers
Path Parameters
Body
application/json
The body is of type object.