Prepare audiences delete
curl --request POST \
--url https://api.sendrealm.com/audiences/actions/delete/prepare \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Sendrealm-Project-Id: <x-sendrealm-project-id>' \
--data '
{
"ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"automation_effects": "suppress"
}
'const options = {
method: 'POST',
headers: {
'X-Sendrealm-Project-Id': '<x-sendrealm-project-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'], automation_effects: 'suppress'})
};
fetch('https://api.sendrealm.com/audiences/actions/delete/prepare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/audiences/actions/delete/prepare"
payload = {
"ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"automation_effects": "suppress"
}
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": {
"prepared_action_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"operation": "contacts.delete",
"expires_at": "2023-11-07T05:31:56Z",
"effects": {
"resource_type": "contacts",
"selected": 1,
"related": {},
"automation_effects": "suppress",
"immediately_sends_messages": false,
"preserves_delivery_history": true,
"consequences": [
"<string>"
]
}
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}Agent data operations API
Prepare audiences delete
Opt-in imports/data rollout. Explicit project, current membership, role and scope are required. Preparations expire after ten minutes; execution rechecks authorization and resource versions and persists an idempotent receipt. Existing keys receive no new scopes.
POST
/
audiences
/
actions
/
delete
/
prepare
Prepare audiences delete
curl --request POST \
--url https://api.sendrealm.com/audiences/actions/delete/prepare \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Sendrealm-Project-Id: <x-sendrealm-project-id>' \
--data '
{
"ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"automation_effects": "suppress"
}
'const options = {
method: 'POST',
headers: {
'X-Sendrealm-Project-Id': '<x-sendrealm-project-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'], automation_effects: 'suppress'})
};
fetch('https://api.sendrealm.com/audiences/actions/delete/prepare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/audiences/actions/delete/prepare"
payload = {
"ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"automation_effects": "suppress"
}
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": {
"prepared_action_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"operation": "contacts.delete",
"expires_at": "2023-11-07T05:31:56Z",
"effects": {
"resource_type": "contacts",
"selected": 1,
"related": {},
"automation_effects": "suppress",
"immediately_sends_messages": false,
"preserves_delivery_history": true,
"consequences": [
"<string>"
]
}
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}Requires the opt-in imports/data rollout and an explicitly authorized project. See agent data workflows for review, idempotency, export pagination, and suppression safeguards.
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
Explicit owned resource IDs; select each once. For contacts, use contacts_list or lookup. No implicit all-records selection.
Required array length:
1 - 500 elementsSuppress automation effects by default. Trigger requires automations.trigger and the current automation-management capability.
Available options:
suppress, trigger