Skip to main content

Add Subscriber to Segment using Profile ID

This endpoint allows you to add a subscriber to a segment using a profile ID. This call accepts form-encoded request bodies and returns responses in JSON format.

Profile IDs serve as unique identifiers for your subscribers, enabling you to recognize them across multiple devices and browsers. Each subscriber can be assigned just one profile ID. This ID should be a string, and you have the flexibility to use any value, such as an email or phone number.

POST
 https://api.pushengage.com/apiv1/profile

Request Parameters

Parameter NameTypeRequiredDescription
segment_nameStringYesDefines the segment name for targeting specific notifications.
profile_idString[]YesA unique ID associated with a subscriber. Notifications are dispatched exclusively to devices possessing this ID.
operationStringYesSpecifies the action to be performed. Acceptable values are add or delete.

Response Object

Property NameTypeRequiredDescription
successBooleanYesIndicates if the push response was successful. Can be either true or false.
messageStringNoProvided when there's a failure, detailing the reason.

Adding Profile to a Segment Example

Request

curl -X POST -H "api_key: <your_pushengage_api_key>" -H "Content-Type: application/x-www-form-urlencoded" -d 'segment_name=<your_segment_name>&profile_id=<your_unique_profile_id>&operation=add' "https://api.pushengage.com/apiv1/profile"

Response

{
"success": true
}

Deleting Profile from a Segment Example

Request

curl -X POST -H "api_key: <your_pushengage_api_key>" -H "Content-Type: application/x-www-form-urlencoded" -d 'segment_name=<your_segment_name>&profile_id=<your_unique_profile_id>&operation=delete' "https://api.pushengage.com/apiv1/profile"

Response

{
"success": true
}