Skip to content

fix(api-keys): rename the update params key to id - #269

Merged
felipefreitag merged 2 commits into
mainfrom
fix/api-key-update-id-key
Aug 25, 2026
Merged

fix(api-keys): rename the update params key to id#269
felipefreitag merged 2 commits into
mainfrom
fix/api-key-update-id-key

Conversation

@felipefreitag

@felipefreitag felipefreitag commented Aug 25, 2026

Copy link
Copy Markdown
Member

What

ApiKeys.update takes params["api_key_id"]; every other update params dict in the SDK uses id:

Domains.update({"id": ...})
Emails.update({"id": ...})
Templates.update({"id": ...})
ContactProperties.update({"id": ...})
ApiKeys.update({"api_key_id": ...})   # the exception

This renames the key to id in the TypedDict, both method bodies, the tests, and both examples, and bumps the version to 2.40.2.

Why a clean rename is safe

The method shipped yesterday (v2.40.0, 2026-08-24). Datadog traces for PATCH /api-keys/:apiKeyId since then show 33 requests; the indexed spans group into two user agents, node and resend-remote-mcp:1.0.0. Zero calls from resend-python. There is nobody to break, so no deprecation alias.

Scope

remove(api_key_id=...) keeps its name: positional id parameters ship in both forms across the SDK (id in audiences/broadcasts/contact_properties, <resource>_id in domains/emails/automations), and its kwarg form is long documented.

Checks

pytest 614 passed; mypy clean; flake8 clean (flake8 7.x locally, CI pins <5).

Follow-up: the Python tab on docs update-api-key.mdx teaches "api_key_id" and needs the same rename when this releases.

Every other update params dict uses the id key (domains, emails,
templates, contact_properties); api_keys shipped api_key_id in v2.40.0.
Rename it while the method is one day old. The remove positional
parameter keeps its name; positional id names ship in both forms across
the SDK.

@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.

No issues found across 5 files

Confidence score: 5/5

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

Requires human review: Renames the api_key_id parameter to id in the update/update_async methods and public UpdateParams TypedDict, aligning with SDK convention but breaking the v2.40.0 request shape.

Re-trigger cubic

@felipefreitag
felipefreitag merged commit 4c52e84 into main Aug 25, 2026
20 checks passed
@felipefreitag
felipefreitag deleted the fix/api-key-update-id-key branch August 25, 2026 20:55
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