API Reference
Your guide to getting things done
Search our documentation articles

Your complete guide to mastering Moosend. Search to get started.

Get segment details

Article: 000054619
Updated: September 11, 2025

Get segment details

Abstract

Describes the request and response details of this Moosend API endpoint to get the details of a specific segment.

Request

Parameter

In

Type

Required

Description

MailingListID

path

string

true

The ID of the email list that contains the segment.

SegmentID

path

string

true

The ID of the segment that contains the details you are requesting.

Format

path

string

true

The supported file format for getting a response.

Possible values: json and xml.

apikey

query

string

true

The API key of your account.

Response

Status

Description

Headers

Schema

200 OK

The request is successful.

Content-Type:application/json

Accept:application/json

N/A

  • Code - the response code. This is 0 if successful.

  • Error - the response error message. This is null if successful.

  • Context - an object that contains all the following information for the requested segment:

    • ID - the ID of the segment.

    • Name - the name of the segment.

    • MatchType - specifies how subscribers are returned by your segment based on the matching criteria. Possible values are:

      • 0 - for All. Returns subscribers that match all the given criteria.

      • 1 - for Any. Returns subscribers that match any of the given criteria.

    • Criteria - contains a list with the following information for each selected criterion selected for the segment:

      • ID - the ID of the criteria.

      • SegmentID - the ID of the segment.

      • Field - the enum value of the selected filter.

      • CustomFieldID - if the selected filter is a custom field, this is the ID of the custom field.

      • Comparer - the operator that defines how to compare Field and Value. If not specified, Is is assumed.

        • 0 - for Is. Finds subscribers where the Field is exactly equal to the specified Value.

        • 1 - for IsNot. Finds subscribers where the Field is not equal to the specified Value.

        • 2 - for Contains. Finds subscribers where the Field contains the specified Value.

        • 3 - for DoesNotContain. Finds subscribers where the Field does not contain the specified Value.

        • 4 - for StartsWith. Finds subscribers where the Field starts with the specified Value.

        • 5 - for DoesNotStartWith. Finds subscribers where the Field does not start with the specified Value.

        • 6 - for EndsWith. Finds subscribers where the Field ends with the specified Value.

        • 7 - for DoesNotEndWith. Finds subscribers where the Field does not end with the specified Value.

        • 8 - for IsGreaterThan. Finds subscribers where the Field is greater than the specified Value.

        • 9 - for IsGreaterThanOrEqualTo. Finds subscribers where the Field is greater than or equal to the specified Value.

        • 10 - for IsLessThan. Finds subscribers where the Field is less than the specified Value.

        • 11 - for IsLessThanOrEqualTo. Finds subscribers where the Field is less than or equal to the specified Value.

        • 12 - for IsBefore. Finds subscribers where the Field is before the specified Value.

        • 13 - for IsAfter. Finds subscribers where the Field is after the specified Value.

        • 14 - for IsEmpty. Finds subscribers where the Field has no Value.

        • 15 - for IsNotEmpty. Finds subscribers where the Field contains a Value.

        • 16 - for IsTrue. Finds subscribers where the condition defined by the Field is true.

        • 17 - for IsFalse. Finds subscribers where the condition defined by the Field is false.

        • 24 - for IsBetween. Finds subscribers where the numeric value of a criterion is between two defined numbers.

        • 25 - for IsNotBetween. Finds subscribers where the numeric value of a criterion is not between two defined numbers.

      • Value - the search term used to filter the specified Field.

      • DateFrom - the starting date-time value selected to filter the results. If not selected, this is null.

      • DateTo - the ending date-time value selected to filter the results. If not selected, this is null.

      • Properties - this is null for this case.

      • Subscriteria - this is null for this case.

    • CreatedBy - the IP address used to create the requested segment.

    • CreatedOn - the date-time the requested segment was created.

    • UpdatedBy - the IP address used to update the requested segment.

    • UpdatedOn - the date-time the requested segment was updated.

    • FetchType - the selected fetch type for the selected segment criteria. Possible values are:

      • 0 - for all segment criteria.

      • 1 - for the top segment criteria.

      • 2 - for the top percent segment criteria.

    • FetchValue - the value used to apply the FetchType filter.

    • Description - contains a string representation of all the selected filters, MatchType and FetchType criteria.

Request
GET https://{hostname}/v3/lists/{MailingListID}/segments/{SegmentID}/details.{Format}?apikey=
Request
curl --include \
'https://{hostname}/v3/lists/{MailingListID}/segments/{SegmentID}/details.{Format}?apikey='
Response
json
{
  "Code": 0,
  "Error": null,
  "Context": {
    "ID": 10198,
    "Name": "test",
    "MatchType": 0,
    "Criteria": [
      {
        "ID": 15778,
        "SegmentID": 10198,
        "Field": 2,
        "CustomFieldID": null,
        "Comparer": 0,
        "Value": "Paul",
        "DateFrom": null,
        "DateTo": null,
        "Properties": null,
        "Subscriteria": null
      },
      {
        "ID": 15779,
        "SegmentID": 10198,
        "Field": 4,
        "CustomFieldID": null,
        "Comparer": 8,
        "Value": "5",
        "DateFrom": "/Date(1465167600000+0100)/",
        "DateTo": "/Date(1465945200000+0100)/",
        "Properties": null,
        "Subscriteria": null
      }
    ],
    "CreatedBy": "212.123.123.112",
    "CreatedOn": "/Date(1465806037033+0100)/",
    "UpdatedBy": "212.123.123.112",
    "UpdatedOn": "/Date(1465806269980+0100)/",
    "FetchType": 0,
    "FetchValue": 0,
    "Description": "Fetch all where \"Recipient Name\" is \"Paul\" and \"Campaigns Opened\" is greater than \"5\""
  }
}



Moosend Logo

Copyright © 2026 · All Rights Reserved · Moosend · Privacy Policy