Remove user from customer group

API at a glance

⚠️

Customer groups is a premium feature.

Please contact your CSM to enable customer groups for your account. For more details, see the Customer groups Help Center article.

Description: Removes a user from a customer group without deleting the user record.

Authentication & testing

Testing the API on this page

How to try it here

  • Use your User API Key as the Username (leave Password blank).
  • Select the appropriate API endpoint based on your Blueshift region.
  • API - Select Region
  • Enter the necessary parameters and click Try It to run the request.
Authentication using Base64 encoding

Note for developers

API requests require authentication using HTTP Basic Authentication with an API key. The API key serves as the username, while the password field should be left empty. The format to encode is: your_api_key: (note the trailing colon).

This string must be Base64-encoded and included in the request's Authorization header as follows:

Authorization: Basic encoded_value

You can generate the encoded value using a trusted Base64 encoder.


Postman collection

Try it with Postman: Explore the API using Blueshift's Postman collection.


Things to know before you start

  • You can find the group ID on the group's profile page in Blueshift.
  • You can find the user UUID in the URL when you open a customer profile in Blueshift.
  • This operation is non-destructive. The user record and all associated data are preserved.
  • The user is disassociated from the group and will no longer receive group-level events or attributes.

Request parameters

Check out the request parameters

Path parameters

ParameterTypeRequiredDescription
group_idstring✅ YesThe ID of the customer group. This is not the UUID.
user_uuidstring✅ YesThe UUID of the user to remove from the group.

Example request & response

Remove a user from a customer group
curl --request DELETE \
     --url 'https://api.getblueshift.com/api/v1/customer_group/grp_orionretail/user/57fbca61-3eed-43ea-aaa6-c35307296035' \
     --header 'accept: application/json' \
     --header 'authorization: Basic YOUR_ENCODED_USER_API_KEY'
{
  "status": "success",
  "message": "User removed from group successfully",
  "group_id": "grp_orionretail",
  "user_uuid": "57fbca61-3eed-43ea-aaa6-c35307296035"
}
Path Params
string
required
uuid
required
Responses

400

Bad Request - The request is invalid due to missing or incorrect parameters.

401

Unauthorized - API authentication failed due to an invalid or missing API key.

403

Forbidden - The API key does not have sufficient permissions to perform this action.

404

Not Found - The specified group ID or user UUID was not found. Verify the values and try again.

429

Too Many Requests - The request limit has been exceeded. Reduce request frequency.

500

Internal Server Error - An unexpected server error occurred. Contact support if the issue persists.

502

Bad Gateway - The server received an invalid response. Retry the request.

503

Service Unavailable - The service is temporarily unavailable. Try again later.

504

Gateway Timeout - The server took too long to respond. Retry the request with exponential backoff.

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