Attach a contact to an audience
curl --request POST \
--url https://api.sendrealm.com/contacts/{contact_id}/audiences/{audience_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sendrealm.com/contacts/{contact_id}/audiences/{audience_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/contacts/{contact_id}/audiences/{audience_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"status": 123,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"audience_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_subscribed": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"error": null,
"metadata": null
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}Contacts
Attach Contact to Audience
POST
/
contacts
/
{contact_id}
/
audiences
/
{audience_id}
Attach a contact to an audience
curl --request POST \
--url https://api.sendrealm.com/contacts/{contact_id}/audiences/{audience_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sendrealm.com/contacts/{contact_id}/audiences/{audience_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/contacts/{contact_id}/audiences/{audience_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"status": 123,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"audience_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_subscribed": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"error": null,
"metadata": null
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
⌘I