Create campaign draft
curl --request POST \
--url https://api.sendrealm.com/campaigns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://api.sendrealm.com/campaigns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/campaigns"
payload = { "name": "<string>" }
headers = {
"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",
"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
Create And List Campaigns
Create email campaign drafts and list existing campaigns.
POST
/
campaigns
Create campaign draft
curl --request POST \
--url https://api.sendrealm.com/campaigns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://api.sendrealm.com/campaigns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/campaigns"
payload = { "name": "<string>" }
headers = {
"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",
"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
POST /campaignsGET /campaigns
Create request
{
"name": "July product update"
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Required string length:
1 - 120⌘I