Moosend Segments API

The Segments API from Moosend — 8 operation(s) for segments.

Operations 8

GET /lists/{MailingListID}/segments.{Format} Getting segments #
GET /lists/{MailingListID}/segments/{SegmentID}/details.{Format} Getting segment details #
GET /lists/{MailingListID}/segments/{SegmentID}/members.{Format} Getting segment subscribers #
POST /lists/{MailingListID}/segments/create.{Format} Creating a new empty segment #
POST /lists/{MailingListID}/segments/{SegmentID}/update.{Format} Updating a segment #
POST /lists/{MailingListID}/segments/{SegmentID}/criteria/add.{Format} Adding criteria to segments #
POST /lists/{MailingListID}/segments/{SegmentID}/criteria/{CriteriaID}/update.{Format} Updating segment criteria #
DELETE /lists/{MailingListID}/segments/{SegmentID}/delete.{Format} Deleting A Segment #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/moosend-segments-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

moosend-segments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Moosend Segments API
  version: v3
  description: '#Moosend API


    ## Getting started with Moosend API


    Before making use of our API, please read the following carefully to get you started.'
  contact:
    name: Moosend Support
    url: https://moosend.com/support/
  x-source: Transcribed from the Moosend API Blueprint published by Moosend at https://moosendapp.docs.apiary.io/api-description-document (FORMAT 1A, HOST https://api.moosend.com/v3).
servers:
- url: https://api.moosend.com/v3
security:
- apikeyQuery: []
tags:
- name: Segments
paths:
  /lists/{MailingListID}/segments.{Format}:
    get:
      operationId: gettingSegments
      summary: Getting segments
      description: Get a list of all segments with their criteria for the given mailing list.
      tags:
      - Segments
      parameters:
      - name: MailingListID
        in: path
        required: true
        schema:
          type: string
        example: a589366a-1a34-4965-ac50-f1299fe5979e
      - name: Format
        in: path
        required: true
        schema:
          type: string
        example: json
      - name: apikey
        in: query
        required: true
        schema:
          type: string
        description: Account API key. Passed as a query-string parameter on every call.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  Code:
                    description: The response code for this call. This will be 0 if successful
                  Error:
                    description: The response error message. This will be null if successful
                  Context:
                    description: 'The response context. Contains all the following information:'
              example:
                Code: 0
                Error: null
                Context:
                  Paging:
                    PageSize: 100
                    CurrentPage: 1
                    TotalResults: 1
                    TotalPageCount: 1
                    SortExpression: CreatedOn
                    SortIsAscending: false
                  Segments:
                  - ID: 7314
                    Name: City
                    MatchType: 1
                    Criteria:
                    - ID: 12244
                      SegmentID: 7314
                      Field: 2
                      CustomFieldID: null
                      Comparer: 0
                      Value: test
                      DateFrom: null
                      DateTo: null
                      Properties: null
                      Subscriteria: null
                    - ID: 12348
                      SegmentID: 7314
                      Field: 99
                      CustomFieldID: e4823107-d02d-48af-8190-d8694a33401e
                      Comparer: 0
                      Value: UK
                      DateFrom: null
                      DateTo: null
                      Properties: null
                      Subscriteria: null
                    CreatedBy: 211.11.111.11
                    CreatedOn: /Date(1451490040010+0000)/
                    UpdatedBy: 211.11.111.11
                    UpdatedOn: /Date(1451490040010+0000)/
                    FetchType: 0
                    FetchValue: 0
                    Description: Fetch all where "City" is "UK" or "Recipient Name" is "Test"
      security:
      - apikeyQuery: []
  /lists/{MailingListID}/segments/{SegmentID}/details.{Format}:
    get:
      operationId: gettingSegmentDetails
      summary: Getting segment details
      description: Gets detailed information on a specific segment and its criteria. However, it does not include the subscribers returned by the segment.
      tags:
      - Segments
      parameters:
      - name: MailingListID
        in: path
        required: true
        schema:
          type: string
        example: a589366a-1a34-4965-ac50-f1299fe5979e
      - name: SegmentID
        in: path
        required: true
        schema:
          type: string
        example: '10198'
      - name: Format
        in: path
        required: true
        schema:
          type: string
        example: json
      - name: apikey
        in: query
        required: true
        schema:
          type: string
        description: Account API key. Passed as a query-string parameter on every call.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  Code:
                    description: The response code for this call. This will be 0 if successful
                  Error:
                    description: The response error message. This will be null if successful
                  Context:
                    description: 'The response context. Contains all the following information:'
              example:
                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"
      security:
      - apikeyQuery: []
  /lists/{MailingListID}/segments/{SegmentID}/members.{Format}:
    get:
      operationId: gettingSegmentSubscribers
      summary: Getting segment subscribers
      description: Gets a list of the subscribers that the specified segment returns according to its criteria. Because the results for this call could be quite big, paging information is required as input.
      tags:
      - Segments
      parameters:
      - name: MailingListID
        in: path
        required: true
        schema:
          type: string
        example: a589366a-1a34-4965-ac50-f1299fe5979e
      - name: SegmentID
        in: path
        required: true
        schema:
          type: string
        example: '10198'
      - name: Format
        in: path
        required: true
        schema:
          type: string
        example: json
      - name: apikey
        in: query
        required: true
        schema:
          type: string
        description: Account API key. Passed as a query-string parameter on every call.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  Code:
                    description: The response code for this call. This will be 0 if successful
                  Error:
                    description: The response error message. This will be null if successful
                  Context:
                    description: 'The response context. Contains all the following information:'
              example:
                Code: 0
                Error: null
                Context:
                  Paging:
                    PageSize: 500
                    CurrentPage: 1
                    TotalResults: 2
                    TotalPageCount: 1
                    SortExpression: null
                    SortIsAscending: false
                  Subscribers:
                  - ID: 07111755-8ee4-1111-ad2b-1111899c6f
                    Name: Paul
                    Email: paul@email.com
                    CreatedOn: /Date(1461777177393+0100)/
                    UpdatedOn: /Date(1461777177393+0100)/
                    UnsubscribedOn: null
                    UnsubscribedFromID: null
                    SubscribeType: 1
                    SubscribeMethod: 2
                    CustomFields:
                    - CustomFieldID: 63705cf2-7cbb-4ac1-a246-1a8c1b416026
                      Name: CheckBox
                      Value: 'True'
                    - CustomFieldID: 63705cf2-7cbb-4ac1-a246-1a8c1b416026
                      Name: Date
                      Value: 4/12/2016 12:00:00 AM
                    - CustomFieldID: 9df6dcc4-bef2-47e7-93af-86889b6b6d6a
                      Name: Age
                      Value: '25'
                    - CustomFieldID: 0d2199aa-65fc-448c-b9fe-199e3b72ebc5
                      Name: Some custom field
                      Value: Something2
                    - CustomFieldID: 46721a6b-09aa-46ff-bab1-a0b75dea24cf
                      Name: Some custom field 2
                      Value: Text2
                    RemovedOn: null
                  - ID: 0bb00735-7ec7-41de-ab04-d622f67340c4
                    Name: John
                    Email: john@email.com
                    CreatedOn: /Date(1461777334373+0100)/
                    UpdatedOn: /Date(1461783253670+0100)/
                    UnsubscribedOn: null
                    UnsubscribedFromID: null
                    SubscribeType: 1
                    SubscribeMethod: 0
                    CustomFields:
                    - CustomFieldID: 0bb00735-7ec7-41de-ab04-d622f67340c4
                      Name: Country
                      Value: UK
                    - CustomFieldID: 46721a6b-09aa-46ff-bab1-a0b75dea24cf
                      Name: Status
                      Value: single
                    RemovedOn: null
      security:
      - apikeyQuery: []
  /lists/{MailingListID}/segments/create.{Format}:
    post:
      operationId: creatingANewEmptySegment
      summary: Creating a new empty segment
      description: Creates a new empty segment (without criteria) for the given mailing list. You may specify the name of the segment and the way the criteria will match together. Blueprint also documents this operation as "Creating a new segment".
      tags:
      - Segments
      parameters:
      - name: MailingListID
        in: path
        required: true
        schema:
          type: string
        example: a589366a-1a34-4965-ac50-f1299fe5979e
      - name: Format
        in: path
        required: true
        schema:
          type: string
        example: json
      - name: apikey
        in: query
        required: true
        schema:
          type: string
        description: Account API key. Passed as a query-string parameter on every call.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                Name:
                  type: string
                  description: The name of the segment. ***(Required)***
                MatchType:
                  type: string
                  description: Specifies how the segment's criteria will match together. This must be one of the following values. ***(Optional)*** <br/> If not specified, `All` will be assumed.
                FetchType:
                  type: string
                  description: Specifies how many of the criteria matching subscribers will be contained in the created segment.***(Optional)*** <br/> If not specified, `All` will be assumed.
                FetchValue:
                  type: string
                  description: Specifies the maximum number for `FetchType:Top` or percentage for `FetchType:TopPercent`of members to be contained in the created segment.  If not specified, `0` will be assumed.
            example:
              Name: New Customers
              MatchType: All
              FetchType: Top
              FetchValue: '200'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  Code:
                    description: The response code for this call. This will be 0 if successful.
                  Error:
                    description: The response message. This will be null if successful.
                  Context:
                    description: Contains the id of the new segment.
              example:
                Code: 0
                Error: null
                Context: 10199
      security:
      - apikeyQuery: []
  /lists/{MailingListID}/segments/{SegmentID}/update.{Format}:
    post:
      operationId: updatingASegment
      summary: Updating a segment
      description: Updates the properties and criteria of an existing segment. You may update the name and match type of the segment. If criteria are included these will also be updated. You may update only the criteria. In that case, the existing name and settings will be retained.
      tags:
      - Segments
      parameters:
      - name: MailingListID
        in: path
        required: true
        schema:
          type: string
        example: a589366a-1a34-4965-ac50-f1299fe5979e
      - name: SegmentID
        in: path
        required: true
        schema:
          type: string
      - name: Format
        in: path
        required: true
        schema:
          type: string
        example: json
      - name: apikey
        in: query
        required: true
        schema:
          type: string
        description: Account API key. Passed as a query-string parameter on every call.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                Name:
                  type: string
                  description: The name of the segment. ***(Optional)*** <br/> If not specified, the existing name will be retained.
                MatchType:
                  type: string
                  description: Specifies how the segment's criteria will match together. This must be one of the following values. ***(Optional)*** <br/> If not specified, existing settings will be retained.
                FetchType:
                  type: string
                  description: Specifies how many of the criteria matching subscribers will be contained in the created segment. ***(Optional)*** <br/> If not specified, existing settings will be retained.
                FetchValue:
                  type: string
                  description: Specifies the maximum number for `FetchType:Top` or percentage for `FetchType:TopPercent`of members to be contained in the created segment.  If not specified, `0` will be assumed.
                Criteria:
                  type: string
                  description: An array of the criteria to filter the mailing list by. ***(Optional)*** <br/> If not specified, existing criteria will be retained.
                Field:
                  type: string
                  description: The field of the criterion to filter the mailing list by. This must be one of the following values. ***(Required)***
                Comparer:
                  type: string
                  description: An operator that defines the way to compare a criterion field with its value. This must be one of the following values. ***(Optional)*** <br/> If not specified, `Is` will be assumed.
                Value:
                  type: string
                  description: A search term to filter the specified field by. ***(Optional)***
                Date Functions:
                  type: string
                  description: Can be used with fields of DateTime data type.
            example:
              Name: Customer Tracking and Opener
              MatchType: Any
              FetchType: All
              Criteria:
              - Field: AddedAnythingToCart
                Comparer: IsTrue
                Times: 2
                ProductCode: '123'
                LastXMinutes: 4320
                WebsiteId: 12345678-1234-abdc-efgh-1231bc456efg789hij
              - Field: OpenedAnyCampaign
                Comparer: IsTrue
                DateFrom: '2019-09-01'
                DateTo: '2020-12-01'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  Code:
                    description: The response code for this call. This will be 0 if successful.
                  Error:
                    description: The response message. This will be null if successful.
                  Context:
                    description: The response context for this call. This will be null if successful.
              example:
                Code: 0
                Error: null
                Context: null
      security:
      - apikeyQuery: []
  /lists/{MailingListID}/segments/{SegmentID}/criteria/add.{Format}:
    post:
      operationId: addingCriteriaToSegments
      summary: Adding criteria to segments
      description: Adds a new criterion (a rule) to the specified segment.
      tags:
      - Segments
      parameters:
      - name: MailingListID
        in: path
        required: true
        schema:
          type: string
        example: a589366a-1a34-4965-ac50-f1299fe5979e
      - name: SegmentID
        in: path
        required: true
        schema:
          type: string
        example: '10199'
      - name: Format
        in: path
        required: true
        schema:
          type: string
        example: json
      - name: apikey
        in: query
        required: true
        schema:
          type: string
        description: Account API key. Passed as a query-string parameter on every call.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                Field:
                  type: string
                  description: The field of the criterion to filter the mailing list by. This must be one of the following values. ***(Required)***
                Comparer:
                  type: string
                  description: An operator that defines the way to compare a criterion field with its value. This must be one of the following values. ***(Optional)*** <br/> If not specified, `Is` will be assumed.
                Value:
                  type: string
                  description: A search term to filter the specified field by. ***(Optional)***
                Date Functions:
                  type: string
                  description: Can be used with fields of DateTime data type.
            example:
              Field: DateAdded
              DateFunction: Year
              Comparer: Is
              Value: '2020'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  Code:
                    description: The response code for this call. This will be 0 if successful.
                  Error:
                    description: The response error for this call. This will be null if successful.
                  Context:
                    description: Contains the new criteriaID.
              example:
                Code: 0
                Error: null
                Context: 15783
      security:
      - apikeyQuery: []
  /lists/{MailingListID}/segments/{SegmentID}/criteria/{CriteriaID}/update.{Format}:
    post:
      operationId: updatingSegmentCriteria
      summary: Updating segment criteria
      description: Updates an existing criterion in the specified segment.
      tags:
      - Segments
      parameters:
      - name: MailingListID
        in: path
        required: true
        schema:
          type: string
        example: a589366a-1a34-4965-ac50-f1299fe5979e
      - name: SegmentID
        in: path
        required: true
        schema:
          type: string
        example: '10199'
      - name: CriteriaID
        in: path
        required: true
        schema:
          type: number
        example: '15783'
      - name: Format
        in: path
        required: true
        schema:
          type: string
        example: json
      - name: apikey
        in: query
        required: true
        schema:
          type: string
        description: Account API key. Passed as a query-string parameter on every call.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                Field:
                  type: string
                  description: The field of the criterion to filter the mailing list by. This must be one of the following values. ***(Required)***
                Comparer:
                  type: string
                  description: An operator that defines the way to compare a criterion field with its value. This must be one of the following values. ***(Optional)*** <br/> If not specified, `Is` will be assumed.
                Value:
                  type: string
                  description: A search term to filter the specified field by. ***(Optional)***
                Date Functions:
                  type: string
                  description: Can be used with fields of DateTime data type.
            example:
              Field: LinkURL
              Comparer: is
              Value: https://www.moosend.com/
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  Code:
                    description: The response code for this call. This will be 0 if successful.
                  Error:
                    description: The response error for this call. This will be null if successful.
                  Context:
                    description: Contains the updated criteriaID.
              example:
                Code: 0
                Error: null
                Context: 15783
      security:
      - apikeyQuery: []
  /lists/{MailingListID}/segments/{SegmentID}/delete.{Format}:
    delete:
      operationId: deletingASegment
      summary: Deleting A Segment
      description: Deletes a segment along with its criteria from the mailing list. The subscribers of the mailing list that the segment returned are not deleted or affected in any way.
      tags:
      - Segments
      parameters:
      - name: MailingListID
        in: path
        required: true
        schema:
          type: string
        example: a589366a-1a34-4965-ac50-f1299fe5979e
      - name: SegmentID
        in: path
        required: true
        schema:
          type: string
        example: '10199'
      - name: Format
        in: path
        required: true
        schema:
          type: string
        example: json
      - name: apikey
        in: query
        required: true
        schema:
          type: string
        description: Account API key. Passed as a query-string parameter on every call.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  Code:
                    description: The response code for this call. This will be 0 if successful.
                  Error:
                    description: The response error for this call. This will be null if successful.
                  Context:
                    description: The response context for this call. This will be null if successful.
              example:
                Code: 0
                Error: null
                Context: null
      security:
      - apikeyQuery: []
components:
  securitySchemes:
    apikeyQuery:
      type: apiKey
      in: query
      name: apikey
      description: Moosend account API key, supplied as the `apikey` query-string parameter on every request. Generated in the account Settings menu.