Filter records by a Date field’s range with the Inbound API

Request records whose Date field starts within a fixed interval and verify the boundaries.

Use this workflow to read a fixed reporting period from a table stored in Mainbase. Choose a readable Date field whose type in the schema is dateV2. The API key’s acting user must be able to read that field and the matching records.

Set the start and end

Use GET /entities/{entityId} to find the field’s dataKey. Replace 123 with the table ID and review_date with the key from your schema. Use the base URL from API Access and load the key from your secret manager.

The example covers June 1 through June 7 in UTC. Supply both boundaries as ISO 8601 timestamps with a time zone. For a period defined in a local time zone, calculate the appropriate offsets for the dates before sending the request.

curl --silent --show-error --fail-with-body --get \
  "${NIXA_API_BASE_URL}/entities/123/records" \
  -H "X-API-Key: ${NIXA_API_KEY}" \
  --data-urlencode 'filters={"field":"review_date","operator":"between","value":{"start":"2026-06-01T00:00:00Z","end":"2026-06-07T23:59:59.999Z"}}' \
  --data-urlencode 'sortBy=id' \
  --data-urlencode 'sortOrder=asc' \
  --data-urlencode 'limit=25' \
  --data-urlencode 'page=1'

Verify the interval

The between filter includes both boundaries. When a Date field has a start and an end, this filter compares its start. Check a known record inside the interval and one outside it. If meta.hasMore is true, read the next page with the same filter and sort.

Ask Mainbase AI

Ask about any feature in Mainbase. Find a setting, get step-by-step guidance, or troubleshoot a problem.

Open the AI assistant

Copy a question to get started

  • How do I create a Kanban view?
  • How do I invite a teammate?
  • Why is a record missing from this view?