Get campaign
curl --request GET \
--url https://api.sendrealm.com/campaigns/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sendrealm.com/campaigns/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/campaigns/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"status": 123,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "<string>",
"channel": "email",
"targeting": {},
"from": {
"name": "<string>",
"address": "jsmith@example.com"
},
"reply_to_address": "jsmith@example.com",
"subject": "<string>",
"domain_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"audience_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"audiences": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"subscribed_contacts": 123
}
],
"tracking": {
"click_tracking": true,
"open_tracking": true
},
"include_unsubscribe_link": true,
"unsubscribe_link_type": "<string>",
"content": {},
"readiness": {
"ready": true,
"reasons": [
"<string>"
]
},
"is_editable": true,
"analytics": {
"recipients": 123,
"delivered": 123,
"opened": 123,
"clicked": 123,
"bounced": 123,
"complained": 123,
"unsubscribed": 123
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"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>"
}
]
}
}Campaigns
Retrieve And Update Campaign
Read campaign readiness and update an email campaign draft.
GET
/
campaigns
/
{id}
Get campaign
curl --request GET \
--url https://api.sendrealm.com/campaigns/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sendrealm.com/campaigns/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/campaigns/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"status": 123,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "<string>",
"channel": "email",
"targeting": {},
"from": {
"name": "<string>",
"address": "jsmith@example.com"
},
"reply_to_address": "jsmith@example.com",
"subject": "<string>",
"domain_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"audience_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"audiences": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"subscribed_contacts": 123
}
],
"tracking": {
"click_tracking": true,
"open_tracking": true
},
"include_unsubscribe_link": true,
"unsubscribe_link_type": "<string>",
"content": {},
"readiness": {
"ready": true,
"reasons": [
"<string>"
]
},
"is_editable": true,
"analytics": {
"recipients": 123,
"delivered": 123,
"opened": 123,
"clicked": 123,
"bounced": 123,
"complained": 123,
"unsubscribed": 123
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"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>"
}
]
}
}Endpoints
GET /campaigns/:idPATCH /campaigns/:id
from.address requires a verified domain in the current project; assigning audiences and a template version also requires them to belong to that project.
Update request
{
"subject": "A closer look at July",
"from": {
"name": "Sendrealm",
"address": "hello@example.com"
},
"audience_ids": ["018f4a28-29f0-7a2e-86c3-6a8f1b6dd294"],
"tracking": {
"open_tracking": true,
"click_tracking": true
},
"content": {
"type": "doc",
"content": []
}
}