Mailchimp · Capability
Mailchimp Marketing API — Segments
Mailchimp Marketing API — Segments. 9 operations. Lead operation: Mailchimp List Segments. Self-contained Naftiko capability covering one Mailchimp business surface.
What You Can Do
GET
Previewasegment
— Mailchimp List Segments
/v1/lists/{list-id}/segments
POST
Postlistsidsegments
— Mailchimp Add Segment
/v1/lists/{list-id}/segments
GET
Getlistsidsegmentsid
— Mailchimp Get Segment Info
/v1/lists/{list-id}/segments/{segment-id}
DELETE
Deletelistsidsegmentsid
— Mailchimp Delete Segment
/v1/lists/{list-id}/segments/{segment-id}
PATCH
Patchlistsidsegmentsid
— Mailchimp Update Segment
/v1/lists/{list-id}/segments/{segment-id}
POST
Postlistsidsegmentsid
— Mailchimp Batch Add or Remove Members
/v1/lists/{list-id}/segments/{segment-id}
GET
Getlistsidsegmentsidmembers
— Mailchimp List Members in Segment
/v1/lists/{list-id}/segments/{segment-id}/members
POST
Postlistsidsegmentsidmembers
— Mailchimp Add Member to Segment
/v1/lists/{list-id}/segments/{segment-id}/members
DELETE
Deletelistsidsegmentsidmembersid
— Mailchimp Remove List Member From Segment
/v1/lists/{list-id}/segments/{segment-id}/members/{subscriber-hash}
MCP Tools
mailchimp-list-segments
Mailchimp List Segments
read-only
idempotent
mailchimp-add-segment
Mailchimp Add Segment
mailchimp-get-segment-info
Mailchimp Get Segment Info
read-only
idempotent
mailchimp-delete-segment
Mailchimp Delete Segment
idempotent
mailchimp-update-segment
Mailchimp Update Segment
idempotent
mailchimp-batch-add-remove-members
Mailchimp Batch Add or Remove Members
mailchimp-list-members-segment
Mailchimp List Members in Segment
read-only
idempotent
mailchimp-add-member-segment
Mailchimp Add Member to Segment
mailchimp-remove-list-member-segment
Mailchimp Remove List Member From Segment
idempotent
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: Mailchimp Marketing API — Segments
description: 'Mailchimp Marketing API — Segments. 9 operations. Lead operation: Mailchimp List Segments. Self-contained
Naftiko capability covering one Mailchimp business surface.'
tags:
- Mailchimp
- Segments
created: '2026-05-19'
modified: '2026-05-19'
binds:
- namespace: env
keys:
MAILCHIMP_API_KEY: MAILCHIMP_API_KEY
capability:
consumes:
- type: http
namespace: marketing-segments
baseUri: https://server.api.mailchimp.com/3.0
description: Mailchimp Marketing API — Segments business capability. Self-contained, no shared references.
resources:
- name: lists-list_id-segments
path: /lists/{list_id}/segments
operations:
- name: previewasegment
method: GET
description: Mailchimp List Segments
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: fields
in: query
type: array
description: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
- name: exclude_fields
in: query
type: array
description: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
- name: count
in: query
type: integer
description: The number of records to return. Default value is 10. Maximum value is 1000
- name: offset
in: query
type: integer
description: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination),
this it the number of records from a collection to skip. D
- name: list_id
in: path
type: string
description: The unique ID for the list.
required: true
- name: type
in: query
type: string
description: Limit results based on segment type.
- name: since_created_at
in: query
type: string
description: 'Restrict results to segments created after the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.'
- name: before_created_at
in: query
type: string
description: 'Restrict results to segments created before the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.'
- name: include_cleaned
in: query
type: boolean
description: Include cleaned members in response
- name: include_transactional
in: query
type: boolean
description: Include transactional members in response
- name: include_unsubscribed
in: query
type: boolean
description: Include unsubscribed members in response
- name: since_updated_at
in: query
type: string
description: 'Restrict results to segments update after the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.'
- name: before_updated_at
in: query
type: string
description: 'Restrict results to segments update before the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.'
- name: postlistsidsegments
method: POST
description: Mailchimp Add Segment
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: list_id
in: path
type: string
description: The unique ID for the list.
required: true
- name: body
in: body
type: object
required: true
- name: lists-list_id-segments-segment_id
path: /lists/{list_id}/segments/{segment_id}
operations:
- name: getlistsidsegmentsid
method: GET
description: Mailchimp Get Segment Info
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: fields
in: query
type: array
description: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
- name: exclude_fields
in: query
type: array
description: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
- name: list_id
in: path
type: string
description: The unique ID for the list.
required: true
- name: segment_id
in: path
type: string
description: The unique id for the segment.
required: true
- name: include_cleaned
in: query
type: boolean
description: Include cleaned members in response
- name: include_transactional
in: query
type: boolean
description: Include transactional members in response
- name: include_unsubscribed
in: query
type: boolean
description: Include unsubscribed members in response
- name: deletelistsidsegmentsid
method: DELETE
description: Mailchimp Delete Segment
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: list_id
in: path
type: string
description: The unique ID for the list.
required: true
- name: segment_id
in: path
type: string
description: The unique id for the segment.
required: true
- name: patchlistsidsegmentsid
method: PATCH
description: Mailchimp Update Segment
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: list_id
in: path
type: string
description: The unique ID for the list.
required: true
- name: segment_id
in: path
type: string
description: The unique id for the segment.
required: true
- name: body
in: body
type: object
required: true
- name: postlistsidsegmentsid
method: POST
description: Mailchimp Batch Add or Remove Members
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: body
in: body
type: object
required: true
- name: list_id
in: path
type: string
description: The unique ID for the list.
required: true
- name: segment_id
in: path
type: string
description: The unique id for the segment.
required: true
- name: lists-list_id-segments-segment_id-members
path: /lists/{list_id}/segments/{segment_id}/members
operations:
- name: getlistsidsegmentsidmembers
method: GET
description: Mailchimp List Members in Segment
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: fields
in: query
type: array
description: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
- name: exclude_fields
in: query
type: array
description: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
- name: count
in: query
type: integer
description: The number of records to return. Default value is 10. Maximum value is 1000
- name: offset
in: query
type: integer
description: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination),
this it the number of records from a collection to skip. D
- name: list_id
in: path
type: string
description: The unique ID for the list.
required: true
- name: segment_id
in: path
type: string
description: The unique id for the segment.
required: true
- name: include_cleaned
in: query
type: boolean
description: Include cleaned members in response
- name: include_transactional
in: query
type: boolean
description: Include transactional members in response
- name: include_unsubscribed
in: query
type: boolean
description: Include unsubscribed members in response
- name: postlistsidsegmentsidmembers
method: POST
description: Mailchimp Add Member to Segment
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: list_id
in: path
type: string
description: The unique ID for the list.
required: true
- name: segment_id
in: path
type: string
description: The unique id for the segment.
required: true
- name: body
in: body
type: object
required: true
- name: lists-list_id-segments-segment_id-members-subscriber_hash
path: /lists/{list_id}/segments/{segment_id}/members/{subscriber_hash}
operations:
- name: deletelistsidsegmentsidmembersid
method: DELETE
description: Mailchimp Remove List Member From Segment
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: list_id
in: path
type: string
description: The unique ID for the list.
required: true
- name: segment_id
in: path
type: string
description: The unique id for the segment.
required: true
- name: subscriber_hash
in: path
type: string
description: The MD5 hash of the lowercase version of the list member's email address.
required: true
exposes:
- type: rest
namespace: marketing-segments-rest
port: 8080
description: REST adapter for Mailchimp Marketing API — Segments. One Spectral-compliant resource per consumed operation,
prefixed with /v1.
resources:
- path: /v1/lists/{list-id}/segments
name: lists-list-id-segments
description: REST surface for lists-list_id-segments.
operations:
- method: GET
name: previewasegment
description: Mailchimp List Segments
call: marketing-segments.previewasegment
with:
fields: rest.fields
exclude_fields: rest.exclude_fields
count: rest.count
offset: rest.offset
list_id: rest.list_id
type: rest.type
since_created_at: rest.since_created_at
before_created_at: rest.before_created_at
include_cleaned: rest.include_cleaned
include_transactional: rest.include_transactional
include_unsubscribed: rest.include_unsubscribed
since_updated_at: rest.since_updated_at
before_updated_at: rest.before_updated_at
outputParameters:
- type: object
mapping: $.
- method: POST
name: postlistsidsegments
description: Mailchimp Add Segment
call: marketing-segments.postlistsidsegments
with:
list_id: rest.list_id
body: rest.body
outputParameters:
- type: object
mapping: $.
- path: /v1/lists/{list-id}/segments/{segment-id}
name: lists-list-id-segments-segment-id
description: REST surface for lists-list_id-segments-segment_id.
operations:
- method: GET
name: getlistsidsegmentsid
description: Mailchimp Get Segment Info
call: marketing-segments.getlistsidsegmentsid
with:
fields: rest.fields
exclude_fields: rest.exclude_fields
list_id: rest.list_id
segment_id: rest.segment_id
include_cleaned: rest.include_cleaned
include_transactional: rest.include_transactional
include_unsubscribed: rest.include_unsubscribed
outputParameters:
- type: object
mapping: $.
- method: DELETE
name: deletelistsidsegmentsid
description: Mailchimp Delete Segment
call: marketing-segments.deletelistsidsegmentsid
with:
list_id: rest.list_id
segment_id: rest.segment_id
outputParameters:
- type: object
mapping: $.
- method: PATCH
name: patchlistsidsegmentsid
description: Mailchimp Update Segment
call: marketing-segments.patchlistsidsegmentsid
with:
list_id: rest.list_id
segment_id: rest.segment_id
body: rest.body
outputParameters:
- type: object
mapping: $.
- method: POST
name: postlistsidsegmentsid
description: Mailchimp Batch Add or Remove Members
call: marketing-segments.postlistsidsegmentsid
with:
body: rest.body
list_id: rest.list_id
segment_id: rest.segment_id
outputParameters:
- type: object
mapping: $.
- path: /v1/lists/{list-id}/segments/{segment-id}/members
name: lists-list-id-segments-segment-id-members
description: REST surface for lists-list_id-segments-segment_id-members.
operations:
- method: GET
name: getlistsidsegmentsidmembers
description: Mailchimp List Members in Segment
call: marketing-segments.getlistsidsegmentsidmembers
with:
fields: rest.fields
exclude_fields: rest.exclude_fields
count: rest.count
offset: rest.offset
list_id: rest.list_id
segment_id: rest.segment_id
include_cleaned: rest.include_cleaned
include_transactional: rest.include_transactional
include_unsubscribed: rest.include_unsubscribed
outputParameters:
- type: object
mapping: $.
- method: POST
name: postlistsidsegmentsidmembers
description: Mailchimp Add Member to Segment
call: marketing-segments.postlistsidsegmentsidmembers
with:
list_id: rest.list_id
segment_id: rest.segment_id
body: rest.body
outputParameters:
- type: object
mapping: $.
- path: /v1/lists/{list-id}/segments/{segment-id}/members/{subscriber-hash}
name: lists-list-id-segments-segment-id-members-subscriber-hash
description: REST surface for lists-list_id-segments-segment_id-members-subscriber_hash.
operations:
- method: DELETE
name: deletelistsidsegmentsidmembersid
description: Mailchimp Remove List Member From Segment
call: marketing-segments.deletelistsidsegmentsidmembersid
with:
list_id: rest.list_id
segment_id: rest.segment_id
subscriber_hash: rest.subscriber_hash
outputParameters:
- type: object
mapping: $.
- type: mcp
namespace: marketing-segments-mcp
port: 9090
transport: http
description: MCP adapter for Mailchimp Marketing API — Segments. One tool per consumed operation, routed inline through
this capability's consumes block.
tools:
- name: mailchimp-list-segments
description: Mailchimp List Segments
hints:
readOnly: true
destructive: false
idempotent: true
call: marketing-segments.previewasegment
with:
fields: tools.fields
exclude_fields: tools.exclude_fields
count: tools.count
offset: tools.offset
list_id: tools.list_id
type: tools.type
since_created_at: tools.since_created_at
before_created_at: tools.before_created_at
include_cleaned: tools.include_cleaned
include_transactional: tools.include_transactional
include_unsubscribed: tools.include_unsubscribed
since_updated_at: tools.since_updated_at
before_updated_at: tools.before_updated_at
outputParameters:
- type: object
mapping: $.
- name: mailchimp-add-segment
description: Mailchimp Add Segment
hints:
readOnly: false
destructive: false
idempotent: false
call: marketing-segments.postlistsidsegments
with:
list_id: tools.list_id
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: mailchimp-get-segment-info
description: Mailchimp Get Segment Info
hints:
readOnly: true
destructive: false
idempotent: true
call: marketing-segments.getlistsidsegmentsid
with:
fields: tools.fields
exclude_fields: tools.exclude_fields
list_id: tools.list_id
segment_id: tools.segment_id
include_cleaned: tools.include_cleaned
include_transactional: tools.include_transactional
include_unsubscribed: tools.include_unsubscribed
outputParameters:
- type: object
mapping: $.
- name: mailchimp-delete-segment
description: Mailchimp Delete Segment
hints:
readOnly: false
destructive: true
idempotent: true
call: marketing-segments.deletelistsidsegmentsid
with:
list_id: tools.list_id
segment_id: tools.segment_id
outputParameters:
- type: object
mapping: $.
- name: mailchimp-update-segment
description: Mailchimp Update Segment
hints:
readOnly: false
destructive: false
idempotent: true
call: marketing-segments.patchlistsidsegmentsid
with:
list_id: tools.list_id
segment_id: tools.segment_id
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: mailchimp-batch-add-remove-members
description: Mailchimp Batch Add or Remove Members
hints:
readOnly: false
destructive: false
idempotent: false
call: marketing-segments.postlistsidsegmentsid
with:
body: tools.body
list_id: tools.list_id
segment_id: tools.segment_id
outputParameters:
- type: object
mapping: $.
- name: mailchimp-list-members-segment
description: Mailchimp List Members in Segment
hints:
readOnly: true
destructive: false
idempotent: true
call: marketing-segments.getlistsidsegmentsidmembers
with:
fields: tools.fields
exclude_fields: tools.exclude_fields
count: tools.count
offset: tools.offset
list_id: tools.list_id
segment_id: tools.segment_id
include_cleaned: tools.include_cleaned
include_transactional: tools.include_transactional
include_unsubscribed: tools.include_unsubscribed
outputParameters:
- type: object
mapping: $.
- name: mailchimp-add-member-segment
description: Mailchimp Add Member to Segment
hints:
readOnly: false
destructive: false
idempotent: false
call: marketing-segments.postlistsidsegmentsidmembers
with:
list_id: tools.list_id
segment_id: tools.segment_id
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: mailchimp-remove-list-member-segment
description: Mailchimp Remove List Member From Segment
hints:
readOnly: false
destructive: true
idempotent: true
call: marketing-segments.deletelistsidsegmentsidmembersid
with:
list_id: tools.list_id
segment_id: tools.segment_id
subscriber_hash: tools.subscriber_hash
outputParameters:
- type: object
mapping: $.