Create import
curl --request POST \
--url https://api.sendrealm.com/imports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Sendrealm-Project-Id: <x-sendrealm-project-id>' \
--data '
{
"idempotency_key": "<string>",
"file_name": "<string>",
"worksheet": "<string>",
"mapping": [
{
"source": "<string>",
"target": "<string>",
"clear_empty": false
}
],
"audience_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"topic_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"consent": "none",
"automation_effects": "suppress",
"strict": false,
"delimiter": ","
}
'const options = {
method: 'POST',
headers: {
'X-Sendrealm-Project-Id': '<x-sendrealm-project-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
idempotency_key: '<string>',
file_name: '<string>',
worksheet: '<string>',
mapping: [{source: '<string>', target: '<string>', clear_empty: false}],
audience_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
topic_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
consent: 'none',
automation_effects: 'suppress',
strict: false,
delimiter: ','
})
};
fetch('https://api.sendrealm.com/imports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/imports"
payload = {
"idempotency_key": "<string>",
"file_name": "<string>",
"worksheet": "<string>",
"mapping": [
{
"source": "<string>",
"target": "<string>",
"clear_empty": False
}
],
"audience_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"topic_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"consent": "none",
"automation_effects": "suppress",
"strict": False,
"delimiter": ","
}
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": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "contacts",
"format": "csv",
"status": "<string>",
"total_rows": 1,
"validated_rows": 1,
"applied_rows": 1,
"failed_rows": 1,
"skipped_rows": 1,
"automation_effects": "suppress",
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"poll_after_ms": 123,
"error_code": "<string>",
"upload_handoff": {
"url": "<string>",
"authentication_required": true,
"expires_at": "2023-11-07T05:31:56Z"
}
}
}Agent import API
Create import
POST
/
imports
Create import
curl --request POST \
--url https://api.sendrealm.com/imports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Sendrealm-Project-Id: <x-sendrealm-project-id>' \
--data '
{
"idempotency_key": "<string>",
"file_name": "<string>",
"worksheet": "<string>",
"mapping": [
{
"source": "<string>",
"target": "<string>",
"clear_empty": false
}
],
"audience_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"topic_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"consent": "none",
"automation_effects": "suppress",
"strict": false,
"delimiter": ","
}
'const options = {
method: 'POST',
headers: {
'X-Sendrealm-Project-Id': '<x-sendrealm-project-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
idempotency_key: '<string>',
file_name: '<string>',
worksheet: '<string>',
mapping: [{source: '<string>', target: '<string>', clear_empty: false}],
audience_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
topic_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
consent: 'none',
automation_effects: 'suppress',
strict: false,
delimiter: ','
})
};
fetch('https://api.sendrealm.com/imports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/imports"
payload = {
"idempotency_key": "<string>",
"file_name": "<string>",
"worksheet": "<string>",
"mapping": [
{
"source": "<string>",
"target": "<string>",
"clear_empty": False
}
],
"audience_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"topic_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"consent": "none",
"automation_effects": "suppress",
"strict": False,
"delimiter": ","
}
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": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "contacts",
"format": "csv",
"status": "<string>",
"total_rows": 1,
"validated_rows": 1,
"applied_rows": 1,
"failed_rows": 1,
"skipped_rows": 1,
"automation_effects": "suppress",
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"poll_after_ms": 123,
"error_code": "<string>",
"upload_handoff": {
"url": "<string>",
"authentication_required": true,
"expires_at": "2023-11-07T05:31:56Z"
}
}
}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
Body
application/json
Available options:
contacts, properties, audiences, memberships, topic_subscriptions Available options:
csv, xlsx, json, ndjson, batches Required string length:
8 - 160Required string length:
1 - 255Required for Excel; exact worksheet name.
Required string length:
1 - 100Maximum array length:
100Show child attributes
Show child attributes
Available options:
none, asserted Available options:
suppress, trigger Available options:
,, ;,