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

# Stage a chunk of rows onto a job (≤5k rows/request, job must be `staging`)



## OpenAPI

````yaml https://api.develop.fourdos.dev/openapi/partner.json post /v1/imports/{id}/rows
openapi: 3.1.0
info:
  title: 4D OS Partner API
  version: 0.1.0
  description: >-
    REST API for 4D OS partners. Authenticate with your organization API key:
    `Authorization: Bearer <key>`.


    Requests and responses are JSON with `snake_case` field names. Errors share
    one envelope: `{ "error": { "code", "status", "message", "details"? } }`.


    Mutating endpoints that declare it accept an `Idempotency-Key` header so
    retries are safe.


    Bulk-migrating members? See the [Migrating to 4D
    guide](https://docs.fourdos.dev/walkthroughs/migrate-existing-members) for
    the canonical import schema, a worked example, and the `/v1/imports`
    sequence.
servers: []
security:
  - partnerApiKey: []
tags:
  - name: Users
    description: Create, read, and manage users and their org membership
  - name: Imports
    description: Bulk member import jobs (staging → validate → commit)
  - name: Engagement
    description: Browser event tracking (publishable keys) and tracking-key management
paths:
  /v1/imports/{id}/rows:
    post:
      tags:
        - Imports
      summary: >-
        Stage a chunk of rows onto a job (≤5k rows/request, job must be
        `staging`)
      operationId: appendImportRows
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppendImportRowsBody'
      responses:
        '200':
          description: Rows staged
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppendImportRowsResponse'
        '404':
          description: Import job not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: The job is not in `staging`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Validation error, or the row/chunk cap was exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    AppendImportRowsBody:
      type: object
      properties:
        rows:
          minItems: 1
          type: array
          items:
            type: object
            properties:
              rowNumber:
                type: integer
                exclusiveMinimum: 0
                maximum: 9007199254740991
              payload:
                type: object
                properties:
                  email:
                    type: string
                    format: email
                    pattern: >-
                      ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                  external_id:
                    type: string
                  display_name:
                    type: string
                  locale:
                    type: string
                  first_name:
                    type: string
                  last_name:
                    type: string
                  country:
                    type: string
                    pattern: ^[A-Za-z]{2}$
                  dob:
                    type: string
                    pattern: ^\d{4}-\d{2}-\d{2}$
                  attributes:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties: {}
                  labels:
                    maxItems: 20
                    type: array
                    items:
                      type: string
                required:
                  - email
                additionalProperties: false
            required:
              - rowNumber
              - payload
      required:
        - rows
    AppendImportRowsResponse:
      type: object
      properties:
        staged:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
      required:
        - staged
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            status:
              type: integer
            message:
              type: string
            details:
              type: object
              additionalProperties: true
          required:
            - code
            - status
            - message
      required:
        - error
  securitySchemes:
    partnerApiKey:
      type: http
      scheme: bearer
      description: >-
        Organization API key (`org_…`), sent as `Authorization: Bearer <key>`.
        Keys are scoped to one organization; every request operates within that
        tenant.

````