---
title: "Create an async, mint-only batch of scoped magic links (internal)."
method: POST
path: "/scoped-magic-link/batch"
tags: ["MagicLink"]
---

# Create an async, mint-only batch of scoped magic links (internal).

`POST /scoped-magic-link/batch`

Create a new magic-link batch (async, mint-only).

Dispatches synchronously so the controller can return the batch_id and
acceptance summary immediately (202 Accepted); the actual link-minting is
handled by the async orchestrator dispatched inside CreateMagicLinkBatch.

App-token-only: privateEndpoint blocks external apps, and
assertAppTokenOnly() additionally rejects internal tokens that carry
member context. A batch can span multiple orgs and is triggered
service-to-service (the Admin bulk-generate flow) — there is no single
member to act on behalf of, and no per-member resource to authorize
against. Confirmed with the consuming squad (Admin): calls carry an app
token, never a member-scoped token. If member-scoped access is ever
added, re-check per-row authorization in MintScopedMagicLinkJob
(security-patterns.md, IDOR + authorize-on-mutation rules).

## Request body

- object
  - `action_scope` string, required
  - `idempotency_key` string, required
  - `requests` object[], required
    - `organization_id` string, required
    - `recurring_donation_plan_id` string, required
    - `expires_at` string, date-time
    - `amounts` integer[]

## Response `202`

Batch accepted; minting proceeds asynchronously. Poll the Location header (GET status) for progress.

- object
  - `batch_id` string, required
  - `total` integer, required
  - `accepted` integer, required
  - `rejected` object[], required

## Other responses

- `400` — Validation failed: bad action_scope, empty or oversized requests, or missing idempotency_key.
- `403` — Caller is an external app, or an internal app carrying member context (application tokens only).

---

[API](https://skmtc.net/gofundme/apis/gofundme-pro-api.md) · [All operations](https://skmtc.net/gofundme/apis/gofundme-pro-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gofundme/gofundme-pro-api/versions/d22bb925eeed/schema)
