Upsert target communication

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
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
❗️

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

ParameterDescription
activePass true to make the communication active.
channelIdUnique ID of the channel through which the communication needs to be sent.
communicationTypeType of the communication. Values: START, FINISH, CHANGE, REMINDER.
messageTemplateContent that should go in the message.
offsetDays
senderSender ID from which the communication needs to go.
subjectTemplateSubject 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

ParameterDescription
dataArray containing details of communication.
data[].idUnique identifier of the communication.
data[].attributionContains metadata about the creation and last update of the communication.
data[].attribution.createdOnTimestamp 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.lastUpdatedOnTimestamp 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.lastUpdatedByDetails of the entity or user that last updated the communication.
data[].attribution.lastUpdatedBy.idUnique identifier of the last updater.
data[].attribution.lastUpdatedBy.codeCode related to the last updater.
data[].attribution.lastUpdatedBy.descriptionA description related to the last updater.
data[].attribution.lastUpdatedBy.nameName of the last updater.
data[].attribution.lastUpdatedBy.typeType of the last updater.
data[].attribution.createdByDetails of the entity or user that created the communication.
data[].attribution.createdBy.idUnique identifier of the creator.
data[].attribution.createdBy.codeCode related to the creator.
data[].attribution.createdBy.descriptionA description related to the creator.
data[].attribution.createdBy.nameName of the creator.
data[].attribution.createdBy.typeType of the creator.
data[].targetIdIdentifier of the target for the communication.
data[].targetGroupIdIdentifier of the target group for the communication.
data[].communicationTypeType of the communication.
data[].channelIdUnique ID of the channel through which the communication is sent.
data[].subjectTemplateSubject line of the template for the communication.
data[].messageTemplateContent/message template of the communication.
data[].senderSender ID from which the communication is sent.
data[].offsetDaysNumber of days offset.
data[].activeBoolean indicating if the communication is active.
errorsContains any errors related to the response.
Path Params
int32
required

Group id of the target group

int32
required

Unique target id present in the above group

Body Params
boolean

Pass true to make the communication active.

string

Unique ID of the channel through which the communication needs to be sent.

string
enum

Type of the communication. Values: START, FINISH, CHANGE, REMINDER.

Allowed:
string

Content that should go in the message.

int32
string

Sender ID from which the communication needs to go.

string

Subject line of the template.

Headers
string
string
string
string
Responses

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json