Issue with Segment Creation via Mailchimp API

56 views Asked by At

I am encountering an issue while trying to create a segment via the Mailchimp API. Instead of a segment, a tag is being created. My aim is to create a segment to which I can later attach tags. Below is the CURL request I am using to create a segment:

curl --location 'https://us17.api.mailchimp.com/3.0/lists/{list_id}/segments/' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic {token}' \
--header 'Cookie: {cookie}' \
--data '{
    "name": "test123",
    "static_segment": []
}'

I attempted to create a new segment within a specific list in Mailchimp using the above CURL request, as per the instructions outlined in the Mailchimp API documentation. The endpoint and the request body were formatted according to the documentation for segment creation.

I was expecting a new segment named "test123" to be created within the specified list, with the ability to add members to this segment later on. However, upon executing the CURL request, a tag with the name "test123" was created instead of a segment. This behavior is inconsistent with the expected outcome based on the documentation, and it hinders my ability to organize and manage my contacts efficiently within Mailchimp.

I require the segment to be created so that I can further categorize and manage my contacts by attaching tags to the segment as necessary. The creation of a tag instead of a segment is problematic as it does not align with the intended organization and management structure I am aiming to implement within Mailchimp.

0

There are 0 answers