Channels
01. List channels
Get a list of channels accessible to the token user. Items are return in reverse chronological order (newest first).
GET /int/v1/channel
Headers - Header
| Name | Type | Description |
|---|---|---|
| Authorization | String | Prefix with "Bearer ". Token value (either Access Key from Admin Console or access_token via OAuth result). |
Examples
CURL Example:
curl -H "Authorization: Bearer <token>" \
-X GET https://<url>/int/v1/channel
Javascript Example:
try {
const url = process.env.URL;
const token = process.env.TOKEN;
const options = {
method: 'GET',
headers: {
Authorization: `Bearer ${token}`
}
};
const response = await fetch(`https://${url}/int/v1/channel`, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
Success response
Success response - Success 200
| Name | Type | Description |
|---|---|---|
| success | Boolean | Indicates whether the operation was successful. |
| data | Array | optionalList of broadcast objects. Present when success is true. |
| message | String | optionalError message. Present when success is false. |
Success response example
Success response example - Success:
HTTP/1.1 200 OK
{
"success": true,
"data": [
{
"_id": "65ae09d15b7abfedfcf32162",
"aDate": "2024-01-22T06:23:13.535Z",
"mDate": "2024-02-16T05:49:56.874Z",
"status": "1",
"name": "My channel",
"description": "My channel",
"title": "My channel",
"paused": false,
"sharedUsers": [
{
"_id": "615e4b9c2afe5dface7d619b",
"displayName": "John Smith",
"email": "john@communic8.com"
}
],
"sharedGroups": [],
"defaults": {
"enableEmail": true,
"enablePushNotification": true
},
"ownerId": {
"_id": "615e4b9c2afe5dface7d619b",
"displayName": "John Smith",
"firstName": "John",
"lastName": "Smith",
"email": "john@communic8.com"
}
}
],
"total": 1
}
Success response example - Error:
HTTP/1.1 200 OK
{
"success": false,
"message": "Invalid parameters"
}
02. Get a channel
Get the details of an individual channel.
GET /int/v1/channel/:id
Headers - Header
| Name | Type | Description |
|---|---|---|
| Authorization | String | Prefix with "Bearer ". Token value (either Access Key from Admin Console or access_token via OAuth result). |
Parameters - Parameter
| Name | Type | Description |
|---|---|---|
| id | String | Channel record ID |
Examples
CURL Example:
curl --request GET \
--url https://<url>/int/v1/channel/<id> \
--header 'Authorization: Bearer <token>'
Javascript Example:
try {
const url = process.env.URL;
const token = process.env.TOKEN;
const id = process.env.CHANNEL_ID
const options = {
method: 'GET',
headers: {
Authorization: `Bearer ${token}`
}
};
const response = await fetch(`https://${url}/int/v1/channel/${id}`, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
Success response example
Success response example - Success:
HTTP/1.1 200 OK
{
"success": true,
"data": {
"_id": "661cab3b1dfc1d70512685cc",
"aDate": "2024-04-15T04:21:15.120Z",
"mDate": "2024-06-21T02:03:33.595Z",
"status": "3",
"name": "My channel",
"description": "My channel",
"title": "My channel",
"paused": false,
"pinned": false,
"sharedUsers": [
{
"_id": "615e4b9c2afe5dface7d619b",
"displayName": "John Smith",
"email": "john@communic8.com"
}
],
"sharedGroups": [],
"defaults": {
"enableEmail": true,
"enablePushNotification": false,
"enableComments": false,
"commentVisibility": "1"
},
"ownerId": {
"_id": "615e4b9c2afe5dface7d619b",
"displayName": "John Smith",
"firstName": "John",
"lastName": "Smith",
"email": "john@communic8.com"
}
}
}
Success response example - Error:
HTTP/1.1 200 OK
{
"success": false,
"message": "Invalid parameters"
}
03. Create a channel
Create a new channel.
POST /int/v1/channel
Headers - Header
| Name | Type | Description |
|---|---|---|
| Authorization | String | Prefix with "Bearer ". Token value (either Access Key from Admin Console or access_token via OAuth result). |
Request Body
| Name | Type | Description |
|---|---|---|
| name | String | optional channel name |
| title | String | optional channel title |
| description | String | optional channel description |
| defaults | Object | optional default settings for campaigns and broadcasts created in this channel |
| defaults.template | String | optional The default template record ID for campaigns created in this channel |
| defaults.enableEmail | Boolean | optional New campaigns and broadcasts created in this channel will default to email sending enabled_Default value: true_ |
| defaults.enableSms | Boolean | optional New campaigns and broadcasts created in this channel will default to SMS sending enabled_Default value: true_ |
| defaults.enableAppNotification | Boolean | optional New campaigns and broadcasts created in this channel will default to mobile app notifications enabled_Default value: true_ |
| defaults.enableComment | Boolean | optional New campaigns and broadcasts created in this channel will default to comments enabled_Default value: false_ |
| defaults.commentVisibility | String | optional New campaigns and broadcasts created in this channel will default to comments visible to all users (when comments enabled). "0" for comments only visible to campaign team, "1" for comments also visible to other recipeints in the campaign_Default value: 1_ Allowed values: "0","1" |
Examples
CURL Example:
curl --request POST \
--url https://<url>/int/v1/channel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "My channel name",
"title": "My channel title",
"description": "My channel description",
"defaults": {
"template": "62a7b72187ce0b222948d465",
"enableEmail": true,
"enablePushNotification": true,
"enableComments": true,
"commentVisibility": "1"
}
}'
Javascript Example:
try {
const url = process.env.URL;
const token = process.env.TOKEN;
const options = {
method: 'POST',
headers: {
Authorization: `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"name": "My channel name",
"title": "My channel title",
"description": "My channel description",
"defaults": {
"template": "62a7b72187ce0b222948d465",
"enableEmail": true,
"enablePushNotification": true,
"enableComments": true,
"commentVisibility": "1"
}
})
};
const response = await fetch(`https://${url}/int/v1/channel/661cab3b1dfc1d70512685cc`, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
Success response example
Success response example - Success:
HTTP/1.1 200 OK
{
"success": true,
"data": {
"_id": "667a5eb0913081c045d6fcd8",
"aDate": "2024-06-25T05:46:57.402Z",
"mDate": "2024-06-25T05:46:57.402Z",
"status": "1",
"sharedUsers": [
{
"_id": "615e4b9c2afe5dface7d619b",
"displayName": "John Smith",
"email": "john@communic8.com"
}
],
"adminIds": [
"615e4b9c2afe5dface7d619b"
],
"name": "My channel name",
"description": "My channel description",
"title": "My channel name",
"paused": false,
"pinned": false,
"sharedGroups": [],
"defaults": {
"template": "62a7b72187ce0b222948d465",
"enableEmail": true,
"enablePushNotification": true,
"enableComments": true,
"commentVisibility": "1"
},
"ownerId": {
"_id": "615e4b9c2afe5dface7d619b",
"displayName": "John Smith",
"firstName": "John",
"lastName": "Smith",
"email": "john@communic8.com"
}
}
}
Success response example - Error:
HTTP/1.1 200 OK
{
"success": false,
"message": "Invalid parameters"
}
04. Restore an archived channel
Restore an archived channel.
POST /int/v1/channel/:id/restore
Headers - Header
| Name | Type | Description |
|---|---|---|
| Authorization | String | Prefix with "Bearer ". Token value (either Access Key from Admin Console or access_token via OAuth result). |
Parameters - Parameter
| Name | Type | Description |
|---|---|---|
| id | String | Channel record ID |
Examples
CURL Example:
curl --request POST \
--url https://<url>/int/v1/channel/<id>/restore \
--header 'Authorization: Bearer <token>'
}'
Javascript Example:
try {
const url = process.env.URL;
const token = process.env.TOKEN;
const id = process.env.CHANNEL_ID;
const options = {
method: 'POST',
headers: {
Authorization: `Bearer ${token}`
}
};
const response = await fetch(`https://${url}/int/v1/channel/${id}/restore`, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
Success response example
Success response example - Success:
HTTP/1.1 200 OK
{
"success": true,
"data": {
"_id": "667a5eb0913081c045d6fcd8",
"aDate": "2024-06-25T05:46:57.402Z",
"mDate": "2024-06-25T05:46:57.402Z",
"status": "1",
"sharedUsers": [
{
"_id": "615e4b9c2afe5dface7d619b",
"displayName": "John Smith",
"email": "john@communic8.com"
}
],
"adminIds": [
"615e4b9c2afe5dface7d619b"
],
"name": "My channel name",
"description": "My channel description",
"title": "My channel name",
"paused": true,
"pinned": false,
"sharedGroups": [],
"defaults": {
"template": "62a7b72187ce0b222948d465",
"enableEmail": true,
"enablePushNotification": true,
"enableComments": true,
"commentVisibility": "1"
},
"ownerId": {
"_id": "615e4b9c2afe5dface7d619b",
"displayName": "John Smith",
"firstName": "John",
"lastName": "Smith",
"email": "john@communic8.com"
}
}
}
Success response example - Error:
HTTP/1.1 200 OK
{
"success": false,
"message": "Invalid parameters"
}
05. Update a channel
Update an existing channel.
PUT /int/v1/channel/:id
Headers - Header
| Name | Type | Description |
|---|---|---|
| Authorization | String | Prefix with "Bearer ". Token value (either Access Key from Admin Console or access_token via OAuth result). |
Parameters - Parameter
| Name | Type | Description |
|---|---|---|
| id | String | Channel record ID |
Request Body
| Name | Type | Description |
|---|---|---|
| name | String | optional channel name |
| title | String | optional channel title |
| description | String | optional channel description |
| defaults | Object | optional default settings for campaigns and broadcasts created in this channel |
| defaults.template | String | optional The default template record ID for campaigns created in this channel |
| defaults.enableEmail | Boolean | optional New campaigns and broadcasts created in this channel will default to email sending enabled_Default value: true_ |
| defaults.enableSms | Boolean | optional New campaigns and broadcasts created in this channel will default to SMS sending enabled_Default value: true_ |
| defaults.enableAppNotification | Boolean | optional New campaigns and broadcasts created in this channel will default to mobile app notifications enabled_Default value: true_ |
| defaults.enableComment | Boolean | optional New campaigns and broadcasts created in this channel will default to comments enabled_Default value: false_ |
| defaults.commentVisibility | String | optional New campaigns and broadcasts created in this channel will default to comments visible to all users (when comments enabled). "0" for comments only visible to campaign team, "1" for comments also visible to other recipeints in the campaign_Default value: 1_ Allowed values: "0","1" |
Examples
CURL Example:
curl --request PUT \
--url https://<url>/int/v1/channel<id> \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "My updated channel name",
"defaults": {
"enableEmail": false
}
}'
Javascript Example:
try {
const url = process.env.URL;
const token = process.env.TOKEN;
const id = process.env.CHANNEL_ID;
const options = {
method: 'PUT',
headers: {
Authorization: `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"name": "My updated channel name",
"defaults": {
"enableEmail": false
}
})
};
const response = await fetch(`https://${url}/int/v1/channel/${id}`, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
Success response example
Success response example - Success:
HTTP/1.1 200 OK
{
"success": true,
"data": {
"_id": "667a5eb0913081c045d6fcd8",
"aDate": "2024-06-25T06:07:45.673Z",
"mDate": "2024-06-25T06:24:13.418Z",
"status": "1",
"sharedUsers": [
{
"_id": "615e4b9c2afe5dface7d619b",
"displayName": "John Smith",
"email": "john@communic8.com"
}
],
"adminIds": [
"615e4b9c2afe5dface7d619b"
],
"name": "My updated channel name",
"description": "My channel description",
"title": "My channel name",
"paused": false,
"pinned": false,
"sharedGroups": [],
"defaults": {
"template": "62a7b72187ce0b222948d465",
"enableEmail": false,
"enablePushNotification": true,
"enableComments": true,
"commentVisibility": "1"
},
"ownerId": {
"_id": "615e4b9c2afe5dface7d619b",
"displayName": "John Smith",
"firstName": "John",
"lastName": "Smith",
"email": "john@communic8.com"
}
}
}
Success response example - Error:
HTTP/1.1 200 OK
{
"success": false,
"message": "Invalid parameters"
}
06. Archive a channel
Archive a channel.
POST /int/v1/channel/:id/archive
Headers - Header
| Name | Type | Description |
|---|---|---|
| Authorization | String | Prefix with "Bearer ". Token value (either Access Key from Admin Console or access_token via OAuth result). |
Parameters - Parameter
| Name | Type | Description |
|---|---|---|
| id | String | Channel record ID |
Examples
CURL Example:
curl --request POST \
--url https://<url>/int/v1/channel/<id>/archive \
--header 'Authorization: Bearer <token>'
}'
Javascript Example:
try {
const url = process.env.URL;
const token = process.env.TOKEN;
const id = process.env.CHANNEL_ID;
const options = {
method: 'POST',
headers: {
Authorization: `Bearer ${token}`
}
};
const response = await fetch(`https://${url}/int/v1/channel/${id}/archive`, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
Success response example
Success response example - Success:
HTTP/1.1 200 OK
{
"success": true,
"data": {
"_id": "667a5eb0913081c045d6fcd8",
"aDate": "2024-06-25T05:46:57.402Z",
"mDate": "2024-06-25T05:46:57.402Z",
"status": "3",
"sharedUsers": [
{
"_id": "615e4b9c2afe5dface7d619b",
"displayName": "John Smith",
"email": "john@communic8.com"
}
],
"adminIds": [
"615e4b9c2afe5dface7d619b"
],
"name": "My channel name",
"description": "My channel description",
"title": "My channel name",
"paused": true,
"pinned": false,
"sharedGroups": [],
"defaults": {
"template": "62a7b72187ce0b222948d465",
"enableEmail": true,
"enablePushNotification": true,
"enableComments": true,
"commentVisibility": "1"
},
"ownerId": {
"_id": "615e4b9c2afe5dface7d619b",
"displayName": "John Smith",
"firstName": "John",
"lastName": "Smith",
"email": "john@communic8.com"
}
}
}
Success response example - Error:
HTTP/1.1 200 OK
{
"success": false,
"message": "Invalid parameters"
}
07. List channel managers
List channel managers.
GET /int/v1/channel/:id/manager
Headers - Header
| Name | Type | Description |
|---|---|---|
| Authorization | String | Prefix with "Bearer ". Token value (either Access Key from Admin Console or access_token via OAuth result). |
Parameters - Parameter
| Name | Type | Description |
|---|---|---|
| id | String | Channel record ID |
Query Parameters
| Name | Type | Description |
|---|---|---|
| conditions | Object | optional User filter conditions |
| limit | Number | optional Limit results |
| skip | Number | optional Skip results |
Examples
CURL Example:
curl --request GET \
--url https://<url>/int/v1/channel/<id>/manager \
--header 'Authorization: Bearer <token>'
Javascript Example:
try {
const url = process.env.URL;
const token = process.env.TOKEN;
const id = process.env.CHANNEL_ID
const options = {
method: 'GET',
headers: {
Authorization: `Bearer ${token}`
}
};
const response = await fetch(`https://${url}/int/v1/channel/${id}/manager`, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
Success response example
Success response example - Success:
HTTP/1.1 200 OK
{
"success": true,
"data": [
{
"_id": "615e4b9c2afe5dface7d619b",
"active": true,
"activeConsole": true,
"displayName": "John Smith",
"email": "john@communic8.com"
"lastName": "Smith",
"permissions": [
"channel_admin"
]
},
{
"_id": "63b35a2336c6bafd6d922204",
"active": false,
"activeConsole": true,
"displayName": "Mary Jones",
"email": "mary@communic8.com"
"lastName": "Jones",
"permissions": [
"channel_recipient_add",
"channel_recipient_edit"
]
}
],
"total": 2
}
Success response example - Error:
HTTP/1.1 200 OK
{
"success": false,
"message": "Invalid parameters"
}
08. Update channel manager permissions
Update channel manager permissions.
PUT /int/v1/channel/:id/manager
Headers - Header
| Name | Type | Description |
|---|---|---|
| Authorization | String | Prefix with "Bearer ". Token value (either Access Key from Admin Console or access_token via OAuth result). |
Parameters - Parameter
| Name | Type | Description |
|---|---|---|
| id | String | Channel record ID |
Request Body
| Name | Type | Description |
|---|---|---|
| user | String | manager user account reference (record ID, email, Successfactors Id or username) |
| permissions | String[] | permission list |
Examples
CURL Example:
curl --request PUT \
--url https://<url>/int/v1/channel/<id>/manager \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"user": "mary@communic8.com",
"permissions": [
"channel_recipient_add",
"channel_recipient_edit"
]
}'
Javascript Example:
try {
const url = process.env.URL;
const token = process.env.TOKEN;
const id = process.env.CHANNEL_ID;
const options = {
method: 'PUT',
headers: {
Authorization: `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"user": "mary@communic8.com",
"permissions": [
"channel_recipient_add",
"channel_recipient_edit"
]
})
}
};
const response = await fetch(`https://${url}/int/v1/channel/${id}/manager`, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
Success response example
Success response example - Success:
HTTP/1.1 200 OK
{
"success": true
}
Success response example - Error:
HTTP/1.1 200 OK
{
"success": false,
"message": "Invalid parameters"
}
09. Remove channel manager
Remove channel manager.
DELETE /int/v1/channel/:id/manager
Headers - Header
| Name | Type | Description |
|---|---|---|
| Authorization | String | Prefix with "Bearer ". Token value (either Access Key from Admin Console or access_token via OAuth result). |
Parameters - Parameter
| Name | Type | Description |
|---|---|---|
| id | String | Channel record ID |
Request Body
| Name | Type | Description |
|---|---|---|
| user | String | manager user account reference (record ID, email, Successfactors Id or username) |
Examples
CURL Example:
curl --request DELETE \
--url https://<url>/int/v1/channel/<id>/manager \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "user": "mary@communic8.com" }'
Javascript Example:
try {
const url = process.env.URL;
const token = process.env.TOKEN;
const id = process.env.CHANNEL_ID;
const options = {
method: 'DELETE',
headers: {
Authorization: `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ "user": "mary@communic8.com" })
}
};
const response = await fetch(`https://${url}/int/v1/channel/${id}/manager`, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
Success response example
Success response example - Success:
HTTP/1.1 200 OK
{
"success": true
}
Success response example - Error:
HTTP/1.1 200 OK
{
"success": false,
"message": "Invalid parameters"
}
Success response example - Error:
HTTP/1.1 200 OK
{
"success": false,
"message": "Invalid parameters"
}
10. Get channel manager groups
Get channel manager groups
GET /int/v1/channel/:id/managerGroup
Headers - Header
| Name | Type | Description |
|---|---|---|
| Authorization | String | Prefix with "Bearer ". Token value (either Access Key from Admin Console or access_token via OAuth result). |
Parameters - Parameter
| Name | Type | Description |
|---|---|---|
| id | String | Channel record ID |
Query Parameters
| Name | Type | Description |
|---|---|---|
| conditions | Object | optional Group filter conditions |
| limit | Number | optional Limit results |
| skip | Number | optional Skip results |
Examples
CURL Example:
curl --request GET \
--url https://<url>/int/v1/channel/<id>/managerGroup \
--header 'Authorization: Bearer <token>'
Javascript Example:
try {
const url = process.env.URL;
const token = process.env.TOKEN;
const id = process.env.CHANNEL_ID
const options = {
method: 'GET',
headers: {
Authorization: `Bearer ${token}`
}
};
const response = await fetch(`https://${url}/int/v1/channel/${id}/managerGroup`, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
Success response example
Success response example - Success:
HTTP/1.1 200 OK
{
"success": true,
"data": [
{
"_id": "667a68171d4c9afba78150bf",
"name": "Team leaders",
"desc": "Team leaders and area managers",
"deleted": false,
"default": false,
"roles": [
"57f8a806a52505ae26730941"
],
"mDate": "2024-06-25T06:47:51.886Z",
"aDate": "2024-06-25T06:47:51.886Z",
"permissions": []
}
],
"total": 1
}
Success response example - Error:
HTTP/1.1 200 OK
{
"success": false,
"message": "Invalid parameters"
}
11. Update channel manager groups
Update channel manager groups
PUT /int/v1/channel/:id/managerGroup
Headers - Header
| Name | Type | Description |
|---|---|---|
| Authorization | String | Prefix with "Bearer ". Token value (either Access Key from Admin Console or access_token via OAuth result). |
Parameters - Parameter
| Name | Type | Description |
|---|---|---|
| id | String | Channel record ID |
Request Body
| Name | Type | Description |
|---|---|---|
| groupId | String | console user group record ID |
| permissions | String[] | permission list |
Examples
CURL Example:
curl --request PUT \
--url https://<url>/int/v1/channel/<id>/managerGroup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"groupId": <groupId>,
"permissions": [
"channel_recipient_add",
"channel_recipient_edit"
]
}'
Javascript Example:
try {
const url = process.env.URL;
const token = process.env.TOKEN;
const id = process.env.CHANNEL_ID;
const groupId = process.env.GROUP_ID
const options = {
method: 'PUT',
headers: {
Authorization: `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"groupId": `${groupId}`,
"permissions": [
"channel_recipient_add",
"channel_recipient_edit"
]
})
}
};
const response = await fetch(`https://${url}/int/v1/channel/${id}/manager`, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
Success response example
Success response example - Success:
HTTP/1.1 200 OK
{
"success": true
}
Success response example - Error:
HTTP/1.1 200 OK
{
"success": false,
"message": "Invalid parameters"
}
12. Remove manager group from channel
Remove manager group from channel
DELETE /int/v1/channel/:id/managerGroup/:groupId
Headers - Header
| Name | Type | Description |
|---|---|---|
| Authorization | String | Prefix with "Bearer ". Token value (either Access Key from Admin Console or access_token via OAuth result). |
Parameters - Parameter
| Name | Type | Description |
|---|---|---|
| id | String | Channel record ID |
| groupId | String | Manager group record ID |
Examples
CURL Example:
curl --request DELETE \
--url https://<url>/int/v1/channel/<id>/managerGroup/<groupId> \
--header 'Authorization: Bearer <token>'
Javascript Example:
try {
const url = process.env.URL;
const token = process.env.TOKEN;
const id = process.env.CHANNEL_ID;
const groupId = process.env.GROUP_ID
const options = {
method: 'DELETE',
headers: {
Authorization: `Bearer ${token}`
}
};
const response = await fetch(`https://${url}/int/v1/channel/${id}/manager/${groupId}`, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
Success response example
Success response example - Success:
HTTP/1.1 200 OK
{
"success": true
}
Success response example - Error:
HTTP/1.1 200 OK
{
"success": false,
"message": "Invalid parameters"
}
13. List channel recipients
List channel recipients.
GET /int/v1/channel/:id/recipient
Headers - Header
| Name | Type | Description |
|---|---|---|
| Authorization | String | Prefix with "Bearer ". Token value (either Access Key from Admin Console or access_token via OAuth result). |
Parameters - Parameter
| Name | Type | Description |
|---|---|---|
| id | String | Channel record ID |
Query Parameters
| Name | Type | Description |
|---|---|---|
| conditions | Object | optional Recipient filter conditions |
| limit | Number | optional Limit results |
| skip | Number | optional Skip results |
Examples
CURL Example:
curl --request GET \
--url https://<url>/int/v1/channel/<id>/recipient?conditions=<conditions> \
--header 'Authorization: Bearer <token>'
Javascript Example:
try {
const url = process.env.URL;
const token = process.env.TOKEN;
const id = process.env.CHANNEL_ID;
const conditions = process.env.RECIPIENT_CONDITIONS;
const options = {
method: 'GET',
headers: {
Authorization: `Bearer ${token}`
}
};
const queryString = (conditions) ? `?conditions=${encodeURIComponent(conditions)}` : "";
const response = await fetch(`https://${url}/int/v1/channel/${id}/recipient${queryString}`, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
Success response example
Success response example - Success:
HTTP/1.1 200 OK
{
"success": true,
"data": [
{
"_id": "615e4b9c2afe5dface7d619b",
"active": true,
"activeConsole": true,
"displayName": "John Smith",
"email": "john@communic8.com"
"lastName": "Smith",
"oppo": {
"_id": "66723d2c2a9bc16fb41fe272",
"pitchStatus": "live",
"ceUserId": "615e4b9c2afe5dface7d619b",
"_type": "pb_c_campaign_item"
},
"pitchStatus": "live"
},
{
"_id": "615e4b9c2afe5dface7d619b",
"active": true,
"activeConsole": true,
"displayName": "Matthew Smith",
"email": "matthew@communic8.com"
"lastName": "Smith",
"oppo": {
"_id": "66723d2c2a9bc16fb41fe272",
"pitchStatus": "live",
"ceUserId": "615e4b9c2afe5dface7d619b",
"_type": "pb_c_campaign_item"
},
"pitchStatus": "live"
}
],
"total": 2
}
Success response example - Error:
HTTP/1.1 200 OK
{
"success": false,
"message": "Invalid parameters"
}
14. Add recipients to a channel
Add recipients to a channel.
POST /int/v1/channel/:id/recipient
Headers - Header
| Name | Type | Description |
|---|---|---|
| Authorization | String | Prefix with "Bearer ". Token value (either Access Key from Admin Console or access_token via OAuth result). |
Parameters - Parameter
| Name | Type | Description |
|---|---|---|
| id | String | Channel record ID |
Request Body
| Name | Type | Description |
|---|---|---|
| recipients | String[] | optional Recipients to add to the channel (supported recipient references: email, user record ID, Successfactors ID or Successfactors username) |
| lists | String[] | optional recipient group record IDs to add the group's users to the channel |
| conditions | String[] | optional recipient filter conditions to add matching active users to the channel |
Examples
CURL Example:
curl --request POST \
--url https://<url>/int/v1/channel/<id>/recipient \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"recipients": ["john@communic8.com", "mary@communic8.com", "matthew@communic8.com"]
}'
Javascript Example:
try {
const url = process.env.URL;
const token = process.env.TOKEN;
const id = process.env.CHANNEL_ID;
const options = {
method: 'POST',
headers: {
Authorization: `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"recipients": ["john@communic8.com", "mary@communic8.com", "matthew@communic8.com"]
})
};
const response = await fetch(`https://${url}/int/v1/channel/${id}/recipient`, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
Success response example
Success response example - Success:
HTTP/1.1 200 OK
{
"success": true
}
Success response example - Error:
HTTP/1.1 200 OK
{
"success": false,
"message": "Invalid parameters"
}
15. Remove recipients from a channel
Remove recipients from a channel.
POST /int/v1/channel/:id/recipient/remove
Headers - Header
| Name | Type | Description |
|---|---|---|
| Authorization | String | Prefix with "Bearer ". Token value (either Access Key from Admin Console or access_token via OAuth result). |
Parameters - Parameter
| Name | Type | Description |
|---|---|---|
| id | String | Channel record ID |
Request Body
| Name | Type | Description |
|---|---|---|
| recipients | String[] | optional Recipients to remove the channel (supported recipient references: email, user record ID, Successfactors ID or Successfactors username) |
| lists | String[] | optional recipient group record IDs to remove the group's users from the channel |
| conditions | String[] | optional recipient filter conditions to remove matching users from the channel |
Examples
CURL Example:
curl --request POST \
--url https://<url>/int/v1/channel/<id>/recipient/remove \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"recipients": ["john@communic8.com", "mary@communic8.com", "matthew@communic8.com"]
}'
Javascript Example:
try {
const url = process.env.URL;
const token = process.env.TOKEN;
const id = process.env.CHANNEL_ID;
const options = {
method: 'POST',
headers: {
Authorization: `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"recipients": ["john@communic8.com", "mary@communic8.com", "matthew@communic8.com"]
})
};
const response = await fetch(`https://${url}/int/v1/channel/${id}/recipient/remove`, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
Success response example
Success response example - Success:
HTTP/1.1 200 OK
{
"success": true
}
Success response example - Error:
HTTP/1.1 200 OK
{
"success": false,
"message": "Invalid parameters"
}
16. Create (and optionally send) a new campaign in the channel
Create (and send) a new campaign in the channel
POST /int/v1/channel/:id/campaign
Headers - Header
| Name | Type | Description |
|---|---|---|
| Authorization | String | Prefix with "Bearer ". Token value (either Access Key from Admin Console or access_token via OAuth result). |
Parameters - Parameter
| Name | Type | Description |
|---|---|---|
| id | String | Channel record ID |
Request Body
| Name | Type | Description |
|---|---|---|
| name | String | The campaign name |
| title | String | optional The campaign title. Used in email/mobile notifications. If not provided, the value of name will be used. |
| description | String | The campaign description. Used in email/mobile notifications. |
| status | String | optional Campaign status. By default the campaign will be sent (status "live"). If the value is "draft", the campaign will not be sent, and be saved as draft_Default value: live_ Allowed values: "live","draft" |
| scheduledTime | Date | optional scheduled go-live time for campaign in ISO 8601 format (only used if status is not already 'live' or 'draft') |
| templateId | String | optional campaign template id |
| templateData | String | optional the json data to render the template page by EJS syntax |
| categories | String | optional campaign category array, case sensitive. If not provided, the categories will come from the template |
| imageUrl | String | optional image url link of the campaign, by default it is from template. The image will be used in email and mobile app. |
| enableEmail | Boolean | optional campaign delivery by email, default is inherited from channel when not provided |
| enableMobileNotification | Boolean | optional campaign delivery by mobile, default is inherited from channel when not provided |
| emailReplyTo | String | optional campaign email reply email address |
| commentVisibility | String | optional Configuration for the comment of the campaign. "0" for comment only visible to campaign team, "1" for comment also visible to other recipeints in the campaign; default is inherited from channel when not provided.Allowed values: "0","1" |
| senderUserEmail | String | optional Email address of the campaign sender user, it requires corresponding console user created. By default it is the token owner user. This is not the sender from email address used in campaign. |
| ownerUserEmail | String | optional Email address of the campaign owner, it requires corresponding console user created. By default it is the token owner user |
Examples
CURL Example:
curl --request POST \
--url https://<url>/int/v1/channel/<id>/campaign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "My campaign",
"description": "My campaign description",
"enableMobileNotification": true,
"templateId": "62a7b72187ce0b222948d465",
"status": "live"
}'
Javascript Example:
try {
const url = process.env.URL;
const token = process.env.TOKEN;
const id = process.env.CHANNEL_ID;
const options = {
method: 'POST',
headers: {
Authorization: `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"name": "My campaign",
"description": "My campaign description",
"enableMobileNotification": true,
"templateId": "62a7b72187ce0b222948d465",
"status": "live"
})
};
const response = await fetch(`https://${url}/int/v1/channel/${id}/campaign`, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
Success response example
Success response example - Success:
HTTP/1.1 200 OK
{
"success": true,
"data": {
"_id": "6674d3c947724fc279454dee",
"campaignUrl": "https://mydomain.c8/admin/web/#/campaigns/sent/details/6674d3c947724fc279454dee"
}
}
Success response example - Error:
HTTP/1.1 200 OK
{
"success": false,
"message": "Invalid parameters"
}
17. Create (and send) a new broadcast to the channel
Create (and send) a new broadcast to the channel
POST /int/v1/channel/:id/broadcast
Headers - Header
| Name | Type | Description |
|---|---|---|
| Authorization | String | Prefix with "Bearer ". Token value (either Access Key from Admin Console or access_token via OAuth result). |
Parameters - Parameter
| Name | Type | Description |
|---|---|---|
| id | String | Channel record ID |
Request Body
| Name | Type | Description |
|---|---|---|
| title | String | The title of the broadcast. |
| message | String | The message content of the broadcast. |
| imageUrl | String | optional A public URL for an image to display on the broadcast. |
| emoji | String | optional The emoji used as an icon for the broadcast.Default value: 🔔 |
| requiredConfirm | Boolean | optional Does the broadcast require recipient confirmation or not?Default value: false |
| actionLink | String | optional Additonal link in broadcast. |
| actionLinkText | String | optional The text for the action link button that appears in the broadcast email, that users can click on to view more details.Default value: More Detail |
| contentInEmail | Boolean | optional Will the broadcast message content appear in the email body or require a clickthrough to read?Default value: false |
Examples
CURL Example:
curl --request POST \
--url https://<url>/int/v1/channel/<id>/broadcast \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"title": "My broadcast",
"message": "Hello world"
}'
Javascript Example:
try {
const url = process.env.URL;
const token = process.env.TOKEN;
const id = process.env.CHANNEL_ID;
const options = {
method: 'POST',
headers: {
Authorization: `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"name": "My campaign",
"description": "My campaign description",
"imageUrl": "https://cf.communic8.com/dyzfiavco/image/upload/v1528258650/c8share/book.jpg",
"emoji": "📖",
"enableMobileNotification": true,
"templateId": "62a7b72187ce0b222948d465",
"status": "live"
})
};
const response = await fetch(`https://${url}/int/v1/channel/${id}/broadcast`, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
Success response example
Success response example - Success:
HTTP/1.1 200 OK
{
"success": true,
"data": {
"_id": "6673c00fce26c58a01134090",
"broadcastUrl": "https://mydomain.c8/admin/web/#/broadcasts/all/view/6673c00fce26c58a01134090"
}
}
Success response example - Error:
HTTP/1.1 200 OK
{
"success": false,
"message": "Invalid parameters"
}