Skip to content

feat: add update/update_async for renaming a segment - #270

Merged
dielduarte merged 4 commits into
mainfrom
feature/dev-1205-edit-segments-through-the-api
Aug 26, 2026
Merged

feat: add update/update_async for renaming a segment#270
dielduarte merged 4 commits into
mainfrom
feature/dev-1205-edit-segments-through-the-api

Conversation

@dielduarte

@dielduarte dielduarte commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Adds Segments.update() / Segments.update_async() for PATCH /segments/:id, which renames a segment. Mirrors the existing Topics.update() implementation.

import resend

resend.api_key = "re_xxxxxxxxx"

params: resend.Segments.UpdateParams = {
    "name": "New segment name",
}

segment = resend.Segments.update(id="78261eea-8f8b-4381-83c6-79fa7120f1cf", params=params)

Params

Name Type Required
name string Yes

Response

{
  "object": "segment",
  "id": "78261eea-8f8b-4381-83c6-79fa7120f1cf"
}

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 3 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread resend/segments/_segments.py

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 1 file (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread tests/segments_async_test.py Outdated

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

0 issues found across 4 files (changes from recent commits).

Confidence score: 5/5

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

Requires human review: Auto-approval blocked by 2 unresolved issues from previous reviews.

Re-trigger cubic

@dielduarte
dielduarte marked this pull request as ready for review August 26, 2026 13:18

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

0 issues found across 1 file (changes from recent commits).

Confidence score: 5/5

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

Requires human review: Adds new public API methods Segments.update/update_async for renaming a segment, introducing new public params and response types.

Re-trigger cubic

@dielduarte
dielduarte merged commit 1c56643 into main Aug 26, 2026
20 checks passed
@dielduarte
dielduarte deleted the feature/dev-1205-edit-segments-through-the-api branch August 26, 2026 16:07
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.

2 participants