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

# Apply a reviewed HQ roster across chapters

> > **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. Inviting admins needs a token that holds every admin scope (plus `chapters:write` and `team:write`); otherwise, and for an organization whose API policy keeps any admin scope off tokens, each invite is reported in `inviteErrors` with the missing scopes and nothing else changes. 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)



## OpenAPI

````yaml /openapi.json post /v1/chapters/roster-sync
openapi: 3.1.0
info:
  title: Dueflow API
  version: 1.0.0
  description: >-
    Read and write your organization's Dueflow data. Authenticate with a
    personal access token or an organization service token as a bearer
    credential; cookies are ignored. Every endpoint is also a tool on the
    Dueflow MCP server at https://api.dueflow.co/mcp, which accepts the same
    bearer tokens or an OAuth connection from ChatGPT and Claude.


    Timestamps in responses are RFC 3339, UTC, millisecond precision
    (`2026-01-31T17:04:05.123Z`). Timestamps you send are RFC 3339: send UTC
    (`Z`); some filters, such as `updatedSince`, also accept an offset.


    Responses may gain fields at any time; ignore the ones you don't know. Every
    failure answers with the `Error` envelope; branch on its `code`.
  termsOfService: https://dueflow.co/terms
  contact:
    name: Dueflow support
    email: hello@dueflow.co
    url: https://docs.dueflow.co
servers:
  - url: https://api.dueflow.co
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/chapters/roster-sync:
    post:
      tags:
        - Chapters
      summary: Apply a reviewed HQ roster across chapters
      description: >-
        > **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. Inviting admins needs a token that
        holds every admin scope (plus `chapters:write` and `team:write`);
        otherwise, and for an organization whose API policy keeps any admin
        scope off tokens, each invite is reported in `inviteErrors` with the
        missing scopes and nothing else changes. 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)
      operationId: postChaptersRosterSync
      parameters:
        - name: Idempotency-Key
          in: header
          required: true
          description: >-
            A unique key per logical operation, e.g. a UUID. Keys are remembered
            for 24 hours per token: a retry within that window with the same key
            replays the original response (marked `Idempotent-Replayed: true`)
            instead of repeating the write; reusing a key with different
            parameters is a 409.
          schema:
            type: string
            maxLength: 255
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                entries:
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      chapterId:
                        type: string
                        minLength: 1
                      restoreChapterId:
                        type: string
                        minLength: 1
                      linkChapterId:
                        type: string
                        minLength: 1
                      createChapterName:
                        type: string
                        minLength: 1
                        maxLength: 200
                      adminEmails:
                        type: array
                        items:
                          type: string
                          format: email
                      plan:
                        type: object
                        properties:
                          add:
                            type: array
                            items:
                              type: object
                              properties:
                                firstName:
                                  type: string
                                  minLength: 1
                                lastName:
                                  type: string
                                  minLength: 1
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type: string
                                parentFirstName:
                                  type: string
                                parentLastName:
                                  type: string
                                parentEmail:
                                  anyOf:
                                    - type: string
                                      format: email
                                    - type: string
                                      const: ''
                                customFields:
                                  maxItems: 20
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      label:
                                        type: string
                                        maxLength: 60
                                      value:
                                        type: string
                                        maxLength: 300
                                    required:
                                      - label
                                      - value
                                alumni:
                                  type: boolean
                                initiationYear:
                                  type: integer
                                  minimum: -9007199254740991
                                  maximum: 9007199254740991
                              required:
                                - firstName
                                - lastName
                                - email
                          reactivate:
                            type: array
                            items:
                              type: object
                              properties:
                                memberId:
                                  type: string
                                  minLength: 1
                                incoming:
                                  type: object
                                  properties:
                                    firstName:
                                      type: string
                                      minLength: 1
                                    lastName:
                                      type: string
                                      minLength: 1
                                    email:
                                      type: string
                                      format: email
                                    phone:
                                      type: string
                                    parentFirstName:
                                      type: string
                                    parentLastName:
                                      type: string
                                    parentEmail:
                                      anyOf:
                                        - type: string
                                          format: email
                                        - type: string
                                          const: ''
                                    customFields:
                                      maxItems: 20
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          label:
                                            type: string
                                            maxLength: 60
                                          value:
                                            type: string
                                            maxLength: 300
                                        required:
                                          - label
                                          - value
                                    alumni:
                                      type: boolean
                                    initiationYear:
                                      type: integer
                                      minimum: -9007199254740991
                                      maximum: 9007199254740991
                                  required:
                                    - firstName
                                    - lastName
                                    - email
                                removedCustomFieldLabels:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - memberId
                                - incoming
                          update:
                            type: array
                            items:
                              type: object
                              properties:
                                memberId:
                                  type: string
                                  minLength: 1
                                incoming:
                                  type: object
                                  properties:
                                    firstName:
                                      type: string
                                      minLength: 1
                                    lastName:
                                      type: string
                                      minLength: 1
                                    email:
                                      type: string
                                      format: email
                                    phone:
                                      type: string
                                    parentFirstName:
                                      type: string
                                    parentLastName:
                                      type: string
                                    parentEmail:
                                      anyOf:
                                        - type: string
                                          format: email
                                        - type: string
                                          const: ''
                                    customFields:
                                      maxItems: 20
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          label:
                                            type: string
                                            maxLength: 60
                                          value:
                                            type: string
                                            maxLength: 300
                                        required:
                                          - label
                                          - value
                                    alumni:
                                      type: boolean
                                    initiationYear:
                                      type: integer
                                      minimum: -9007199254740991
                                      maximum: 9007199254740991
                                  required:
                                    - firstName
                                    - lastName
                                    - email
                                removedCustomFieldLabels:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - memberId
                                - incoming
                          archiveMemberIds:
                            type: array
                            items:
                              type: string
                          alumni:
                            type: array
                            items:
                              type: object
                              properties:
                                memberId:
                                  type: string
                                  minLength: 1
                                incoming:
                                  type: object
                                  properties:
                                    firstName:
                                      type: string
                                      minLength: 1
                                    lastName:
                                      type: string
                                      minLength: 1
                                    email:
                                      type: string
                                      format: email
                                    phone:
                                      type: string
                                    parentFirstName:
                                      type: string
                                    parentLastName:
                                      type: string
                                    parentEmail:
                                      anyOf:
                                        - type: string
                                          format: email
                                        - type: string
                                          const: ''
                                    customFields:
                                      maxItems: 20
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          label:
                                            type: string
                                            maxLength: 60
                                          value:
                                            type: string
                                            maxLength: 300
                                        required:
                                          - label
                                          - value
                                    alumni:
                                      type: boolean
                                    initiationYear:
                                      type: integer
                                      minimum: -9007199254740991
                                      maximum: 9007199254740991
                                  required:
                                    - firstName
                                    - lastName
                                    - email
                                removedCustomFieldLabels:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - memberId
                                - incoming
                          archiveReasons:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties:
                              type: string
                          errors:
                            type: array
                            items:
                              type: string
                        required:
                          - add
                          - reactivate
                          - update
                          - archiveMemberIds
                      reviewToken:
                        type: string
                      dispositions:
                        type: array
                        items:
                          type: object
                          properties:
                            memberId:
                              type: string
                              minLength: 1
                            action:
                              type: string
                              enum:
                                - keep_active
                                - archive
                            reason:
                              type: string
                              minLength: 1
                              maxLength: 500
                          required:
                            - memberId
                            - action
                            - reason
                    required:
                      - plan
                ignoredCustomFieldLabels:
                  description: >-
                    Labels of extra roster columns the uploader chose not to
                    import. Custom fields with these labels (case-insensitive)
                    are dropped from every row before anything is written.
                  maxItems: 500
                  type: array
                  items:
                    type: string
                    maxLength: 200
              required:
                - entries
      responses:
        '201':
          description: Success
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                type: object
                properties:
                  chapters:
                    type: array
                    items:
                      type: object
                      properties:
                        chapterId:
                          type: string
                        chapterName:
                          type: string
                        created:
                          type: boolean
                        linked:
                          type: boolean
                        restored:
                          type: boolean
                        linkRequested:
                          type: boolean
                        result:
                          type: object
                          properties:
                            added:
                              type: number
                            reactivated:
                              type: number
                            updated:
                              type: number
                            archived:
                              type: number
                            archiveSkipped:
                              type: number
                            alumni:
                              type: number
                            alumniSkipped:
                              type: number
                            failed:
                              type: number
                            donorSyncFailedOrganizations:
                              type: number
                            errors:
                              type: array
                              items:
                                type: string
                          required:
                            - added
                            - reactivated
                            - updated
                            - archived
                            - archiveSkipped
                            - alumni
                            - alumniSkipped
                            - failed
                      required:
                        - chapterId
                        - chapterName
                        - created
                        - linked
                        - restored
                        - linkRequested
                        - result
                  chaptersCreated:
                    type: number
                  chaptersLinked:
                    type: number
                  chaptersRestored:
                    type: number
                  chaptersLinkRequested:
                    type: number
                  totals:
                    type: object
                    properties:
                      added:
                        type: number
                      reactivated:
                        type: number
                      updated:
                        type: number
                      archived:
                        type: number
                      archiveSkipped:
                        type: number
                      alumni:
                        type: number
                      alumniSkipped:
                        type: number
                      failed:
                        type: number
                      donorSyncFailedOrganizations:
                        type: number
                      errors:
                        type: array
                        items:
                          type: string
                    required:
                      - added
                      - reactivated
                      - updated
                      - archived
                      - archiveSkipped
                      - alumni
                      - alumniSkipped
                      - failed
                  invitesSent:
                    type: number
                  inviteErrors:
                    type: array
                    items:
                      type: string
                required:
                  - chapters
                  - chaptersCreated
                  - chaptersLinked
                  - chaptersRestored
                  - chaptersLinkRequested
                  - totals
                  - invitesSent
                  - inviteErrors
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
        default:
          $ref: '#/components/responses/UnexpectedError'
      security:
        - bearerAuth:
            - chapters:write
            - members:write
components:
  headers:
    X-Request-Id:
      description: >-
        Identifies the request; quote it to support. Also in the error body as
        `requestId`.
      schema:
        type: string
    RateLimit-Limit:
      description: Requests the token's budget for this kind of request allows per window.
      schema:
        type: integer
    RateLimit-Remaining:
      description: Requests left in the current window.
      schema:
        type: integer
    RateLimit-Reset:
      description: Seconds until the window resets.
      schema:
        type: integer
    Idempotent-Replayed:
      description: >-
        `true` when this response is the stored answer to an earlier request
        with the same `Idempotency-Key`.
      schema:
        type: string
        enum:
          - 'true'
    Retry-After:
      description: Seconds to wait before retrying.
      schema:
        type: integer
  responses:
    BadRequest:
      description: >-
        Invalid input: a parameter or body field fails validation (`param` names
        it), the body isn't JSON, or a business rule refused the request.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing, malformed, expired or revoked token.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The token lacks a required scope.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: No such resource, or the token's organization can't see it.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: >-
        The write conflicts with existing state, or an `Idempotency-Key` was
        reused with different parameters.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Rate limited; see the `Retry-After` header.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnexpectedError:
      description: >-
        Any other failure, such as `internal_error` (500), as the `Error`
        envelope. A failure in front of the API (a gateway timeout, a request
        too large) may instead be plain text.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
        text/plain:
          schema:
            type: string
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              description: >-
                A stable, machine-readable reason. One of `invalid_request`
                (400), `invalid_token` (401), `insufficient_scope` (403),
                `step_up_required` (403), `not_found` (404),
                `method_not_allowed` (405), `conflict` (409), `sync_expired`
                (410), `rate_limited` (429), `internal_error` (500),
                `provider_error` (502). New codes may be added; treat an unknown
                one by its HTTP status.
              type: string
            message:
              type: string
            param:
              type: string
            requiredScopes:
              type: array
              items:
                type: string
            requestId:
              type: string
            docsUrl:
              type: string
          required:
            - code
            - message
            - requestId
            - docsUrl
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A Dueflow access token: `dfp_` (personal) or `dfs_` (service).
        Permissions are the token's scopes intersected with the role ceiling,
        re-evaluated per request.

````

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