post deprecated
https://{host}/v3/targetGroups/targets//communications/upsert
This API helps in both updating and inserting the target communication based on the given "target id" and "target group id".
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
This API is being phased out and will no longer be available for creating new milestones.To create a new milestone, use the Create a Loyalty Promotion API
Make sure you have the appropriate access control configured. For more information, see access group documentation.
API endpoint example
https://eu.api.capillarytech.com/v3/targetGroups/2163/targets/2317/communications/upsert
curl --location 'https://eu.api.capillarytech.com/v3/targetGroups/2750/targets/2996/communications/upsert' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic bWFkaHI3MjU2YQ==' \
--header 'Cookie: _cfuvid=H_OUDqsSJh7q7aUlkRgBjVIMRBFDNp2ic0PI6VAnYzw-1762857476978-0.0.1.1-604800000' \
--data-raw '[
{
"active": true,
"channelId": 1,
"communicationType": "START",
"messageTemplate": "Test messageTemplate but communication type changed to START",
"offsetDays": 1,
"sender": "[email protected]",
"subjectTemplate": "Test subjectTemplate changed to START "
}
]'
The two path parameters targetGroupId and targetId are mandatory fields.
Body parameters
| Parameter | Description |
|---|---|
| active | Pass true to make the communication active. |
| channelId | Unique ID of the channel through which the communication needs to be sent. |
| communicationType | Type of the communication. Values: START, FINISH, CHANGE, REMINDER. |
| messageTemplate | Content that should go in the message. |
| offsetDays | |
| sender | Sender ID from which the communication needs to go. |
| subjectTemplate | Subject line of the template. |
Example response
{
"data": [
{
"id": 12,
"attribution": {
"createdOn": "2025-11-11T12:50:03.444+0000",
"lastUpdatedOn": "2025-11-11T12:50:03.444+0000",
"lastUpdatedBy": {
"id": 75197372,
"code": "madhu_rima",
"description": "madhurima's till",
"name": "madhurima",
"type": "TILL"
},
"createdBy": {
"id": 75197372,
"code": "madhu_rima",
"description": "madhurima's till",
"name": "madhurima",
"type": "TILL"
}
},
"targetId": 2996,
"targetGroupId": 2750,
"communicationType": "START",
"channelId": 1,
"subjectTemplate": "Test subjectTemplate changed to START ",
"messageTemplate": "Test messageTemplate but communication type changed to START",
"sender": "[email protected]",
"offsetDays": 1,
"active": true
}
],
"errors": null,
"warnings": null
}Response parameters
| Parameter | Description |
|---|---|
| data | Array containing details of communication. |
| data[].id | Unique identifier of the communication. |
| data[].attribution | Contains metadata about the creation and last update of the communication. |
| data[].attribution.createdOn | Timestamp indicating when the communication was created, in ISO 8601 format, returned in the server time zone. EU server example 2025-11-11T12:50:03Z → 11 November 2025, 12:50:03 (UTC) India server example 2025-11-11T18:20:03+05:30 → 11 November 2025, 18:20:03 (IST) Note: The response time zone always matches the server time zone, regardless of the time zone offset in the request. |
| data[].attribution.lastUpdatedOn | Timestamp indicating the last update made to the communication, in ISO 8601 format, returned in the server time zone. EU server example 2025-11-11T12:50:03Z → 11 November 2025, 12:50:03 (UTC) India server example 2025-11-11T18:20:03+05:30 → 11 November 2025, 18:20:03 (IST) Note: The response time zone always matches the server time zone, regardless of the time zone offset in the request. |
| data[].attribution.lastUpdatedBy | Details of the entity or user that last updated the communication. |
| data[].attribution.lastUpdatedBy.id | Unique identifier of the last updater. |
| data[].attribution.lastUpdatedBy.code | Code related to the last updater. |
| data[].attribution.lastUpdatedBy.description | A description related to the last updater. |
| data[].attribution.lastUpdatedBy.name | Name of the last updater. |
| data[].attribution.lastUpdatedBy.type | Type of the last updater. |
| data[].attribution.createdBy | Details of the entity or user that created the communication. |
| data[].attribution.createdBy.id | Unique identifier of the creator. |
| data[].attribution.createdBy.code | Code related to the creator. |
| data[].attribution.createdBy.description | A description related to the creator. |
| data[].attribution.createdBy.name | Name of the creator. |
| data[].attribution.createdBy.type | Type of the creator. |
| data[].targetId | Identifier of the target for the communication. |
| data[].targetGroupId | Identifier of the target group for the communication. |
| data[].communicationType | Type of the communication. |
| data[].channelId | Unique ID of the channel through which the communication is sent. |
| data[].subjectTemplate | Subject line of the template for the communication. |
| data[].messageTemplate | Content/message template of the communication. |
| data[].sender | Sender ID from which the communication is sent. |
| data[].offsetDays | Number of days offset. |
| data[].active | Boolean indicating if the communication is active. |
| errors | Contains any errors related to the response. |
