# List activity log events Source: https://docs.dueflow.co/api-reference/audit/list-activity-log-events /openapi.json get /v1/audit-logs > **Requires scope** `audit:read` · **Minimum role** admin Lists the organization's activity log, newest first: every mutation, every token lifecycle event, and every roster read by a parent national. Ordinary reads are not recorded. Admin-only, and intended for shipping into a SIEM. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Itemize a card transaction Source: https://docs.dueflow.co/api-reference/card-transactions/itemize-a-card-transaction /openapi.json patch /v1/card-transactions/{transactionId} > **Requires scope** `cards:write` · **Minimum role** admin [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # List card transactions Source: https://docs.dueflow.co/api-reference/card-transactions/list-card-transactions /openapi.json get /v1/card-transactions > **Requires scope** `cards:read` · **Minimum role** editor [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Retrieve a card transaction Source: https://docs.dueflow.co/api-reference/card-transactions/retrieve-a-card-transaction /openapi.json get /v1/card-transactions/{transactionId} > **Requires scope** `cards:read` · **Minimum role** editor [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Assign a card to a member Source: https://docs.dueflow.co/api-reference/cards/assign-a-card-to-a-member /openapi.json post /v1/cards/{cardId}/assign > **Requires scope** `cards:write` · **Minimum role** admin Sets the Dueflow member who holds the card, or clears it with `memberId: null` for an organization-owned card. `memberId` is required, so a request without it is refused rather than read as unassigning. Conflicts when the card already has that holder. Dueflow-only bookkeeping; the provider keeps every card under the account owner. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Cancel a card Source: https://docs.dueflow.co/api-reference/cards/cancel-a-card /openapi.json post /v1/cards/{cardId}/cancel > **Requires scope** `cards:write` · **Minimum role** admin [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Check a card issuance request Source: https://docs.dueflow.co/api-reference/cards/check-a-card-issuance-request /openapi.json get /v1/card-issuance-requests/{requestId} > **Requires scope** `cards:read` · **Minimum role** editor [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Create a card Source: https://docs.dueflow.co/api-reference/cards/create-a-card /openapi.json post /v1/cards > **Requires scope** `cards:write` · **Minimum role** admin Issues a virtual card that spends the organization's money. An organization admin must allow money movement for `cards:write` in the API policy (Settings → Developers), or the call is refused with 403 `insufficient_scope`. Requires an `Idempotency-Key` header. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Freeze a card Source: https://docs.dueflow.co/api-reference/cards/freeze-a-card /openapi.json post /v1/cards/{cardId}/freeze > **Requires scope** `cards:write` · **Minimum role** admin [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # List cards Source: https://docs.dueflow.co/api-reference/cards/list-cards /openapi.json get /v1/cards > **Requires scope** `cards:read` · **Minimum role** editor [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Retrieve a card Source: https://docs.dueflow.co/api-reference/cards/retrieve-a-card /openapi.json get /v1/cards/{cardId} > **Requires scope** `cards:read` · **Minimum role** editor [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Unfreeze a card Source: https://docs.dueflow.co/api-reference/cards/unfreeze-a-card /openapi.json post /v1/cards/{cardId}/unfreeze > **Requires scope** `cards:write` · **Minimum role** admin Needs an organization admin to allow money movement for `cards:write` in the API policy (Settings → Developers), or the call is refused with 403 `insufficient_scope`. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Update a card's limits Source: https://docs.dueflow.co/api-reference/cards/update-a-cards-limits /openapi.json patch /v1/cards/{cardId} > **Requires scope** `cards:write` · **Minimum role** admin Raising a limit, raising the per-transaction cap or changing the limit window needs an organization admin to allow money movement for `cards:write` in the API policy (Settings → Developers), or the call is refused with 403 `insufficient_scope`. Lowering limits is always allowed. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Apply a reviewed HQ roster across chapters Source: https://docs.dueflow.co/api-reference/chapters/apply-a-reviewed-hq-roster-across-chapters /openapi.json post /v1/chapters/roster-sync > **Requires scope** `chapters:write` · `members:write` · **Minimum role** editor Per entry, syncs members into an existing chapter, restores an archived chapter (`restoreChapterId`, reviewed like `chapterId`), asks an unlinked chapter to join the national (`linkRequested`; nothing is synced into it until one of its admins accepts), or creates a chapter by name; optionally invites admins. Creating by name never restores an archived chapter of that name. Requires an `Idempotency-Key` header. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # A member's collections picture Source: https://docs.dueflow.co/api-reference/collections/a-members-collections-picture /openapi.json get /v1/collections/members/{memberId} > **Requires scope** `organization:read` · `members:read` · `payments:read` · **Minimum role** viewer Eligible balance, blockers, whether a final warning or referral is possible now, the open placement and the timeline. Debt collections (First Credit Services) is chapter-only and behind a feature flag; organizations without it get 404. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Collections status Source: https://docs.dueflow.co/api-reference/collections/collections-status /openapi.json get /v1/collections > **Requires scope** `organization:read` · `members:read` · `payments:read` · **Minimum role** viewer Where the chapter stands with debt collections: agreement, settings, placement counts and dollars recovered. Debt collections (First Credit Services) is chapter-only and behind a feature flag; organizations without it get 404. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # List collections placements Source: https://docs.dueflow.co/api-reference/collections/list-collections-placements /openapi.json get /v1/collections/placements > **Requires scope** `organization:read` · `members:read` · `payments:read` · **Minimum role** viewer Every account the chapter has referred to FCS, newest first, with the latest FCS status, close code and recovered amounts. Debt collections (First Credit Services) is chapter-only and behind a feature flag; organizations without it get 404. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Record an FCS rejection Source: https://docs.dueflow.co/api-reference/collections/record-an-fcs-rejection /openapi.json post /v1/collections/placements/{placementId}/rejection > **Requires scope** `members:read` · `members:write` · `payments:read` · `payments:write` · **Minimum role** editor FCS tells us about rejected placements by email; recording one takes the account out of collections. Debt collections (First Credit Services) is chapter-only and behind a feature flag; organizations without it get 404. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Refer a member to collections Source: https://docs.dueflow.co/api-reference/collections/refer-a-member-to-collections /openapi.json post /v1/collections/members/{memberId}/referral > **Requires scope** `members:read` · `members:write` · `payments:read` · `payments:write` · **Minimum role** editor Creates the FCS placement, sent in the next Monday export. The final warning must be at least seven days old, `balanceCents` must match the current eligible balance, and all four confirmations must be true. Debt collections (First Credit Services) is chapter-only and behind a feature flag; organizations without it get 404. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Save a member's mailing address for collections Source: https://docs.dueflow.co/api-reference/collections/save-a-members-mailing-address-for-collections /openapi.json post /v1/collections/members/{memberId}/mailing-address > **Requires scope** `members:read` · `members:write` · `payments:read` · `payments:write` · **Minimum role** editor FCS needs a complete US mailing address before a member can be placed. Debt collections (First Credit Services) is chapter-only and behind a feature flag; organizations without it get 404. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Send the final collections warning Source: https://docs.dueflow.co/api-reference/collections/send-the-final-collections-warning /openapi.json post /v1/collections/members/{memberId}/final-warning > **Requires scope** `members:read` · `members:write` · `payments:read` · `payments:write` · **Minimum role** editor Emails and texts the member that their balance goes to collections in seven days. Requires an `Idempotency-Key` header. Debt collections (First Credit Services) is chapter-only and behind a feature flag; organizations without it get 404. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Create a campaign Source: https://docs.dueflow.co/api-reference/fundraising/create-a-campaign /openapi.json post /v1/campaigns > **Requires scope** `fundraise:write` · **Minimum role** editor Creates a fundraising campaign. `currency` defaults to the organization's. Requires an `Idempotency-Key` header. Leaderboards, suggested amounts and other giving-page options take their defaults and are configured in the dashboard. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Delete a campaign Source: https://docs.dueflow.co/api-reference/fundraising/delete-a-campaign /openapi.json delete /v1/campaigns/{campaignId} > **Requires scope** `fundraise:write` · **Minimum role** editor Deletes a campaign that has never received a gift. A campaign with paid or in-flight donations, or an open recurring plan, returns `409 conflict`: end it with `PATCH` instead. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # List campaigns Source: https://docs.dueflow.co/api-reference/fundraising/list-campaigns /openapi.json get /v1/campaigns > **Requires scope** `fundraise:read` · **Minimum role** viewer Lists fundraising campaigns, oldest change first. Use `updatedSince` with the returned cursor to sync incrementally. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # List donations Source: https://docs.dueflow.co/api-reference/fundraising/list-donations /openapi.json get /v1/donations > **Requires scope** `fundraise:read` · **Minimum role** viewer Lists gifts, newest first. Donor names, emails and phone numbers are not exposed in v1; a gift carries the `donorId` it was attributed to. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Retrieve a campaign Source: https://docs.dueflow.co/api-reference/fundraising/retrieve-a-campaign /openapi.json get /v1/campaigns/{campaignId} > **Requires scope** `fundraise:read` · **Minimum role** viewer [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Retrieve a donation Source: https://docs.dueflow.co/api-reference/fundraising/retrieve-a-donation /openapi.json get /v1/donations/{donationId} > **Requires scope** `fundraise:read` · **Minimum role** viewer [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Update a campaign Source: https://docs.dueflow.co/api-reference/fundraising/update-a-campaign /openapi.json patch /v1/campaigns/{campaignId} > **Requires scope** `fundraise:write` · **Minimum role** editor Changes a campaign's name, note, goal, dates or status (end a campaign with `status: "ended"`). Only the fields sent change; the currency is fixed. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Add members to a group Source: https://docs.dueflow.co/api-reference/groups/add-members-to-a-group /openapi.json post /v1/groups/{groupId}/members > **Requires scope** `groups:write` · **Minimum role** editor Adds members to a group. Members already in the group are ignored, so a nightly sync can send the whole roster. Requires an `Idempotency-Key` header. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Create a group Source: https://docs.dueflow.co/api-reference/groups/create-a-group /openapi.json post /v1/groups > **Requires scope** `groups:write` · **Minimum role** editor Creates a member group. Requires an `Idempotency-Key` header. Dues amount, due date and recurrence are set in the dashboard and are read-only through the API in v1. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # List group members Source: https://docs.dueflow.co/api-reference/groups/list-group-members /openapi.json get /v1/groups/{groupId}/members > **Requires scope** `groups:read` · `members:read` · **Minimum role** viewer Lists the active members of a group in the same PII-free shape as `/members`. Inactive members are excluded, matching the dashboard's member counts. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # List groups Source: https://docs.dueflow.co/api-reference/groups/list-groups /openapi.json get /v1/groups > **Requires scope** `groups:read`, or `groups:write` · **Minimum role** viewer Lists the organization's member groups with their dues configuration and current member count. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Remove a member from a group Source: https://docs.dueflow.co/api-reference/groups/remove-a-member-from-a-group /openapi.json delete /v1/groups/{groupId}/members/{memberId} > **Requires scope** `groups:write` · **Minimum role** editor Removes a member from a group, voids their pending charges in that group and deletes their reminders in this group that were never claimed for delivery or admitted by a workflow, including reminders sent before delivery tracking began. The others are kept: marked sent if a delivery was accepted, cancelled if still scheduled, otherwise left as they were. Paid charges and the member record are kept. Returns 409 while any of their charges in the group is processing, failed, partially paid or disputed, or has a bank transfer still processing. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Retrieve a group Source: https://docs.dueflow.co/api-reference/groups/retrieve-a-group /openapi.json get /v1/groups/{groupId} > **Requires scope** `groups:read`, or `groups:write` · **Minimum role** viewer [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Update a group Source: https://docs.dueflow.co/api-reference/groups/update-a-group /openapi.json patch /v1/groups/{groupId} > **Requires scope** `groups:write` · **Minimum role** editor Renames a group or changes its description. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Create a member Source: https://docs.dueflow.co/api-reference/members/create-a-member /openapi.json post /v1/members > **Requires scope** `members:write` · **Minimum role** editor Adds a member to the organization. Requires an `Idempotency-Key` header. Parent/guardian contact can be set by a personal or service token with `members:pii` (403 otherwise, and always for OAuth apps); phone and custom fields cannot be set through the API in v1. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # List a chapter's members Source: https://docs.dueflow.co/api-reference/members/list-a-chapters-members /openapi.json get /v1/chapters/{chapterId}/members > **Requires scope** `chapters:read` · `members:read` · **Minimum role** viewer Lists the members of a direct child chapter. Available to national organizations only. Returns the same PII-free member shape as `/members`; the chapter sees this read in its own activity log. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # List members Source: https://docs.dueflow.co/api-reference/members/list-members /openapi.json get /v1/members > **Requires scope** `members:read` · **Minimum role** viewer Lists the organization's members, oldest change first. Pass `updatedSince` with the timestamp of your last sync to fetch only what changed. Parent/guardian contact (`parentFirstName`, `parentLastName`, `parentEmail`) is included only for personal and service tokens holding `members:pii` (never OAuth apps or MCP connectors); other contact details beyond email are not returned. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Retrieve a member Source: https://docs.dueflow.co/api-reference/members/retrieve-a-member /openapi.json get /v1/members/{memberId} > **Requires scope** `members:read` · **Minimum role** viewer Parent/guardian contact is included only for personal and service tokens holding `members:pii` (never OAuth apps or MCP connectors). [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Update a member Source: https://docs.dueflow.co/api-reference/members/update-a-member /openapi.json patch /v1/members/{memberId} > **Requires scope** `members:write` · **Minimum role** editor Updates a member's name or email, or archives them with `isActive: false`. Members are archived rather than deleted so their payment history stays intact. Parent/guardian contact can be set or cleared by a personal or service token with `members:pii` (403 otherwise, and always for OAuth apps). [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # List child chapters Source: https://docs.dueflow.co/api-reference/organization/list-child-chapters /openapi.json get /v1/chapters > **Requires scope** `chapters:read` · **Minimum role** viewer Lists the chapters belonging to a national organization, oldest change first. Archived chapters are left out unless `includeArchived=true`; a client syncing with `updatedSince` should pass it to see a chapter become archived (`isActive: false`) rather than just disappear. Chapter organizations have no children and receive an empty list. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # List terms Source: https://docs.dueflow.co/api-reference/organization/list-terms /openapi.json get /v1/organization/terms > **Requires scope** `organization:read` · **Minimum role** viewer The terms the dashboard's date selector offers, in calendar order: the organization's own once it has defined any, otherwise the automatic Fall and Spring of the current academic year (ids `fall` and `spring`). Pass an `id` as `termId` to `GET /summary`. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Retrieve a chapter Source: https://docs.dueflow.co/api-reference/organization/retrieve-a-chapter /openapi.json get /v1/chapters/{chapterId} > **Requires scope** `chapters:read` · **Minimum role** viewer Returns one of the national's chapters with its description, the HQ-only label and its contact email (the same details the dashboard's Chapters page shows to `chapters:read`). Archived chapters are returned with `isActive: false`, as `PATCH /chapters/{chapterId}` returns them. 404 for a chapter that isn't a direct child of the token's organization, and for chapter organizations. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Retrieve required roster fields Source: https://docs.dueflow.co/api-reference/organization/retrieve-required-roster-fields /openapi.json get /v1/organization/required-roster-fields > **Requires scope** `organization:read`, or `organization:write` · **Minimum role** viewer The setting `POST /organization/required-roster-fields` writes. `parentContactRequired` is true when a chapter requires parent/guardian contact from its members. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Retrieve the caller Source: https://docs.dueflow.co/api-reference/organization/retrieve-the-caller /openapi.json get /v1/me > **Requires scope** `organization:read` · **Minimum role** viewer Who is calling and what they can do: the user (null for a service token), the token's kind and expiry, the organization the token is bound to, the role, the effective scopes for this request, which products are on for the organization, and the user's other organizations for a switcher. A client's first call after sign-in. Requires only `organization:read`, which every role holds. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Retrieve the dashboard summary Source: https://docs.dueflow.co/api-reference/organization/retrieve-the-dashboard-summary /openapi.json get /v1/summary > **Requires scope** `payments:read` · **Minimum role** viewer The treasurer's home screen in one call: billed, collected and outstanding per currency, the percent paid, the members who owe (longest overdue first, at most 10), recent activity (at most 10), reimbursements awaiting review, subscription stats and, for a national, its chapters with a balance (at most 25). Requires `payments:read`; each optional section is `null` without its own scope: `members:read` for who owes, `reimbursements:read` for reimbursements, `chapters:read` for a national's chapter sections. Pass `termId`, or `from` and `to`, to limit the money sections to a range of charge creation dates. Costs 5 read units. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Retrieve the organization Source: https://docs.dueflow.co/api-reference/organization/retrieve-the-organization /openapi.json get /v1/organization > **Requires scope** `organization:read` · **Minimum role** viewer Returns the organization the access token is bound to. A token is bound to exactly one organization; use `/chapters` to reach child chapters. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Set required roster fields Source: https://docs.dueflow.co/api-reference/organization/set-required-roster-fields /openapi.json post /v1/organization/required-roster-fields > **Requires scope** `organization:write` · **Minimum role** admin Replaces the organization's required roster fields. For nationals, picks which optional roster fields child chapters must supply on upload. Chapters pass all three of `parentFirstName`, `parentLastName` and `parentEmail` to require parent/guardian contact from members (they are asked for it in the member portal and before paying), or an empty array to make it optional; any other set is a 400. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Update a chapter Source: https://docs.dueflow.co/api-reference/organization/update-a-chapter /openapi.json patch /v1/chapters/{chapterId} > **Requires scope** `chapters:write` · **Minimum role** editor Edits a child chapter's name, description and the HQ-only label. National organizations only; archived chapters stay editable. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Bill child chapters Source: https://docs.dueflow.co/api-reference/payments/bill-child-chapters /openapi.json post /v1/chapter-payment-requests > **Requires scope** `payments:write` · `chapters:read` · **Minimum role** editor National organizations only. Bills one or more chapters as organizations, one-time or recurring; each chapter's treasurer receives one bill in the chapter's currency. Chapters without a billing email are skipped. Each created chapter's `payUrl` is the pay link its bill email carries. Requires an `Idempotency-Key` header; retrying with the same key never bills a chapter twice. Costs `ceil(chapterIds / 25)` units of the `messaging` rate-limit bucket, so a full 500-chapter batch uses the whole minute's budget. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Bill members of child chapters directly Source: https://docs.dueflow.co/api-reference/payments/bill-members-of-child-chapters-directly /openapi.json post /v1/chapter-member-payment-requests > **Requires scope** `payments:write` · `chapters:read` · **Minimum role** editor National organizations only. Bills active members of the organization's chapters in one HQ batch; each member receives a pay-link email and pays HQ. Members without an email are skipped. Requires an `Idempotency-Key` header; retrying with the same key resumes the batch. Costs `ceil(members / 100)` units of the `messaging` rate-limit bucket, so a full 2,000-member batch uses the whole minute's budget. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # List payments Source: https://docs.dueflow.co/api-reference/payments/list-payments /openapi.json get /v1/payments > **Requires scope** `payments:read` · **Minimum role** viewer Lists charges raised by the organization, oldest change first. Provider identifiers are not exposed; use `status` and `updatedSince` to reconcile. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Record a manual payment Source: https://docs.dueflow.co/api-reference/payments/record-a-manual-payment /openapi.json post /v1/payments/{paymentId}/mark-paid > **Requires scope** `payments:write` · **Minimum role** editor Records money collected outside Dueflow. Omit amount to settle the full remaining balance, or supply a positive amount in major currency units for a partial payment. Sends a receipt. Requires an `Idempotency-Key` header. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Request payments Source: https://docs.dueflow.co/api-reference/payments/request-payments /openapi.json post /v1/payment-requests > **Requires scope** `payments:write` · **Minimum role** editor Requests one payment batch from a group, members, or members of a group. Requires an `Idempotency-Key` header. Amounts are in dollars; date fields accept ISO date or date-time strings. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Resend a payment notification Source: https://docs.dueflow.co/api-reference/payments/resend-a-payment-notification /openapi.json post /v1/payments/{paymentId}/resend-notification > **Requires scope** `payments:write` · **Minimum role** editor Resends the appropriate payment request, subscription setup notice, or credit receipt. Requires an `Idempotency-Key` header. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Retrieve a payment Source: https://docs.dueflow.co/api-reference/payments/retrieve-a-payment /openapi.json get /v1/payments/{paymentId} > **Requires scope** `payments:read` · **Minimum role** viewer [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Send a payment reminder Source: https://docs.dueflow.co/api-reference/payments/send-a-payment-reminder /openapi.json post /v1/payments/{paymentId}/remind > **Requires scope** `payments:write` · **Minimum role** editor Emails the payment's recipient using its current balance and deadline pricing. Requires an `Idempotency-Key` header. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Send a scheduled bill now Source: https://docs.dueflow.co/api-reference/payments/send-a-scheduled-bill-now /openapi.json post /v1/payments/{paymentId}/send-now > **Requires scope** `payments:write` · **Minimum role** editor Releases a bill held for a future send date and emails its payment request immediately; automatic reminders restart from now. Requires an `Idempotency-Key` header. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Void an unpaid payment Source: https://docs.dueflow.co/api-reference/payments/void-an-unpaid-payment /openapi.json post /v1/payments/{paymentId}/void > **Requires scope** `payments:write` · **Minimum role** editor Cancels the outstanding charge and stops its subscription when applicable. Processing or disputed payments cannot be voided. Requires an `Idempotency-Key` header. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # List payouts Source: https://docs.dueflow.co/api-reference/payouts/list-payouts /openapi.json get /v1/payouts > **Requires scope** `payouts:read` · **Minimum role** editor Lists withdrawals from the organization's balance, newest first. Status can change on older payouts, including reversals. Refresh known payouts with GET /payouts/{payoutId} or revisit older pages when reconciling; the creation-order cursor is not an incremental change feed. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Retrieve a payout Source: https://docs.dueflow.co/api-reference/payouts/retrieve-a-payout /openapi.json get /v1/payouts/{payoutId} > **Requires scope** `payouts:read` · **Minimum role** editor [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Approve or reject a reimbursement Source: https://docs.dueflow.co/api-reference/reimbursements/approve-or-reject-a-reimbursement /openapi.json post /v1/reimbursements/{reimbursementId}/review > **Requires scope** `reimbursements:write` · **Minimum role** editor Records a decision on a submitted reimbursement and emails the recipient. Only `submitted` reimbursements can be reviewed, and a submitter cannot approve their own request; a rejection must carry a `note`. Requires an `Idempotency-Key` header. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # List reimbursements Source: https://docs.dueflow.co/api-reference/reimbursements/list-reimbursements /openapi.json get /v1/reimbursements > **Requires scope** `reimbursements:read` · **Minimum role** viewer Lists reimbursement requests, oldest change first. Receipts, payout references and reviewer notes are not exposed in v1. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Mark a reimbursement paid Source: https://docs.dueflow.co/api-reference/reimbursements/mark-a-reimbursement-paid /openapi.json post /v1/reimbursements/{reimbursementId}/mark-paid > **Requires scope** `reimbursements:write` · **Minimum role** editor Records that an approved reimbursement was paid outside Dueflow (Venmo, Zelle, check, cash or other) and emails the recipient. No money moves. Requires an `Idempotency-Key` header. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Retrieve a reimbursement Source: https://docs.dueflow.co/api-reference/reimbursements/retrieve-a-reimbursement /openapi.json get /v1/reimbursements/{reimbursementId} > **Requires scope** `reimbursements:read` · **Minimum role** viewer [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Void a reimbursement Source: https://docs.dueflow.co/api-reference/reimbursements/void-a-reimbursement /openapi.json post /v1/reimbursements/{reimbursementId}/void > **Requires scope** `reimbursements:write` · **Minimum role** editor Voids a reimbursement that has not been paid. Voiding cannot be undone. Requires an `Idempotency-Key` header. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # List reminders Source: https://docs.dueflow.co/api-reference/reminders/list-reminders /openapi.json get /v1/reminders > **Requires scope** `reminders:read` · **Minimum role** viewer Lists the reminders this organization has scheduled or sent, oldest change first. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Retrieve a reminder Source: https://docs.dueflow.co/api-reference/reminders/retrieve-a-reminder /openapi.json get /v1/reminders/{reminderId} > **Requires scope** `reminders:read` · **Minimum role** viewer [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Send a scheduled reminder now Source: https://docs.dueflow.co/api-reference/reminders/send-a-scheduled-reminder-now /openapi.json post /v1/reminders/{reminderId}/send > **Requires scope** `reminders:write` · **Minimum role** editor Sends a scheduled reminder immediately instead of waiting for its scheduled time. Emails and texts cost money and reach real people, so this endpoint draws down the much tighter `messaging` budget rather than the shared write budget. Requires an `Idempotency-Key` header. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Scopes and roles Source: https://docs.dueflow.co/api-reference/scopes Every scope, what it grants, and the role required to hold it. A token's effective permissions are its granted scopes intersected with the ceiling of the role it acts under. Asking for a scope your role can't hold is rejected at creation time rather than silently dropped. ## Scopes | Scope | Grants | Minimum role | | - | - | - | | `organization:read` | Read the organization's profile and public settings. | viewer | | `organization:write` | Update the organization's profile, URL, fees and email summary settings, finish its setup, and turn debt collections on or off. | admin | | `team:read` | See the organization's members, their roles and pending invites. No `/v1` endpoint requires it: it applies in the Dueflow app only. | editor | | `workflows:manage` | Open, create, edit, turn on and turn off workflows. Actions still require access to their records. Includes read access to the team for choosing recipients. No `/v1` endpoint requires it: it applies in the Dueflow app only. | editor | | `team:write` | Invite people, change roles and remove members from the team. No `/v1` endpoint requires it: it applies in the Dueflow app only. | admin | | `developers:read` | View API tokens and the organization's API access policy. No `/v1` endpoint requires it: it applies in the Dueflow app only. | admin | | `developers:write` | Create and revoke API tokens and change the organization's API access policy. No `/v1` endpoint requires it: it applies in the Dueflow app only. | admin | | `integrations:read` | View connected integrations such as QuickBooks. No `/v1` endpoint requires it: it applies in the Dueflow app only. | admin | | `integrations:write` | Connect and disconnect integrations such as QuickBooks. No `/v1` endpoint requires it: it applies in the Dueflow app only. | admin | | `chapters:read` | Read the child chapters of a national organization, including their member rosters. | viewer | | `chapters:insights` | Read child chapter finances and member payment status for chapter visits. No `/v1` endpoint requires it: it applies in the Dueflow app only. | admin | | `ai:read` | Ask questions about data your role can read. Does not grant permission to make changes. No `/v1` endpoint requires it: it applies in the Dueflow app only. | admin | | `chapters:write` | Invite, edit, archive and message the child chapters of a national organization. | editor | | `members:read` | Read the member roster. Excludes phone numbers, guardian and emergency contact details. | viewer | | `members:write` | Create, update and archive members. | editor | | `members:pii` | Read phone numbers, guardian contacts, emergency contacts and internal notes. | editor | | `groups:read` | Read member groups and their membership. | viewer | | `groups:write` | Create, update and delete member groups. | editor | | `payments:read` | Read dues charges, their status and payment history. | viewer | | `payments:write` | Request payments from members or groups, record offline payments and void unpaid charges. | editor | | `reimbursements:read` | Read reimbursement requests and their status. | viewer | | `reimbursements:write` | Approve, reject and mark reimbursements as paid. | editor | | `payouts:read` | Read withdrawals from the organization's balance. | editor | | `payouts:write` | Connect a payout bank account and withdraw from the organization's balance. No `/v1` endpoint requires it: it applies in the Dueflow app only. | admin | | `billing:read` | View the organization's plan, payment-provider connection and subscription status. No `/v1` endpoint requires it: it applies in the Dueflow app only. | admin | | `billing:write` | Connect the payment provider, manage the plan/subscription and run provider migration. No `/v1` endpoint requires it: it applies in the Dueflow app only. | admin | | `finance:read` | View connected bank balances and transactions in the finance workspace. No `/v1` endpoint requires it: it applies in the Dueflow app only. | editor | | `finance:write` | Connect, reconnect and remove bank accounts and sync transactions. No `/v1` endpoint requires it: it applies in the Dueflow app only. | editor | | `cards:read` | View virtual cards, their limits, statuses and transactions. Never card numbers or security codes. | editor | | `cards:write` | Issue and assign virtual cards, change limits, freeze, unfreeze and cancel them. | admin | | `cards:reveal` | Reveal the full number and security code of any of the organization's virtual cards. No `/v1` endpoint requires it: it applies in the Dueflow app only. | admin | | `reminders:read` | Read scheduled and sent payment reminders. | viewer | | `reminders:write` | Create and send email and SMS payment reminders. These cost money and are rate limited. | editor | | `fundraise:read` | Read campaigns and donations. Excludes donors' names, emails and phone numbers. | viewer | | `fundraise:write` | Create, update and end fundraising campaigns. | editor | | `store:read` | Read store listings and orders. Excludes guest buyers' contact details. | viewer | | `store:write` | Create and manage store listings, event tickets and merch. No `/v1` endpoint requires it: it applies in the Dueflow app only. | editor | | `audit:read` | Read the organization's activity log. | admin | | `portal:read` | Read the member's own membership: charges, payment history, documents and payout methods. No `/v1` endpoint requires it: it applies in the Dueflow app only. | admin | | `portal:write` | Pay the member's own charges and update their own contact details and payout methods. No `/v1` endpoint requires it: it applies in the Dueflow app only. | admin | ## Role ceilings | Role | Can hold | | - | - | | viewer | `organization:read`, `chapters:read`, `members:read`, `groups:read`, `payments:read`, `reimbursements:read`, `reminders:read`, `fundraise:read`, `store:read` | | editor | `organization:read`, `team:read`, `workflows:manage`, `chapters:read`, `chapters:write`, `members:read`, `members:write`, `members:pii`, `groups:read`, `groups:write`, `payments:read`, `payments:write`, `reimbursements:read`, `reimbursements:write`, `payouts:read`, `finance:read`, `finance:write`, `cards:read`, `reminders:read`, `reminders:write`, `fundraise:read`, `fundraise:write`, `store:read`, `store:write` | | admin | `organization:read`, `organization:write`, `team:read`, `workflows:manage`, `team:write`, `developers:read`, `developers:write`, `integrations:read`, `integrations:write`, `chapters:read`, `chapters:insights`, `ai:read`, `chapters:write`, `members:read`, `members:write`, `members:pii`, `groups:read`, `groups:write`, `payments:read`, `payments:write`, `reimbursements:read`, `reimbursements:write`, `payouts:read`, `payouts:write`, `billing:read`, `billing:write`, `finance:read`, `finance:write`, `cards:read`, `cards:write`, `cards:reveal`, `reminders:read`, `reminders:write`, `fundraise:read`, `fundraise:write`, `store:read`, `store:write`, `audit:read`, `portal:read`, `portal:write` | # List a listing's items Source: https://docs.dueflow.co/api-reference/store/list-a-listings-items /openapi.json get /v1/store/listings/{listingId}/items > **Requires scope** `store:read` · **Minimum role** viewer Returns the items for sale on a listing with price, inventory, sold count, per-person limit, custom fields and images. `soldCount`: Units reserved at checkout: paid orders (refunded ones included) plus pending checkouts. A Stripe checkout's units return when its session expires; units for a checkout that never reached the provider are cleared after 24 hours, the next time someone checks out on the listing; an abandoned Whop checkout, and a checkout whose payment failed (e.g. a returned bank debit), keep their units. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # List store listings Source: https://docs.dueflow.co/api-reference/store/list-store-listings /openapi.json get /v1/store/listings > **Requires scope** `store:read` · **Minimum role** viewer Lists the organization's store listings, oldest change first. A listing's items, with price, inventory and sold count, come from `GET /store/listings/{listingId}/items`. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # List store orders Source: https://docs.dueflow.co/api-reference/store/list-store-orders /openapi.json get /v1/store/orders > **Requires scope** `store:read` · **Minimum role** viewer Lists store orders, newest first. Guest buyers' contact details are not exposed in v1; an order made by a member carries its `memberId`. [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Retrieve a store listing Source: https://docs.dueflow.co/api-reference/store/retrieve-a-store-listing /openapi.json get /v1/store/listings/{listingId} > **Requires scope** `store:read` · **Minimum role** viewer [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Retrieve a store order Source: https://docs.dueflow.co/api-reference/store/retrieve-a-store-order /openapi.json get /v1/store/orders/{orderId} > **Requires scope** `store:read` · **Minimum role** viewer [Scopes and roles](https://docs.dueflow.co/api-reference/scopes) # Authentication Source: https://docs.dueflow.co/authentication Bearer tokens, token types, and what happens when your role changes. Send your token as a bearer credential. Session cookies are never accepted on the API host, so a browser session can't be replayed against the API. ```bash theme={"system"} curl https://api.dueflow.co/v1/members \ -H "Authorization: Bearer dfp_..." ``` A missing, malformed, expired or revoked token all return the same `401` with `WWW-Authenticate: Bearer realm="dueflow"` – identical on purpose, so probing can't distinguish "wrong secret" from "revoked yesterday": ```json theme={"system"} { "error": { "code": "invalid_token", "message": "The access token is missing, malformed, expired or revoked.", "requestId": "pqxl2owuOV26Cf789a6gK" } } ``` ## Token types | Prefix | Type | Acts as | Permissions | | - | - | - | - | | `dfp_` | Personal access token | You | Your granted scopes, intersected with your **live** role in the organization | | `dfs_` | Service token | The organization | Its granted scopes, intersected with the role assigned at creation | Create a personal access token in the dashboard under **Profile → Developer**, or, if you are an organization admin, a service token under **Settings → Developers**. The secret is shown once and stored only as a hash – if you lose it, revoke the token and create another. Use a service token for anything that has to keep running when a person leaves: it belongs to the organization rather than to whoever created it, so officer turnover doesn't break the integration. Its role is fixed at creation and caps what it can do; admin is not available, so a service token can never change organization settings or approve reimbursements. > [!WARNING] > > A personal token's permissions are re-derived on every request. If your role > is lowered to viewer, write calls start failing immediately; if you leave the > organization, the token stops working entirely. > [!TIP] > > Using Dueflow from ChatGPT or Claude? Those clients sign in with OAuth rather > than a pasted token – see [MCP server](/mcp-server). The access token they end up > with is a personal token like any other, except that it can't hand out > credentials or staff access that would outlive the connection: it can't create > or rotate API tokens, add people to the team or change their roles, invite > chapter admins, turn on workflows that keep acting as you, or change the > organization's API policy. ## Organization policy An organization's admins can block scopes for every token they issue, personal and service alike, under **Settings → Developers**. A blocked scope can't be requested at creation and is dropped from tokens that already hold it, so a call that worked yesterday can return `insufficient_scope` today without anything about your token changing. The effective permissions of any request are therefore: ``` granted scopes ∩ role ceiling ∩ organization policy ``` The same policy can cap token lifetime below the global maximum. ## Expiry and rotation Tokens expire – a maximum of 365 days (less if the organization's policy says so), defaulting to 90. There is no never-expiring option. We email before that happens: 14 days out and again 3 days out. Personal tokens notify their owner; service tokens notify the organization's admins, since nobody owns them. A service token can be **rotated** from its card in the dashboard. Rotation issues a successor with the same role and scopes and a new secret, and keeps the predecessor alive for an overlap window (7 days by default, 30 maximum) so you can deploy the new secret without downtime. Both work during the overlap; the old one stops the moment it closes. Watch the predecessor's `lastUsedAt` on its card during the window – if it's still being used near the end, something didn't pick up the new secret. Personal tokens don't rotate: create the replacement, deploy it, revoke the old one. ## Revocation Revoking is immediate and permanent. The token row is kept as a tombstone so that "which token did this?" stays answerable after the fact. # Errors Source: https://docs.dueflow.co/errors One error envelope, the codes it can carry, and which failures are worth retrying. Every failure returns the same envelope, so a client branches on `error.code` rather than parsing prose or matching on status alone. ```json theme={"system"} { "error": { "code": "insufficient_scope", "message": "This endpoint requires the audit:read scope. The token's role (editor) may also be too low to hold it.", "requiredScopes": ["audit:read"], "requestId": "x8bj1FBgnmyN58vj2wnOX", "docsUrl": "https://docs.dueflow.co/errors#insufficient_scope" } } ``` | Field | Always present | Meaning | | - | - | - | | `code` | yes | Stable, machine-readable. Branch on this. | | `message` | yes | Written for a human reading a log. Wording can change; don't match on it. | | `requestId` | yes | Also returned as the `X-Request-Id` header, on success and failure alike. | | `param` | no | The offending field, when the failure is attributable to one. | | `requiredScopes` | no | On `insufficient_scope`: the scopes that would have made this call succeed. | ## Codes Every error links here, at the anchor for its own code. ### invalid\_request `400` · A malformed body, a bad query parameter, or a missing `Idempotency-Key` on a write. `param` names the offending field. Don't retry – fix the request. ### invalid\_token `401` · The bearer token is missing, malformed, expired or revoked. All four are reported identically so that probing can't tell them apart. Issue a new token. ### insufficient\_scope `403` · The token doesn't carry a scope the endpoint requires; `requiredScopes` lists what would work. Retrying won't help – see [403 can appear without your token changing](#403-can-appear-without-your-token-changing). ### not\_found `404` · No such resource *for this token*. Also returned for a resource that exists but belongs to another organization – see below. ### method\_not\_allowed `405` · Known path, wrong method. ### conflict `409` · The request contradicts current state: a duplicate email, an `Idempotency-Key` reused with a different body, or a transition that no longer applies (reviewing a reimbursement that someone already reviewed). Retrying the same call gives the same answer. ### rate\_limited `429` · The token's bucket for this minute is exhausted. `Retry-After` says how long to wait. See [Rate limits](/rate-limits). ### internal\_error `500` · Our fault. It's already reported to our error tracker along with the `requestId` in your response. Retry with backoff. ### provider\_error `502` · An upstream provider – email, SMS, payments – rejected the call, so the operation did not take effect. Safe to retry. ## 404 means "not visible to you" A resource belonging to another organization returns `404`, not `403`. Existence is itself information: a `403` would confirm that an id is real, letting anyone enumerate ids across organizations. This applies to chapters too – a national reading a chapter that isn't its direct child gets a `404`. ## 403 can appear without your token changing Effective permissions are re-derived on every request: ``` granted scopes ∩ role ceiling ∩ organization policy ``` So a call that worked yesterday can return `insufficient_scope` today because your role was lowered, or because an admin blocked that scope for the whole organization. Treat `insufficient_scope` as a condition to surface to a human, not to retry. ## Retrying safely Retry `429`, `500` and `502` with exponential backoff and jitter. Do not retry `4xx` other than `429` – the request will fail identically. Every `POST` requires an `Idempotency-Key`, so a retry of a write is safe by construction: reusing the key replays the original response instead of creating a second record. See [Idempotency](/idempotency). > [!NOTE] > > Include `requestId` when you contact support. It identifies the exact request > in our logs, including the endpoint, the token used and the failure. # Parent/guardian contact Source: https://docs.dueflow.co/guides/parent-guardian-contact Require parent/guardian contact from a chapter's members, and read or write it on the member resource. A chapter can require every member to give a parent or guardian's name and email. Once it's on, members are asked for it in the member portal and before they pay. The API can turn the requirement on or off and read or write the values themselves. ## Scopes Parent/guardian contact is personal data about someone who isn't a member, so it sits behind its own scope: | To | Scopes | | - | - | | Read the requirement | `organization:read` (or `organization:write`) | | Turn the requirement on or off | `organization:write` | | Read parent/guardian fields on members | `members:read` + `members:pii` | | Set or clear parent/guardian fields | `members:write` + `members:pii` | A token without `members:pii` sees the same member shape as before: the three fields are absent, not `null`. Sending any of them without `members:pii` is a `403 insufficient_scope` naming the field, and nothing is written. > [!WARNING] > > Only personal and service tokens (Settings → Developers) can read or write > parent/guardian contact. OAuth apps and MCP connectors never receive these > fields, even when granted `members:pii`, and get a `403` if they send them. ## Turn the requirement on or off ```bash theme={"system"} curl -X POST https://api.dueflow.co/v1/organization/required-roster-fields \ -H "Authorization: Bearer $DUEFLOW_TOKEN" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{"fields":["parentFirstName","parentLastName","parentEmail"]}' ``` A chapter passes all three fields to require parent/guardian contact, or `[]` to make it optional. Any other set is a `400`. (A national uses the same endpoint to pick the fields chapters must include on HQ roster uploads; that policy doesn't ask the chapters' members for anything.) Read it back: ```bash theme={"system"} curl https://api.dueflow.co/v1/organization/required-roster-fields \ -H "Authorization: Bearer $DUEFLOW_TOKEN" ``` ```json theme={"system"} { "requiredRosterFields": ["parentFirstName", "parentLastName", "parentEmail"], "parentContactRequired": true } ``` ## Read and write the values With `members:pii`, `GET /v1/members` and `GET /v1/members/:id` include the fields. A field with nothing on file is `null`: ```json theme={"system"} { "id": "S_QZS1bcVIsrxWJHTKbIM", "firstName": "Ada", "lastName": "Lovelace", "email": "ada@example.com", "isActive": true, "joinDate": "2026-07-25", "groups": [], "createdAt": "2026-07-25T17:40:23.352Z", "updatedAt": "2026-08-02T09:12:00.000Z", "parentFirstName": "Pat", "parentLastName": "Lovelace", "parentEmail": "pat@example.com" } ``` Set them when you create a member, or later with `PATCH`. `null` clears a field: ```bash theme={"system"} curl -X PATCH https://api.dueflow.co/v1/members/$MEMBER_ID \ -H "Authorization: Bearer $DUEFLOW_TOKEN" \ -H "Content-Type: application/json" \ -d '{"parentFirstName":"Pat","parentLastName":"Lovelace","parentEmail":"pat@example.com"}' ``` Changing a member's parent/guardian contact moves its `updatedAt`, so an `updatedSince` sync picks it up. A member without all three still gets a prompt in the portal while the requirement is on, whatever your integration wrote. > [!NOTE] > > A national's `GET /v1/chapters/:chapterId/members` stays PII-free: > parent/guardian contact is only returned for your own organization's > members. # Sync your roster Source: https://docs.dueflow.co/guides/sync-your-roster A worked example: pull every member into your own system, then keep it current. This is the first thing most integrations do. It uses one endpoint, `GET /v1/members`, and the two mechanics that make a sync resumable: cursors and `updatedSince`. ## 1. Create a token Use a **service token** (Settings → Developers) rather than a personal one. A service token belongs to the organization, so the sync keeps running when the officer who set it up graduates. Scopes: `members:read` – each member already carries the groups they belong to. Role: `viewer`, since a sync that only reads should not be able to write. The secret is shown once. Store it as a secret in your own system; if you lose it, revoke and reissue. ## 2. Read the first page ```bash theme={"system"} curl "https://api.dueflow.co/v1/members?limit=100" \ -H "Authorization: Bearer $DUEFLOW_TOKEN" ``` ```json theme={"system"} { "data": [ { "id": "S_QZS1bcVIsrxWJHTKbIM", "firstName": "Ada", "lastName": "Lovelace", "email": "ada@example.com", "isActive": true, "joinDate": "2026-07-25", "groups": [], "createdAt": "2026-07-25T17:40:23.352Z", "updatedAt": "2026-07-25T17:40:23.352Z" } ], "hasMore": true, "nextCursor": "MjAyNi0wNy0yNVQxNzo0MDoyMy4zNTJafFNfUVpTMWJjVklzcnhXSkhUS2JJTQ" } ``` Members are returned oldest-change-first. `isActive: false` means archived – Dueflow never deletes a member, so archived rows keep appearing and your system should mirror the flag rather than dropping the record. > [!NOTE] > > Parent/guardian contact (`parentFirstName`, `parentLastName`, `parentEmail`) > is returned only to personal and service tokens that also hold `members:pii` > (never OAuth apps or MCP connectors) – see > [Parent/guardian contact](/guides/parent-guardian-contact). Phone numbers, > emergency contacts, custom fields and internal notes are deliberately absent > from every API response in v1. If your integration needs one of those, tell > us which and why – it's a decision about what leaves the platform, not an > oversight. ## 3. Walk the pages Pass `nextCursor` back verbatim while `hasMore` is true: ```python theme={"system"} def fetch_all(token, params=None): cursor, out = None, [] while True: r = requests.get( "https://api.dueflow.co/v1/members", headers={"Authorization": f"Bearer {token}"}, params={"limit": 100, "cursor": cursor, **(params or {})}, ) r.raise_for_status() page = r.json() out += page["data"] if not page["hasMore"]: return out cursor = page["nextCursor"] ``` Cursors are keyset-based on `(updatedAt, id)`, so a member edited while you're mid-walk is never silently skipped or duplicated – which is exactly what offset pagination does. ## 4. Keep it current Store the highest `updatedAt` you saw. Next run, ask only for what changed: ```bash theme={"system"} curl "https://api.dueflow.co/v1/members?updatedSince=2026-07-25T17:40:23Z&limit=100" \ -H "Authorization: Bearer $DUEFLOW_TOKEN" ``` Use the watermark from the *previous* run rather than "now minus an hour": a watermark can't lose a record to clock skew or to a run that took longer than its interval. Overlapping slightly is harmless – you'll re-apply an update you already have. A full nightly re-read is fine too. At 100 rows a page, a 500-member roster is 5 requests out of 600 per minute. ## Nationals: reading your chapters With `chapters:read` a national can enumerate its chapters and read each roster: ```bash theme={"system"} curl "https://api.dueflow.co/v1/chapters?limit=100" \ -H "Authorization: Bearer $DUEFLOW_TOKEN" curl "https://api.dueflow.co/v1/chapters/$CHAPTER_ID/members?limit=100" \ -H "Authorization: Bearer $DUEFLOW_TOKEN" ``` Only *direct* child chapters are reachable; anything else is a `404`. Two things to plan for: * **Roster reads are priced by page size** – `ceil(limit / 25)` units, so 100 rows costs 4. A 200-chapter sync at 100 rows a page spends 800 of your 600 units per minute, so it will need to pace itself. See [Rate limits](/rate-limits). * **The chapter can see you read it.** Each cross-organization read appears in that chapter's own activity log, naming your organization and how many members were returned. That transparency is the reason the access exists; treat it as a feature to mention to your chapters rather than a surprise for them to find. ## Writing back Creating members is `POST /v1/members` with `members:write` and an `Idempotency-Key`: ```bash theme={"system"} curl -X POST https://api.dueflow.co/v1/members \ -H "Authorization: Bearer $DUEFLOW_TOKEN" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{"firstName":"Ada","lastName":"Lovelace","email":"ada@example.com"}' ``` A duplicate email returns `409 conflict`. To archive rather than delete, use `PATCH /v1/members/:id` with `{"isActive": false}` – there is no delete. # Idempotency Source: https://docs.dueflow.co/idempotency Why every write needs a key, and exactly what a reused key does. Every `POST` requires an `Idempotency-Key` header. Without one, the request is rejected before the handler runs: ```json theme={"system"} { "error": { "code": "invalid_request", "message": "This endpoint requires an Idempotency-Key header so a retried request can't apply twice. Use a UUID per logical operation.", "param": "Idempotency-Key" } } ``` This is mandatory rather than optional because the failure it prevents is silent: a request that times out in transit has still been applied, and a client that retries without a key creates a second member, a second group, a second charge. Making the key required means a retry is always safe. ## Sending a key Generate one UUID per *logical operation* – not per HTTP attempt. All retries of the same operation reuse the same key. ```bash theme={"system"} curl -X POST https://api.dueflow.co/v1/members \ -H "Authorization: Bearer $DUEFLOW_TOKEN" \ -H "Idempotency-Key: 8f14e45f-ceea-467a-9c6a-9c0b3f39b41c" \ -H "Content-Type: application/json" \ -d '{"firstName":"Ada","lastName":"Lovelace","email":"ada@example.com"}' ``` ## What a reused key does | Situation | Result | | - | - | | Same key, same body | The original response is replayed, with `Idempotent-Replayed: true`. Nothing runs a second time. | | Same key, different body | `409 conflict`. The key already means something else. | | Same key, original request still in flight | `409 conflict`. Wait and retry; the first attempt is still deciding. | | Same key, original attempt failed | The key is released, so the retry runs normally. | | Same key, more than 24 hours later | Keys expire after 24 hours; the key is reusable. | A replay returns the *stored* response – the same body and the same status: ``` HTTP/1.1 201 Created Idempotent-Replayed: true { "id": "S_QZS1bcVIsrxWJHTKbIM", "firstName": "Docs", "lastName": "Example", ... } ``` Note that it is `201`, not `200`. The response describes the original operation, not the act of replaying it, so a client can handle both identically. ## Keys are scoped to your token Two tokens can use the same key without colliding. A key from a revoked token carries nothing over to its replacement – after rotating, an in-flight retry runs as a fresh request, so make sure the operation is also naturally deduplicated (a duplicate email returns `409 conflict`) if that matters to you. ## Body comparison ignores key order The fingerprint is taken over a canonicalized body: object keys sorted at every depth, `undefined` dropped. So these are the *same* request, and the second replays rather than conflicting: ```json theme={"system"} { "firstName": "Ada", "lastName": "Lovelace" } { "lastName": "Lovelace", "firstName": "Ada" } ``` Without that, any client library that serializes keys in a different order would get a spurious `409` on a legitimate retry. > [!WARNING] > > Don't reuse a key across different operations, and don't derive keys from > something that repeats – "member-import-row-1" every night will replay > yesterday's response for 24 hours instead of importing today's row. # Dueflow API Source: https://docs.dueflow.co/introduction Read and write your organization's Dueflow data over HTTPS. The Dueflow API is a JSON API over HTTPS at `https://api.dueflow.co`. Every endpoint is versioned under `/v1`. ```bash theme={"system"} curl https://api.dueflow.co/v1/organization \ -H "Authorization: Bearer $DUEFLOW_TOKEN" ``` ```json theme={"system"} { "id": "fEeIwmrA0SHPFZ3pQnJjR", "name": "Phi Kappa Psi National", "type": "national", "parentId": null, "currency": "usd", "contactEmail": "nationals@example.org", "website": null, "logoUrl": null, "isActive": true, "createdAt": "2026-02-09T04:48:25.813Z", "updatedAt": "2026-07-25T17:37:35.482Z" } ``` Start with [Authentication](/authentication) to get a token, then [Sync your roster](/guides/sync-your-roster) for a worked end-to-end example. ## What's in v1 | Area | Read | Write | | - | - | - | | Organization | `GET /organization` | – | | Chapters (nationals) | `GET /chapters`, `GET /chapters/:id/members` | – | | Members | `GET /members`, `GET /members/:id` | `POST /members`, `PATCH /members/:id` | | Groups | `GET /groups`, `GET /groups/:id` | `POST /groups`, `PATCH /groups/:id`, add/remove members | | Payments | `GET /payments`, `GET /payments/:id` | – | | Reimbursements | `GET /reimbursements`, `GET /reimbursements/:id` | `POST /reimbursements/:id/review` | | Reminders | `GET /reminders`, `GET /reminders/:id` | `POST /reminders/:id/send` | | Activity | `GET /audit-logs` | – | Payments are read-only in v1: money movement stays in the dashboard, where it has the confirmation and approval flows an API call can't reproduce. ## What you can access A token is bound to exactly one organization, and every response is scoped to it. A national organization can additionally read its direct child chapters with the `chapters:read` scope. Member responses deliberately exclude phone numbers, guardian and emergency contacts, custom fields and internal notes. Payment responses exclude payment-provider identifiers and raw provider payloads. ## Conventions * **Errors** share one envelope with a stable `error.code`. See [Errors](/errors). * **Writes** require an `Idempotency-Key`, so a retry can't apply twice. See [Idempotency](/idempotency). * **Lists** are cursor-paginated and support `updatedSince`. See [Pagination and sync](/pagination). * **Every response** carries an `X-Request-Id`. Include it when you contact support – it identifies the exact request in our logs. * **Timestamps** are RFC 3339 in UTC; monetary amounts are decimal strings (`"50.00"`) with the organization's `currency`, never floats. ## Versioning `/v1` will not change in a way that breaks a working integration: nothing is removed, no parameter becomes required, no accepted value narrows. New endpoints, fields, optional parameters and scopes are added without a version bump, so parse responses leniently. Anything incompatible goes in a `/v2`, and a retired endpoint announces itself with `Deprecation` and `Sunset` headers for at least 180 days first. The full policy is on the [versioning and deprecation](/versioning) page. The machine-readable description of this version – the same one that generates this reference – is served by the API itself: ```bash theme={"system"} curl https://api.dueflow.co/v1/openapi.json ``` # MCP server Source: https://docs.dueflow.co/mcp-server Use the API from ChatGPT, Claude or any MCP client – with OAuth or a bearer token. Every endpoint in this reference is also a tool on the Dueflow MCP server: ``` https://api.dueflow.co/mcp ``` The server is the public API with a different transport. A tool call is dispatched as the REST request it stands for, so scopes, role ceilings, organization policy, rate limits and the activity log all apply exactly as they do over HTTP – there is nothing extra to enable, and nothing an assistant can do that the same token couldn't do with `curl`. ## Connect from ChatGPT or Claude ChatGPT and Claude can't paste a token; they sign in with OAuth. Add Dueflow as a custom connector (MCP server) with the URL above and choose OAuth if you are asked. The client discovers everything else from the server. **1. Sign in to Dueflow** You are sent to `dueflow.co` to sign in with your usual account. Nothing is shared with the assistant until you approve the next screen. **2. Approve the connection** Pick the organization the assistant may act in and tick the scopes it may use. Scopes your role can't hold, or that the organization has [blocked](/authentication#organization-policy), are shown but can't be granted. Decline and the assistant gets nothing. **3. Ask away** The assistant now holds a short-lived access token (one hour) and a refresh token it renews silently. Every call it makes appears in the organization's API activity log, attributed to you via the app. The connection appears under **Settings → API tokens → Connected apps**, with the organization, the granted scopes and when it was last used. **Disconnect** revokes it immediately; the assistant has to be authorized again to continue. > [!NOTE] > > A connection acts as you, with personal-token semantics: change roles and it > narrows the same minute, leave the organization and it stops working. Scopes > are re-evaluated every time the token is refreshed, so a connection can lose > scopes over time but never gain them. ## Connect with a bearer token Clients that can send a header – Claude Code, Cursor, scripts, anything headless – skip OAuth and use a [personal or service token](/authentication#token-types) directly: ```bash theme={"system"} claude mcp add --transport http dueflow https://api.dueflow.co/mcp \ --header "Authorization: Bearer dfp_..." ``` This is the only way a **service token** reaches the MCP server. OAuth is a person consenting, so it only ever issues personal-token access; an integration that has to survive officer turnover uses a `dfs_` token in a header, as it would for REST. ## Tools `tools/list` returns one tool per endpoint the token is allowed to call, named after the operation in `snake_case` – `GET /v1/members` is `get_members`, `PATCH /v1/members/{memberId}` is `patch_members_by_member_id`. Path parameters, query parameters and body fields are all arguments of the tool; the input schema is the endpoint's, so the reference page for an endpoint documents its tool too. Tools the token's scopes can't call are omitted rather than listed and refused, so an assistant never plans around something it can't do. An API error inside a call – validation, `insufficient_scope`, `not_found` – comes back as a tool result with `isError: true` and the same error body as REST, not as a transport failure. ## For MCP client authors The server implements the Streamable HTTP transport, statelessly: `POST` JSON-RPC to the URL above with a bearer; there is no session header and no server-to-client stream (`GET` returns `405`). An unauthenticated request returns `401` with the protected-resource metadata the MCP authorization spec requires: ``` WWW-Authenticate: Bearer resource_metadata="https://api.dueflow.co/.well-known/oauth-protected-resource/mcp" ``` Authorization server metadata (RFC 8414) is at `https://dueflow.co/.well-known/oauth-authorization-server`. In short: | | | | - | - | | Grant types | `authorization_code` (PKCE `S256` required), `refresh_token` | | Client authentication | `none` – public clients only | | Client identification | [Client ID Metadata Documents](https://modelcontextprotocol.io/specification/draft/basic/authorization) (`client_id` is an `https` URL we fetch) or [dynamic registration](https://www.rfc-editor.org/rfc/rfc7591) at `/api/oauth/register` | | Redirect URIs | Exact match against the client's registered list; `https` or `http://localhost` only | | Resource indicator | `https://api.dueflow.co/mcp`; other values are `invalid_target` | | Access tokens | Opaque `dfp_` tokens, one hour, bound to the grant | | Refresh tokens | `dfr_` tokens, rotated on every use; presenting a rotated-out token revokes the whole grant | | Revocation | RFC 7009 at `/api/oauth/revoke`, accepts either token | Access tokens are ordinary personal tokens, so everything in [Authentication](/authentication) about live roles, organization policy and revocation applies to them unchanged, with one rule on top: a connected app acts for you only while it is connected, so it can't hand out credentials or staff access that would outlive the connection. Creating or rotating API tokens, adding people to the team or changing their roles, inviting chapter admins, turning on workflows that keep acting as you and changing the organization's API policy are refused for it; do those from the dashboard. The team, chapter admin, workflow and roster sync tools are still listed for a connected app, and calling one returns that refusal. Token and policy changes aren't MCP tools for any token; over REST they refuse a connected app the same way. # Pagination and sync Source: https://docs.dueflow.co/pagination Cursor pagination and incremental synchronization. List endpoints return a page plus an opaque cursor: ```json theme={"system"} { "data": [{ "id": "mem_...", "updatedAt": "2026-07-01T18:03:11.000Z" }], "hasMore": true, "nextCursor": "MjAyNi0wNy0wMVQxODowMzoxMS4wMDBafG1lbV8..." } ``` Pass `nextCursor` back verbatim as `cursor` to fetch the next page, and keep going while `hasMore` is true. Cursors are keyset-based on `(updatedAt, id)`, so rows changing mid-walk are never silently skipped or repeated – unlike offset pagination. `limit` defaults to 50 and is capped at 100. ## Incremental sync Records are returned oldest-change-first, so the last `updatedAt` you saw is a durable sync watermark: ```bash theme={"system"} curl "https://api.dueflow.co/v1/members?updatedSince=2026-07-01T00:00:00Z" \ -H "Authorization: Bearer $DUEFLOW_TOKEN" ``` `updatedSince` is an RFC 3339 timestamp with an offset. Combined with the cursor, a client can resume from where it stopped indefinitely instead of re-reading the whole roster. ## Filtering List endpoints take filters alongside the cursor – `isActive` on members, `status` on payments and reimbursements, `memberId` on payments. Filters are applied before pagination, so `hasMore` and the cursor describe the filtered set. A filter narrows the walk but not the cost: see [Rate limits](/rate-limits) for what a page actually spends. # Rate limits Source: https://docs.dueflow.co/rate-limits Per-token buckets, what a request costs, and how to back off. Limits are per token, per minute, in three buckets: | Bucket | Limit | Applies to | | - | - | - | | `read` | 600 / min | `GET` endpoints | | `write` | 120 / min | `POST`, `PATCH`, `DELETE` | | `messaging` | 20 / min | Endpoints that send email or SMS | Messaging is separate and far tighter because those calls spend real money and land in somebody's inbox: a runaway loop against `/reminders/:id/send` is a different kind of incident from a runaway loop against `/members`. ## Every response carries your budget ``` RateLimit-Limit: 600 RateLimit-Remaining: 435 RateLimit-Reset: 12 ``` `RateLimit-Reset` is seconds until the window rolls over. A `429` adds `Retry-After`, also in seconds: ```json theme={"system"} { "error": { "code": "rate_limited", "message": "Rate limit of 600 read requests per minute exceeded.", "requestId": "bE6hSMLt6FUnWN2kuCbl4" } } ``` ## Before you have a token A request with no bearer token, or one that doesn't resolve, answers `401` and carries a different budget: **30 failed authentication attempts per IP per minute**, which is what stands between a credential-stuffing script and the token lookup. It is reported with the same headers: ``` HTTP/1.1 401 Unauthorized RateLimit-Limit: 30 RateLimit-Remaining: 29 RateLimit-Reset: 41 ``` Only failures spend it. A working token never touches this budget, and exhausting it answers `429` with `Retry-After`. ## Some requests cost more than one A request is priced by the work it asks for, not by being one HTTP call. Reading a chapter's roster costs `ceil(limit / 25)` units, so a page of 100 members costs 4: ```bash theme={"system"} # 150 of these exhaust the read bucket, not 600 curl "https://api.dueflow.co/v1/chapters/$CHAPTER/members?limit=100" \ -H "Authorization: Bearer $DUEFLOW_TOKEN" ``` That's deliberate: a national syncing 200 chapters at 100 rows a page is 800 units of database work whether or not it looks like 200 requests. Pricing it this way means the limiter stops a runaway sync, rather than the database. Requesting smaller pages does *not* save you anything – 4 pages of 25 costs the same 4 units as 1 page of 100 – so prefer large pages and fewer round trips. `GET /summary` costs 5 read units: one call reads the whole period's payments (a national's, every charge to its chapters), the work of several list pages. Billing in bulk is priced the same way, in the `messaging` bucket, because every recipient gets an email: `POST /chapter-payment-requests` costs `ceil(chapterIds / 25)` units and `POST /chapter-member-payment-requests` costs `ceil(members / 100)`. A full-size batch (500 chapters, or 2,000 members) uses the whole minute's messaging budget, so split a large run across minutes. > [!NOTE] > > A malformed request still costs a unit. Otherwise sending garbage would be a > free way to hammer the API. ## Backing off On a `429`, sleep for `Retry-After` seconds and retry – with jitter if you run more than one worker, or they'll all wake up together and collide again. ```python theme={"system"} import random, time, requests def call(url, token, attempt=0): r = requests.get(url, headers={"Authorization": f"Bearer {token}"}) if r.status_code == 429 and attempt < 5: time.sleep(int(r.headers.get("Retry-After", 5)) + random.random()) return call(url, token, attempt + 1) r.raise_for_status() return r.json() ``` Better still, watch `RateLimit-Remaining` and slow down before you hit zero. ## Seeing your usage Each token's card in the dashboard shows its requests over the last 14 days, its busiest endpoint and its failure rate, broken down per day. Usage is counted by route *template*, so a 200-chapter sync appears as one endpoint with 200 requests rather than 200 separate paths. That view is the fastest way to answer "what is this integration actually doing?" before an organization's admins decide whether to keep it. # Versioning and deprecation Source: https://docs.dueflow.co/versioning What v1 promises not to break, how a change is announced, and the Deprecation and Sunset headers to watch for. The API is versioned in the URL: every endpoint lives under `https://api.dueflow.co/v1/`. There is one version today, and this page is the policy for how it changes. ## What will not change within v1 A working integration against `/v1` keeps working. Within `v1` we will not: * remove an endpoint or a response field * add a required parameter, or make an optional one required * narrow the set of accepted values for a parameter * change the type or meaning of an existing field * require a scope or role that your existing token does not already hold Each of those is checked against the published OpenAPI description on every change to the API, so a breaking change cannot ship by accident. ## What will change Additions, without notice and without a version bump: * new endpoints * new response fields * new optional parameters * new scopes and new values for enumerations So parse responses leniently and ignore fields you don't recognize. Anything genuinely incompatible goes in a `/v2`, and `/v1` keeps answering alongside it. ## How a deprecation is announced If an endpoint is ever retired: 1. It is marked `deprecated` in the [OpenAPI description](https://api.dueflow.co/v1/openapi.json) and in this reference. 2. Every response from it carries a `Deprecation: true` header, a `Sunset` header with the date it stops answering, and a `Link` header with `rel="deprecation"` pointing here. 3. The sunset is **at least 180 days** after the headers first appear. ``` Deprecation: true Sunset: Thu, 01 Jul 2027 00:00:00 GMT Link: ; rel="deprecation" ``` Watch for `Deprecation` in your client: it is on error responses too, so a caller debugging a `403` or `429` sees the sunset as well. After the sunset date the endpoint returns `404`. ## What is not covered Rate limits, request costs and the exact wording of error `message` strings may be tuned without notice. Error `code` values are stable; branch on those.