Summary
This API request tells you if a user is a part of a segment or not. This is a boolean request and would either return true/false depending on that user's segment membership.
Resource URL
https://eu.useriq.com/api/1.0/user/segment_membership?segment_id=1234&user_id=john.smith@useriq.com
Resource Information
Request Type: GET
Response Format: JSON
Headers
- useriq-api-key (required): Your valid API key generated from the Site settings page
Parameters
-
user_id
The user_id of the user to be updated with the associated custom data attribute (Note: this should match the value passed in the UserIQ tracking code as 'user_id').
Example: 123 -
segment_id
Description: The segment_id of that particular segment has to passed in the query.
Example cURL Request:
curl \
-H "Content-type: application/json" \
-H "useriq-api-key: 572d7372829a3211a73d9c2cb790ffe3" \
https://eu.useriq.com/api/1.0/user/segment_membership?segment_id=1234&user_id=john.smith@useriq.com
Example Result
{
"segment_id": "1234",
"user_id": "john.smith@useriq.com",
"is_member": true
}
Response Codes
200: OK. Request processed successfully
400: Bad Request. API request could not be understood by the server.
401: Unauthorized. Invalid API access token.
Comments
0 comments
Please sign in to leave a comment.