Overview
The@filefeed/sdk package provides a type-safe client for the FileFeed API.
- Authentication via API key
- Resources: Connections (formerly Clients), Pipelines, Schemas, Pipeline Runs, Webhooks, Outbound Uploads, Documents, Files, Notifications
- Pagination helpers and typed responses
Quick links
API Reference
Explore endpoints with the API Playground.
Syncing Data
Fetch processed data and acknowledge runs.
Handling Errors
Retry patterns and structured error handling.
Installation
- npm
- yarn
- pnpm
Requirements
- Node.js >= 18
- TypeScript >= 5 (for TS projects)
Initialize the client
Next steps
- Call endpoints with the API Reference
Resources and methods
For endpoint details and payload schemas, see the API Reference.
connections
connections
Manage SFTP / Email endpoints (formerly called clients). The deprecated
Common workflows
filefeed.clients.* namespace still works and proxies here.| Method | Signature | Description |
|---|---|---|
| list | list() | List connections. |
| retrieve | retrieve(id) | Get a connection by id. |
| getByName | getByName(name) | Get a connection by name (unique per workspace). Resolves to the connection or undefined. |
| create | create(params) | Create a connection (SFTP, self-hosted SFTP, or type: 'EMAIL'). |
| update | update(id, params) | Update connection details. |
| remove | remove(id) | Delete a connection. |
| test | test(id) | Test SFTP connectivity (returns success/message). No-op for EMAIL. |
- Provision a connection with SFTP credentials (write-only — never read back)
- Create an EMAIL connection that ingests mailed attachments
- Verify connectivity before onboarding
- Resolve a connection by its human-readable name
schemas
schemas
Define and validate your target data model.
Common workflows
| Method | Signature | Description |
|---|---|---|
| list | list() | List schemas. |
| retrieve | retrieve(id) | Get a schema. |
| create | create(params) | Create a schema from a JSON Schema definition. |
| update | update(id, params) | Update a schema’s definition. |
| remove | remove(id) | Delete a schema. |
| validate | validate({ schemaId, data }) | Validate a payload against a schema. |
- Define the column structure as a JSON Schema
definition - Validate a sample payload pre-ingestion
pipelines
pipelines
Connect clients to schemas and define mappings/transforms. Field mappings
support sourced entries (
Common workflows
{ source, target, transform? }), static values
({ target, value }) that write a fixed constant into a column on every row,
and aggregated entries ({ sources, target, delimiter? }) that join several
input columns into one target — limited availability, see
field-mapping kinds.| Method | Signature | Description |
|---|---|---|
| list | list({ clientId?, connectionName? }) | List pipelines. |
| retrieve | retrieve(id) | Get a pipeline. |
| create | create(params) | Create a pipeline (mappings/transforms). |
| update | update(id, params) | Update pipeline configuration. |
| remove | remove(id) | Delete a pipeline. |
| toggleActive | toggleActive(id) | Enable/disable a pipeline. |
- Create a pipeline for a client + schema
- Adjust mappings, then toggle active for go-live
pipelineRuns
pipelineRuns
Manage processing jobs and retrieve processed data.
Common workflows
| Method | Signature | Description |
|---|---|---|
| list | list({ status?, clientId?, pipelineId?, pipelineName?, page?, limit? }) | Paginated runs. Filter by status/client/pipeline/ids. |
| retrieve | retrieve(id) | Get a single pipeline run. |
| getData | getData({ pipelineRunId, offset?, limit? }) | Paginated processed rows (offset-based, up to 1000 per page). |
| ack | ack({ pipelineRunId }) | Mark run as processed (idempotent). |
| reprocess | reprocess({ pipelineRunId }) | Re-run processing for a given run. |
| getOriginalFileUrl | getOriginalFileUrl({ pipelineRunId, expiresIn? }) | Presigned URL to the original file. |
| getProcessedFileUrl | getProcessedFileUrl({ pipelineRunId, expiresIn? }) | Presigned URL to the processed file. |
| delta | delta({ baseRunId, compareRunId, offset?, limit? }) | Compare two runs of the same pipeline; returns the records added/removed between their processed files, with summary counts and a paginated changes list. |
- Fetch completed runs, paginate data, then acknowledge the run
- Download original or processed file for audit trails
- Reprocess failed runs after fixing mapping or schema
- Diff two runs of the same pipeline (e.g. yesterday vs today) to see which records changed
webhooks
webhooks
Receive signed notifications for pipeline events.
Common workflows
| Method | Signature | Description |
|---|---|---|
| list | list() | List webhooks. |
| retrieve | retrieve(id) | Get a webhook. |
| create | create(params) | Create a webhook (name, URL, optional headers). eventType defaults to GENERAL and secret is server-generated. |
| update | update(id, params) | Update webhook configuration. |
| remove | remove(id) | Delete a webhook. |
| listDeliveries | listDeliveries(params) | Inspect delivery attempts and status codes. |
| subscribeZapierPipelineRunEvents | ({ targetUrl }) | Subscribe a Zapier URL to pipeline-run events. |
| unsubscribeZapierPipelineRunEvents | ({ id }) | Remove a Zapier pipeline-run subscription. |
- Create a webhook for pipeline events
- Monitor delivery health and retry on failure
outbound
outbound
Push JSON data into outbound pipelines via multipart uploads.
Common workflowsSee the Outbound Flow guide for the full walkthrough.
| Method | Signature | Description |
|---|---|---|
| initUpload | initUpload(params) | Create an upload session. |
| uploadPart | uploadPart(uploadId, partNumber, params) | Upload one JSON array part. |
| completeUpload | completeUpload(uploadId, params) | Finalize and trigger processing. |
| abortUpload | abortUpload(uploadId) | Cancel and cleanup parts. |
| getUploadStatus | getUploadStatus(uploadId) | Check session progress. |
| uploadJson | uploadJson(params) | Convenience: chunk, upload, and complete in one call. |
- Push data from your backend into a pipeline
- Chunk large datasets and upload in parts
- Use
uploadJson()for simple one-shot uploads - Choose the delivered file’s name and format (
csv|json|xml)
name as connectionName (the legacy clientName resolves by that same name and is deprecated).documents
documents
Browse and manage a connection’s file store (S3 drive). Paths are relative
to the connection root; pipeline-backed folders are protected.
| Method | Signature | Description |
|---|---|---|
| browse | browse({ connectionId, path?, token? }) | List one page of folders/files. |
| getMetadata | getMetadata({ connectionId, path }) | File size, content type, etag. |
| getDownloadUrl | getDownloadUrl({ connectionId, path }) | Presigned download URL. |
| createUploadTicket | createUploadTicket(params) | Presigned single/multipart upload. |
| completeUpload / abortUpload | (params) | Finalize / cancel a multipart upload. |
| createFolder / move / rename | (params) | Folder + path operations. |
| deleteObject / deleteFolder / bulkDelete | (params) | Delete (force = admin only). |
files
files
Direct access to processed file content (distinct from per-run access on
pipelineRuns).| Method | Signature | Description |
|---|---|---|
| getJson | getJson({ clientName, fileName, pipelineId, offset?, limit? }) | Fetch a processed JSON file by name. |
| search | search({ pipelineRunIds, searchTerm?, ... }) | Search rows across processed files. |
notifications
notifications
Per-connection notification preferences — deliver pipeline-run alerts over
EMAIL / SLACK / SMS.
| Method | Signature | Description |
|---|---|---|
| getPreferences | getPreferences(connectionId) | List a connection’s preferences. |
| setPreferences | setPreferences(connectionId, { preferences }) | Upsert preferences (an enabled one needs recipients). |
The
documents, files, and notifications resources and the Zapier webhook
methods require @filefeed/sdk ≥ 2.5.0.