Uploading a file to a container field via the Data API

Expert

Use a multipart/form-data POST request to upload a file into a FileMaker container field, and understand the two-step process of creating the record first, then uploading.

What you'll learn

  • The two-step create-then-upload pattern for container fields
  • How to structure the multipart/form-data request
  • How to trigger a container upload from a FileMaker script using Insert from URL

Container field uploads require a separate multipart POST to a dedicated endpoint after the record exists — you cannot upload a file and create the record in the same request.

1/3
1

Step 1 — Create the parent record first

If the record does not exist yet, create it with a standard POST to /records. Save the recordId returned in the response.

HTTP
POST /fmi/data/v1/databases/{db}/layouts/Documents/records
Authorization: Bearer {token}
Content-Type: application/json

{
  "fieldData": {
    "FileName": "contract.pdf",
    "UploadedBy": "jsmith",
    "UploadedOn": "04/06/2026"
  }
}

# Response: { "response": { "recordId": "118", "modId": "0" } }

Sign in to track your progress and pick up where you left off.

Sign in to FM Dojo