Skip to content

feat(contacts): add segment_id support to Contacts.list#202

Open
drish wants to merge 1 commit intomainfrom
feat/contacts-list-segment-id
Open

feat(contacts): add segment_id support to Contacts.list#202
drish wants to merge 1 commit intomainfrom
feat/contacts-list-segment-id

Conversation

@drish
Copy link
Copy Markdown
Member

@drish drish commented Apr 23, 2026

Implements GET /segments/{segment_id}/contacts by adding an optional segment_id parameter to Contacts.list() and Contacts.list_async().

Closes #201


Summary by cubic

Add support for listing contacts by segment using an optional segment_id in Contacts.list() and Contacts.list_async(). This calls GET /segments/{segment_id}/contacts and keeps global/audience listing (audience_id is now deprecated).

  • New Features

    • Added segment_id to sync/async list methods to fetch segment contacts.
    • Automatically selects base path: /segments/{segment_id}/contacts, else /audiences/{audience_id}/contacts, else /contacts.
  • Migration

    • Use segment_id for segment queries going forward; audience_id remains for backward compatibility but is deprecated.

Written for commit 3c7ac8a. Summary will update on new commits.

Implements GET /segments/{segment_id}/contacts by adding an optional
segment_id parameter to Contacts.list() and Contacts.list_async().

Closes #201
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Shadow auto-approve: would auto-approve. Additive feature adding optional segment_id support to contact listing with comprehensive tests. Low risk and follows existing SDK patterns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing List Segment Contacts function

1 participant