> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.helpyousponsor.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Queue a confirmed manual donor merge

> Consumes a current actor-owned review after confirming same-person identity and a trimmed 10–2,000 character reason. Rechecks permissions, profile/dependency snapshot and stewardship impact before admitting exactly one queued merge. Same review and identical command recover the original batch; changed, expired or stale reviews return 409. Dependencies can return 422 blockers. Worker execution rechecks authority and snapshot before merging; HTTP 202 confirms admission, not completion.



## OpenAPI

````yaml post /admin/donors/duplicates/manual-merge
openapi: 3.0.0
info:
  title: Gratona API
  description: >-
    REST API for the Gratona fundraising platform, including donor, donation,
    sponsorship, program, event, and integration workflows. Endpoints are
    organized by tag. Most endpoints require either a Passport bearer token or
    an issued API key — see the Security Schemes section.
  contact:
    name: Gratona Engineering
    url: https://gratona.com
    email: devs@gratona.com
  version: 1.0.0
servers:
  - url: https://api.gratona.com/v1
    description: Server Version 1.0.0
security: []
tags:
  - name: Auth
    description: >-
      Login, signup, logout, password reset, and email verification for admin
      users and donors.
  - name: Donors
    description: >-
      Donor records: CRUD, profile fields, household linkage, search, filters,
      merge, and duplicate detection.
  - name: Donations
    description: >-
      Individual donation records, recurring commitments, soft credits, refunds,
      designations, and exports.
  - name: Sponsorships
    description: >-
      Donor-to-entity commitment relationships, lifecycle transitions, and
      commitment-specific filters.
  - name: Entities
    description: >-
      Recipient records (children, families, projects, animals, etc.), their
      status, and entity-level fields.
  - name: Programs
    description: >-
      Program / campaign configuration: hierarchy, settings, and program-level
      metadata.
  - name: Forms
    description: >-
      Custom form builder (HysForm), form fields, standardized donor fields, and
      field migrations.
  - name: Trips
    description: >-
      Mission-trip management: trips, participants, budgets, tasks,
      e-signatures, fundraising milestones, and background checks.
  - name: Communications
    description: >-
      Email templates, SMS, newsletters, donor email manager, and per-donor
      notes.
  - name: Payments
    description: >-
      Payment-gateway management (Stripe, PayPal, Flutterwave, QuickBooks).
      Excludes inbound webhooks — see the Webhooks tag.
  - name: Reports
    description: Dashboards, analytics, scheduled reports, and exports.
  - name: Admin
    description: >-
      Client-account administration: users, groups/permissions, settings,
      integrations, and account lifecycle.
  - name: Donor Portal
    description: >-
      Endpoints consumed by the donor-facing portal (donor login, dashboard,
      donation history, messages).
  - name: Recipient Portal
    description: Endpoints consumed by the recipient-facing portal.
  - name: Public
    description: >-
      Unauthenticated public endpoints: donor signup, public trip pages,
      peer-to-peer campaigns, public checkout.
  - name: Webhooks
    description: >-
      Inbound webhooks from third parties (Stripe, PayPal, Flutterwave, Checkr,
      DropboxSign). Annotated minimally for reference; payload shapes are owned
      by the upstream provider.
  - name: Events
    description: >-
      Event setup, invitations, registration, ticketing, attendance and event
      reporting.
  - name: Journeys
    description: >-
      Journey graphs, activation, enrollment, message templates and event
      follow-up automations.
  - name: Tasks
    description: Workspace tasks, assignments, saved task views and record collaboration.
  - name: Fundraising
    description: >-
      Fundraising portfolios, stewardship plans, giving anniversaries and
      personal donor follow-up.
  - name: Impact Stories
    description: Story intake, review, assets, consent and publication workflows.
  - name: Integrations
    description: Workspace integration connections, mappings, synchronization and recovery.
  - name: Email Calendar
    description: Connected email/calendar accounts and donor interactions.
  - name: Spaces
    description: Workspace Spaces and collaborative Pages.
  - name: Library
    description: Workspace documents, source connections, files and analysis.
  - name: Intelligence
    description: Donor intelligence and Tali workspace workflows.
  - name: Automation
    description: >-
      V3 automation primitive discovery, input validation, invocation and Zapier
      contracts.
  - name: Schema
    description: V3 model, enum, capability and scope discovery.
  - name: Zapier
    description: Zapier automation connections, polling feeds and actions.
  - name: Files
    description: Files
  - name: Client
    description: Client
  - name: Payment Gateways
    description: Payment Gateways
  - name: Email Settings
    description: Email Settings
  - name: Admin Dashboard
    description: Admin Dashboard
  - name: Recipients
    description: Recipients
  - name: Historical Archived Updates
    description: Historical Archived Updates
  - name: Team & access
    description: Team & access
  - name: Settings
    description: Settings
  - name: Notifications
    description: Notifications
  - name: Participation
    description: Participation
  - name: Users
    description: Users
  - name: Wrapped
    description: Wrapped
  - name: Donor SignUp
    description: Donor SignUp
  - name: Frontend
    description: Frontend
  - name: User
    description: User
  - name: Workspace
    description: Workspace
paths:
  /admin/donors/duplicates/manual-merge:
    post:
      tags:
        - Donors
      summary: Queue a confirmed manual donor merge
      description: >-
        Consumes a current actor-owned review after confirming same-person
        identity and a trimmed 10–2,000 character reason. Rechecks permissions,
        profile/dependency snapshot and stewardship impact before admitting
        exactly one queued merge. Same review and identical command recover the
        original batch; changed, expired or stale reviews return 409.
        Dependencies can return 422 blockers. Worker execution rechecks
        authority and snapshot before merging; HTTP 202 confirms admission, not
        completion.
      operationId: ManualDonorMergeController_merge
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - review_id
                - confirmed_same_person
                - reason
              properties:
                review_id:
                  description: Unexpired actor-owned review UUID.
                  type: string
                  format: uuid
                  example: 550e8400-e29b-41d4-a716-446655440000
                confirmed_same_person:
                  description: Must be accepted to confirm same identity.
                  type: boolean
                  example: true
                reason:
                  description: Reason is trimmed before validation.
                  type: string
                  maxLength: 2000
                  minLength: 10
                  example: Verified duplicate donor records.
                field_choices:
                  description: >-
                    Optional explicit safe-field winners; other profile fields
                    follow merge defaults.
                  properties:
                    username:
                      description: Choose the surviving value for username.
                      type: string
                      enum:
                        - primary
                        - secondary
                      example: primary
                    email:
                      description: Choose the surviving value for email.
                      type: string
                      enum:
                        - primary
                        - secondary
                      example: primary
                    type:
                      description: Choose the surviving value for type.
                      type: string
                      enum:
                        - primary
                        - secondary
                      example: primary
                    organization_name:
                      description: Choose the surviving value for organization_name.
                      type: string
                      enum:
                        - primary
                        - secondary
                      example: primary
                    preferred_contact_method:
                      description: Choose the surviving value for preferred_contact_method.
                      type: string
                      enum:
                        - primary
                        - secondary
                      example: primary
                    first_name:
                      description: Choose the surviving value for first_name.
                      type: string
                      enum:
                        - primary
                        - secondary
                      example: primary
                    last_name:
                      description: Choose the surviving value for last_name.
                      type: string
                      enum:
                        - primary
                        - secondary
                      example: primary
                    phone:
                      description: Choose the surviving value for phone.
                      type: string
                      enum:
                        - primary
                        - secondary
                      example: primary
                    phone_e164:
                      description: Choose the surviving value for phone_e164.
                      type: string
                      enum:
                        - primary
                        - secondary
                      example: primary
                    street:
                      description: Choose the surviving value for street.
                      type: string
                      enum:
                        - primary
                        - secondary
                      example: primary
                    address_line2:
                      description: Choose the surviving value for address_line2.
                      type: string
                      enum:
                        - primary
                        - secondary
                      example: primary
                    city:
                      description: Choose the surviving value for city.
                      type: string
                      enum:
                        - primary
                        - secondary
                      example: primary
                    state:
                      description: Choose the surviving value for state.
                      type: string
                      enum:
                        - primary
                        - secondary
                      example: primary
                    zip:
                      description: Choose the surviving value for zip.
                      type: string
                      enum:
                        - primary
                        - secondary
                      example: primary
                    country:
                      description: Choose the surviving value for country.
                      type: string
                      enum:
                        - primary
                        - secondary
                      example: primary
                    country_code:
                      description: Choose the surviving value for country_code.
                      type: string
                      enum:
                        - primary
                        - secondary
                      example: primary
                    subdivision_code:
                      description: Choose the surviving value for subdivision_code.
                      type: string
                      enum:
                        - primary
                        - secondary
                      example: primary
                    can_receive_sms:
                      description: Choose the surviving value for can_receive_sms.
                      type: string
                      enum:
                        - primary
                        - secondary
                      example: primary
                    assigned_fundraiser_user_id:
                      description: >-
                        Choose the surviving value for
                        assigned_fundraiser_user_id.
                      type: string
                      enum:
                        - primary
                        - secondary
                      example: primary
                  type: object
                  additionalProperties: false
                plan_impact_version:
                  description: >-
                    Signed five-minute token from a 409 impact response,
                    required when open plans are materially affected.
                  type: string
                  maxLength: 4096
                  example: issued-plan-impact-version
                  nullable: true
                plan_repairs:
                  type: array
                  items:
                    required:
                      - plan_id
                      - action
                    properties:
                      plan_id:
                        description: Plan ID.
                        type: integer
                        minimum: 1
                        example: 42
                      action:
                        description: >-
                          Chosen repair from the impact required_repairs
                          choices.
                        type: string
                        maxLength: 64
                        example: archive_plan
                      action_donor_id:
                        description: Replacement action donor when required.
                        type: integer
                        example: 42
                        nullable: true
                      reason:
                        description: Nonblank reason required to archive a plan.
                        type: string
                        maxLength: 1000
                        example: Preserving the surviving donor plan.
                        nullable: true
                    type: object
                  maxItems: 50
                  nullable: true
              type: object
      responses:
        '202':
          description: Queue a confirmed manual donor merge completed.
          content:
            application/json:
              schema:
                properties:
                  success:
                    description: Command admitted.
                    type: boolean
                    example: true
                  batch_id:
                    description: Queued duplicate merge batch.
                    type: integer
                    example: 42
                  data:
                    properties:
                      batch_id:
                        description: Queued batch ID.
                        type: integer
                        example: 42
                      merges_count:
                        description: Exactly one admitted merge operation.
                        type: integer
                        example: 1
                    type: object
                type: object
        '401':
          description: Authentication is required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Insufficient permission or feature access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Feature disabled or actor-owned review unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '409':
          description: >-
            Review/plan conflict or temporary relationship lock; busy responses
            include Retry-After: 15.
          content:
            application/json:
              schema:
                oneOf:
                  - required:
                      - success
                      - code
                      - message
                      - data
                    properties:
                      success:
                        description: False on conflict.
                        type: boolean
                        example: false
                      code:
                        description: Admission conflict.
                        type: string
                        enum:
                          - MANUAL_REVIEW_ALREADY_CONFIRMED
                          - MANUAL_REVIEW_EXPIRED
                          - MANUAL_REVIEW_STALE
                        example: MANUAL_REVIEW_ALREADY_CONFIRMED
                      message:
                        description: Conflict description.
                        type: string
                        example: Review the selected records again.
                      data:
                        properties:
                          batch_id:
                            description: >-
                              Previously admitted batch when review was already
                              confirmed.
                            type: integer
                            example: 42
                        type: object
                      batch_id:
                        description: >-
                          Previously admitted batch, mirrored at top level when
                          supplied.
                        type: integer
                        example: 42
                    type: object
                  - required:
                      - success
                      - message
                      - retryable
                    properties:
                      success:
                        description: False on conflict.
                        type: boolean
                        example: false
                      message:
                        description: Busy message.
                        type: string
                        example: >-
                          Donor relationships are being updated. Try again in a
                          moment.
                      retryable:
                        description: Retry after the returned delay.
                        type: boolean
                        example: true
                    type: object
                  - required:
                      - status
                      - code
                      - message
                      - data
                    properties:
                      status:
                        description: Error status.
                        type: string
                        example: error
                      code:
                        description: Machine-readable plan conflict.
                        type: string
                        example: PLAN_IMPACT_CONFIRMATION_REQUIRED
                      message:
                        description: Review prompt.
                        type: string
                        example: Review the assignment impact before saving.
                      data:
                        $ref: '#/components/schemas/CrmApiMergePlanImpact'
                    type: object
        '422':
          description: Validation or unsupported donor dependency.
          content:
            application/json:
              schema:
                properties:
                  success:
                    description: False for dependency rejection.
                    type: boolean
                    example: false
                  message:
                    description: Rejection message.
                    type: string
                    example: Resolve listed dependencies before merging.
                  blockers:
                    type: array
                    items:
                      $ref: '#/components/schemas/CrmApiManualMergeBlocker'
                  errors:
                    description: Framework field errors on request validation failure.
                    type: object
                    additionalProperties: true
                type: object
      security:
        - bearerAuth: []
        - apiKeyAuth: []
components:
  schemas:
    ErrorResponse:
      title: ErrorResponse
      description: >-
        Generic error envelope used by most controllers. Most error responses
        pair a human-readable `message` with `status: error`. Some endpoints
        additionally include `errors` (validator errors), `error` (legacy
        single-error string), `code`, or domain-specific context fields.
      required:
        - message
      properties:
        message:
          description: Human-readable error message.
          type: string
          example: Something went wrong. Please try again.
        status:
          description: >-
            Always the literal string `error` for failures. Some endpoints omit
            this field.
          type: string
          example: error
        error:
          description: Legacy single error code/string used by older endpoints.
          type: string
          example: invalid_request
          nullable: true
        code:
          description: >-
            Optional application-level error code (not all endpoints populate
            this).
          type: string
          example: DONOR_NOT_FOUND
          nullable: true
      type: object
    NotFoundResponse:
      title: NotFoundResponse
      description: >-
        Returned with HTTP 404 when a resource lookup misses (typically because
        the id doesn't exist OR is scoped to a different `client_id`). Note:
        many endpoints intentionally collapse 'not found' and 'forbidden' into a
        single 404 to avoid leaking which records exist in another tenant.
      required:
        - message
      properties:
        message:
          description: >-
            Human-readable message. Often a more specific string like `Donor not
            found` or `Trip not found`.
          type: string
          example: Not Found
        status:
          type: string
          example: error
      type: object
    CrmApiMergePlanImpact:
      properties:
        material_impact:
          description: Merge transfers or archives stewardship plan history.
          type: boolean
          example: false
        affected_plans:
          type: array
          items:
            $ref: '#/components/schemas/StewardshipPlanImpactHeader'
        group_plans:
          type: array
          items:
            $ref: '#/components/schemas/StewardshipPlanImpactHeader'
          maxItems: 0
        transfer_candidates:
          type: array
          items:
            properties:
              plan_id:
                description: Affected plan.
                type: integer
                example: 42
              archive_required:
                description: Overlapping secondary-owned plan must be archived.
                type: boolean
                example: false
              next_subject_type:
                description: Transferred subject kind.
                type: string
                enum:
                  - donor
                  - null
                example: donor
                nullable: true
              next_subject_id:
                description: Surviving donor when transferring the plan subject.
                type: integer
                example: 42
                nullable: true
              next_members:
                type: array
                items:
                  properties:
                    member_type:
                      description: Scope member kind.
                      type: string
                      enum:
                        - donor
                        - household
                        - relationship_group
                      example: donor
                    member_id:
                      description: Member ID.
                      type: integer
                      example: 42
                    scope_role:
                      description: Scope role.
                      type: string
                      example: core
                  type: object
              next_action_donor_id:
                description: Resulting action contact.
                type: integer
                example: 42
                nullable: true
              move_action_transfer:
                description: Open move action donor references transfer.
                type: boolean
                example: false
              scope_changed:
                description: Scope membership changes.
                type: boolean
                example: false
            type: object
        scope_changes:
          type: array
          items:
            properties:
              plan_id:
                description: Affected plan.
                type: integer
                example: 42
              archive_required:
                description: Overlapping secondary-owned plan must be archived.
                type: boolean
                example: false
              next_subject_type:
                description: Transferred subject kind.
                type: string
                enum:
                  - donor
                  - null
                example: donor
                nullable: true
              next_subject_id:
                description: Surviving donor when transferring the plan subject.
                type: integer
                example: 42
                nullable: true
              next_members:
                type: array
                items:
                  properties:
                    member_type:
                      description: Scope member kind.
                      type: string
                      enum:
                        - donor
                        - household
                        - relationship_group
                      example: donor
                    member_id:
                      description: Member ID.
                      type: integer
                      example: 42
                    scope_role:
                      description: Scope role.
                      type: string
                      example: core
                  type: object
              next_action_donor_id:
                description: Resulting action contact.
                type: integer
                example: 42
                nullable: true
              move_action_transfer:
                description: Open move action donor references transfer.
                type: boolean
                example: false
              scope_changed:
                description: Scope membership changes.
                type: boolean
                example: false
            type: object
        eligible_action_donor_ids:
          type: array
          items:
            description: Eligible surviving action donor.
            type: integer
            example: 42
        collisions:
          type: array
          items:
            properties:
              plan_id:
                description: Affected plan.
                type: integer
                example: 42
              conflicting_plan:
                description: Existing overlapping plan scope header.
                type: object
                additionalProperties: true
            type: object
        authority_changes:
          type: array
          items:
            type: string
          maxItems: 0
        required_repairs:
          type: array
          items:
            properties:
              plan_id:
                description: Plan requiring a reviewed repair.
                type: integer
                example: 42
              choices:
                type: array
                items:
                  description: Required merge repair choice.
                  type: string
                  enum:
                    - archive_plan
                  example: archive_plan
            type: object
        plan_repairs:
          type: array
          items:
            properties:
              plan_id:
                description: Affected plan.
                type: integer
                example: 42
              archive_required:
                description: Overlapping secondary-owned plan must be archived.
                type: boolean
                example: false
              next_subject_type:
                description: Transferred subject kind.
                type: string
                enum:
                  - donor
                  - null
                example: donor
                nullable: true
              next_subject_id:
                description: Surviving donor when transferring the plan subject.
                type: integer
                example: 42
                nullable: true
              next_members:
                type: array
                items:
                  properties:
                    member_type:
                      description: Scope member kind.
                      type: string
                      enum:
                        - donor
                        - household
                        - relationship_group
                      example: donor
                    member_id:
                      description: Member ID.
                      type: integer
                      example: 42
                    scope_role:
                      description: Scope role.
                      type: string
                      example: core
                  type: object
              next_action_donor_id:
                description: Resulting action contact.
                type: integer
                example: 42
                nullable: true
              move_action_transfer:
                description: Open move action donor references transfer.
                type: boolean
                example: false
              scope_changed:
                description: Scope membership changes.
                type: boolean
                example: false
            type: object
        primary_donor_id:
          description: Surviving donor.
          type: integer
          example: 42
        secondary_donor_ids:
          type: array
          items:
            description: Donor being merged.
            type: integer
            example: 42
        command:
          description: Merge confirmation command.
          type: string
          example: donor_merge
        expires_at:
          description: Five-minute impact expiry.
          type: string
          format: date-time
          example: '2026-10-20T12:00:00Z'
          nullable: true
        impact_version:
          description: Signed actor/client/merge/impact confirmation.
          type: string
          example: issued-plan-impact-version
        conflicts:
          description: Present instead of full impact for PLAN_SCOPE_OVERLAP.
          type: array
          items:
            properties:
              plan_id:
                description: Overlapping plan.
                type: integer
                example: 42
              conflicting_plan:
                description: Overlap details.
                type: object
                additionalProperties: true
            type: object
      type: object
    CrmApiManualMergeBlocker:
      properties:
        code:
          description: Dependency or plan blocker code.
          type: string
          example: integration_identity_conflict
        message:
          description: Readable blocker.
          type: string
          example: Review connected identities before merging.
        donor_id:
          description: Affected donor when supplied.
          type: integer
          example: 42
        provider_key:
          description: Connected provider when supplied.
          type: string
          example: quickbooks
        connection_id:
          description: Connection ID when supplied.
          type: integer
          example: 42
        provider_object_type:
          description: External identity kind.
          type: string
          example: customer
        identities:
          type: array
          items:
            properties:
              donor_id:
                description: Identity owner.
                type: integer
                example: 42
              provider_object_id:
                description: External object ID.
                type: string
                example: customer-123
            type: object
        conflicts:
          type: array
          items:
            description: Stewardship overlapping scope details.
            type: object
            additionalProperties: true
      type: object
      additionalProperties: true
    StewardshipPlanImpactHeader:
      properties:
        id:
          description: Record identifier in this organization.
          type: integer
          example: 42
          nullable: false
        subject:
          properties:
            type:
              type: string
              enum:
                - donor
                - household
                - relationship_group
              example: donor
            id:
              description: Record identifier in this organization.
              type: integer
              example: 42
              nullable: false
          type: object
        stage:
          type: string
          enum:
            - qualifying
            - managed
          example: qualifying
        status:
          type: string
          enum:
            - draft
            - active
            - paused
            - completed
            - archived
          example: draft
        period:
          properties:
            start:
              description: Calendar date.
              type: string
              format: date
              example: '2026-10-20'
              nullable: true
            end:
              description: Calendar date.
              type: string
              format: date
              example: '2026-10-20'
              nullable: true
          type: object
        version:
          description: Optimistic concurrency version.
          type: integer
          example: 2
          nullable: false
        action_donor_id:
          description: Record identifier in this organization.
          type: integer
          example: 42
          nullable: true
        scope_version:
          description: Count.
          type: integer
          example: 2
          nullable: false
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      description: Passport bearer token authentication for legacy admin sessions.
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      description: Gratona API key sent with the compatibility header X-HYS-API-Key.
      name: X-HYS-API-Key
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.