Add User to a Custom Segment

​

Adds a user to a custom segment. Either email or user_id should be provided in the request; user_id will be preferred if both are provided.

Headers

  • Bearer token for admin authorization, who is making a call on behalf of the customer. Send the API key in the following format: "Authorization: Bearer BUSINESS_ADMIN_KEY_GOES_HERE".

  • Advertises which content types the client is able to understand

Body

application/json
  • Unique ID of the custom segment to which the user will be added

  • Email address of the user

  • Unique ID of the user. This is generated by Punchh.

Responses

  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api2/dashboard/custom_segments/members
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/dashboard/custom_segments/members \
  --request POST \
  --header 'Authorization: Bearer BUSINESS_ADMIN_KEY_GOES_HERE' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "custom_segment_id": 15401,
  "email": "test@example.com"
}'
{
  "custom_segment_member_id": 84767857,
  "custom_segment_id": 15401,
  "email": "test@example.com",
  "user_id": 111111111,
  "created_at": "2018-01-10T10:53:43Z",
  "updated_at": "2018-01-10T10:53:43Z"
}