Skip to content

preserve conversation source ownership across API key rotation #5007

Closed

Description

@Israeltheminer

Summary

Rotating an API key for the same organization-owned integration makes an existing mirrored conversation source unusable for delivery claims.

Reproduction

  1. Create an organization-owned API key A.
  2. Sync a conversation using source <source>.
  3. Create replacement key B for the same organization-owned integration.
  4. Claim deliveries for the existing source with key B.
  5. The request returns 403 INTEGRATION_NOT_OWNED.

Expected behavior

A replacement key for the same integration should retain access to existing mirrored sources and queued deliveries. A key belonging to a different integration should remain blocked.

Acceptance criteria

  • Key rotation preserves ownership of existing sources.
  • Queued deliveries remain claimable after rotation.
  • Different integrations still receive INTEGRATION_NOT_OWNED.
  • Existing source bindings are migrated without duplicate conversations.

Changing the source name is only a workaround because it strands replies already queued under the original source.

Activity

  1. added a commit that references this issue on Nov 3, 2026
    09fabf5
  2. yannickmonney commented on Nov 3, 2026

    @yannickmonney
    Contributor

    Fixed on the stable train by "fix(platform): keep API mirror ownership across key rotation" (09fabf551; it reaches main with the next train pull request, and the commit closes this issue then). It builds on #5008. A mirror now belongs to whom the key belongs to (the person for a personal key and for a key made for a member, the team or the organization for a key made for one), so a replacement key continues the mirror and claims the replies queued before the swap.

    Two keys made for the same team or organization share their mirrors; separate integrations need different teams or members (CONV-R14 and the API reference say so). Migration 0235 backfills the owner of the existing mirrors and keeps a trigger for the rows an older image inserts during a roll.

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

Metadata

Metadata

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions