Create a Custom Segment
Creates an empty custom segment for a business. Users have to be added later to an empty segment.
Headers
- Type: stringAuthorizationrequired
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".
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
Body
application/json
- Type: stringdescription
Description of the custom segment that will be created
- Type: stringname
Name of the custom segment that will be created
Responses
- application/json
- application/json
- application/json
Request Example for post/api2/dashboard/custom_segments
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/dashboard/custom_segments \
--request POST \
--header 'Authorization: Bearer BUSINESS_ADMIN_KEY_GOES_HERE' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"name": "Dummy Custom Segment",
"description": "Testing Creation of Custom Segment."
}'
{
"custom_segment_id": 15376,
"name": "Dummy Custom Segment",
"description": "Testing Creation of Custom Segment.",
"created_at": "2018-01-10T10:06:39Z",
"updated_at": "2018-01-10T10:06:39Z"
}