Skip to content

feat(api-keys): add ApiKeyUpdateAsync for PATCH /api-keys/:id - #143

Merged
dielduarte merged 2 commits into
mainfrom
feature/update-api-key
Aug 21, 2026
Merged

feat(api-keys): add ApiKeyUpdateAsync for PATCH /api-keys/:id#143
dielduarte merged 2 commits into
mainfrom
feature/update-api-key

Conversation

@dielduarte

@dielduarte dielduarte commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds ApiKeyUpdateAsync(Guid apiKeyId, string name) to the library, plus an apikey update CLI subcommand, for the new PATCH /api-keys/:id endpoint — see https://resend.com/docs/api-reference/api-keys/update-api-key.
  • Only name is patchable. permission/domain_id are deliberately not exposed — the endpoint doesn't accept them (prevents a leaked management key from silently widening another key's scope).

Draft — SDK rollout in progress, tracked in Linear as DEV-1219.

Test plan

  • dotnet build -c Release — 0 errors
  • dotnet test -c Release --no-build — all passing (189/189)
  • CLI sanity check: resend-cli apikey update --help

Renames an API key by name only; permission and domain_id stay
immutable through this endpoint since it accepts a bare id + name,
not the ApiKeyCreateRequest shape.

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

Copy link
Copy Markdown

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 7 files

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

Re-trigger cubic

Comment thread tests/Resend.Tests/ResendClientTests.cs
@dielduarte
dielduarte marked this pull request as ready for review August 20, 2026 17:16

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

Copy link
Copy Markdown

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 a new public API method and CLI command for PATCH /api-keys/:id, expanding the public contract with a deliberate scoping decision that warrants human review.

Re-trigger cubic

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