Update campaign draft
curl --request PATCH \
--url https://api.sendrealm.com/campaigns/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"subject": "<string>",
"reply_to_address": "jsmith@example.com",
"audience_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"template_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tracking": {},
"include_unsubscribe_link": true,
"content": {}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
subject: '<string>',
reply_to_address: 'jsmith@example.com',
audience_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
template_version_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
tracking: {},
include_unsubscribe_link: true,
content: {}
})
};
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}"
payload = {
"name": "<string>",
"subject": "<string>",
"reply_to_address": "jsmith@example.com",
"audience_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"template_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tracking": {},
"include_unsubscribe_link": True,
"content": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(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>"
}
]
}
}{
"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
Update Campaign
Update metadata, sender, audiences, a published template version, tracking, or editor content. Only draft campaigns are editable; a sender must use a verified project domain.
PATCH
/
campaigns
/
{id}
Update campaign draft
curl --request PATCH \
--url https://api.sendrealm.com/campaigns/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"subject": "<string>",
"reply_to_address": "jsmith@example.com",
"audience_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"template_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tracking": {},
"include_unsubscribe_link": true,
"content": {}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
subject: '<string>',
reply_to_address: 'jsmith@example.com',
audience_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
template_version_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
tracking: {},
include_unsubscribe_link: true,
content: {}
})
};
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}"
payload = {
"name": "<string>",
"subject": "<string>",
"reply_to_address": "jsmith@example.com",
"audience_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"template_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tracking": {},
"include_unsubscribe_link": True,
"content": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(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>"
}
]
}
}{
"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>"
}
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Maximum string length:
120Maximum string length:
998Show child attributes
Show child attributes
Available options:
included_audiences, all_audiences Show child attributes
Show child attributes
⌘I