Fileinbox API

Fileinbox has an API that allows you to programmatically manage your upload pages, view submissions, and download files.

→ Get an API token to start using the API.

The API is included in the free plan. Make a key at https://fileinbox.com/settings/api_tokens: sign in, open Settings, choose API tokens, then click Generate new token. No paid plan is needed.

The API is versioned at /api/v1. Breaking changes will ship at a new path (e.g. /api/v2)
rather than changing this one. See the full machine-readable spec at
/api/openapi.json (also at /openapi.json).

Table of Contents


Authentication

To use the API you'll need an access token. Go to your API Tokens page and click "Generate new token".

Permission levels:

  • Read — List pages, view responses, download files
  • Read + Write — All read permissions plus create/update/delete pages and responses

Include your token in the Authorization header:

curl -H "Authorization: Bearer fi_xxxxx" \
     https://fileinbox.com/api/v1/ping
{ "status": "ok", "user_id": 42 }

Keep your token secret. Anyone with your token can access your account's data.

Error Responses

Status Description
401 Missing or invalid token
403 Token doesn't have required permission
404 Resource not found
422 Validation error (includes details object with per-field errors)
429 Rate limit exceeded (100 requests/minute)

Every error under /api, including an unknown path (404), a missing or blank token (401) and a
malformed JSON body (400), answers JSON with the same shape: a machine code, a plain message,
and a hint that says what to do next. A 422 also has details.

{
  "error": {
    "code": "validation_failed",
    "message": "Slug has already been taken",
    "hint": "Fix the fields listed in details, then send the request again.",
    "details": { "slug": ["has already been taken"] }
  }
}

Rate limits

Each token can make 100 requests per minute. Requests with a missing or wrong token are counted
per IP address. Every /api answer has these headers:

Header Meaning
RateLimit-Limit Requests allowed in the window
RateLimit-Remaining Requests left in this window
RateLimit-Reset Seconds until the window resets

Over the limit, the answer is 429 with a Retry-After header (seconds). Wait that long, then try again.

Pagination

List endpoints return paginated results. Use page and per_page query parameters. per_page defaults to 25 (max 100).

{
  "data": [...],
  "meta": { "page": 1, "per_page": 25, "total": 42 }
}

Pages

Get a Page

GET /api/v1/pages/:slug

Permission: Read

curl -H "Authorization: Bearer fi_xxxxx" \
     https://fileinbox.com/api/v1/pages/photos
{
  "data": {
    "id": 1,
    "slug": "photos",
    "title": "Upload Photos",
    "created_at": "2025-01-15T10:30:00Z",
    "updated_at": "2025-01-15T10:30:00Z",
    "url": "https://fileinbox.com/photos",
    "responses_count": 12,
    "questions": [
      { "id": "q1", "type": "text", "title": "Your Name", "required": true }
    ],
    "branding": {},
    "access_code_enabled": false,
    "api_submissions_enabled": false
  }
}

List Pages

GET /api/v1/pages

Permission: Read

Returns a paginated array of page objects. Supports page and per_page query parameters.

curl -H "Authorization: Bearer fi_xxxxx" \
     https://fileinbox.com/api/v1/pages

Create a Page

POST /api/v1/pages

Permission: Read + Write

Field Type Required Description
page[slug] string yes URL slug (unique, letters/numbers/hyphens)
page[title] string no Page title shown to uploaders
page[access_code] string no Require this code to access the page
page[api_submissions_enabled] boolean no Allow unauthenticated API submissions
page[branding] object no Branding settings
page[new_questions] array no Form questions (see below)

Each question in new_questions:

Field Type Description
id string Unique identifier for the question
type string text, textarea, email, select, files
title string Question label shown to uploaders
required boolean Whether an answer is required
placeholder string Placeholder text
help string Help text
settings object Type-specific settings
curl -X POST \
     -H "Authorization: Bearer fi_xxxxx" \
     -H "Content-Type: application/json" \
     -d '{
       "page": {
         "slug": "photos",
         "title": "Upload Photos",
         "new_questions": [
           { "id": "q1", "type": "text", "title": "Your Name", "required": true }
         ]
       }
     }' \
     https://fileinbox.com/api/v1/pages

Response: 201 Created with the page object.

Update a Page

PATCH /api/v1/pages/:slug

Permission: Read + Write. Only include the fields you want to change.

curl -X PATCH \
     -H "Authorization: Bearer fi_xxxxx" \
     -H "Content-Type: application/json" \
     -d '{ "page": { "title": "Upload Wedding Photos" } }' \
     https://fileinbox.com/api/v1/pages/photos

Response: 200 OK with the updated page object.

Delete a Page

DELETE /api/v1/pages/:slug

Permission: Read + Write

curl -X DELETE \
     -H "Authorization: Bearer fi_xxxxx" \
     https://fileinbox.com/api/v1/pages/photos

Response: 204 No Content


Responses (Submissions)

Responses are submissions that people make to your upload pages. Each response can contain form answers and uploaded files.

Get a Response

GET /api/v1/pages/:slug/responses/:id

Permission: Read

curl -H "Authorization: Bearer fi_xxxxx" \
     https://fileinbox.com/api/v1/pages/photos/responses/1
{
  "data": {
    "id": 1,
    "created_at": "2025-01-16T14:20:00Z",
    "answers": [
      { "question_title": "Your Name", "question_type": "text", "value": "Jane Smith" }
    ],
    "ip": "192.168.1.1",
    "location": "Dallas, TX",
    "client": "Chrome on macOS",
    "files": [
      {
        "id": 10,
        "filename": "photo.jpg",
        "content_type": "image/jpeg",
        "byte_size": 2048000,
        "download_url": "/api/v1/pages/photos/responses/1/files/10"
      }
    ]
  }
}

If a response's files are gated (free plan, older than 30 days), download_url is omitted and "gated": true is present instead.

List Responses

GET /api/v1/pages/:slug/responses

Permission: Read

Returns a paginated array of response objects. Supports page, per_page, and since (ISO 8601 timestamp) query parameters.

curl -H "Authorization: Bearer fi_xxxxx" \
     "https://fileinbox.com/api/v1/pages/photos/responses?since=2025-01-16T00:00:00Z"

Delete a Response

DELETE /api/v1/pages/:slug/responses/:id

Permission: Read + Write

curl -X DELETE \
     -H "Authorization: Bearer fi_xxxxx" \
     https://fileinbox.com/api/v1/pages/photos/responses/1

Response: 204 No Content


Files

Download a File

GET /api/v1/pages/:slug/responses/:response_id/files/:id

Permission: Read

Returns a 302 redirect to a signed download URL (expires in 5 minutes). Use -L to follow the redirect.

Files copied from the old Fileinbox app get a signed Google Cloud Storage URL. If Google no longer has the file, the answer is 410 with error code file_unavailable. A response hidden by the free plan answers 403 with error code forbidden.

curl -L -H "Authorization: Bearer fi_xxxxx" \
     -o photo.jpg \
     https://fileinbox.com/api/v1/pages/photos/responses/1/files/10

Public Submissions

These endpoints allow unauthenticated submissions to pages that have api_submissions_enabled set to true. No API token required.

Enable via the page's Security settings or the API:

curl -X PATCH \
     -H "Authorization: Bearer fi_xxxxx" \
     -H "Content-Type: application/json" \
     -d '{ "page": { "api_submissions_enabled": true } }' \
     https://fileinbox.com/api/v1/pages/photos

The command-line tool on npm is being updated; until then use the HTTP API below.

The fastest way to submit is the CLI. It needs no account or token:

npx fileinbox submit photos --answer "q_default_email=jane@example.com" --file ./report.pdf

List a Page's Questions

GET /api/v1/pages/:slug/submissions/new

Returns the questions to answer and the IDs to use in answers[...] and files[...]. Pass access_code if the page has one.

{
  "data": {
    "slug": "photos",
    "title": "Photo Uploads",
    "url": "https://fileinbox.com/photos",
    "submit_url": "https://fileinbox.com/api/v1/pages/photos/submissions",
    "access_code_required": false,
    "questions": [
      { "id": "q_default_email", "type": "email", "title": "Your email", "required": true },
      { "id": "q_size", "type": "list", "title": "Size", "required": false, "options": ["S", "M", "L"] },
      { "id": "q_default_files", "type": "files", "title": "Upload files", "required": true }
    ]
  }
}

Submit with Files (Multipart)

POST /api/v1/pages/:slug/submissions
Content-Type: multipart/form-data

The simplest way to submit. Send answers and files in a single multipart request — the server handles file storage automatically.

curl -X POST \
     -F "answers[q_default_email]=jane@example.com" \
     -F "files[q_default_files][]=@report.pdf" \
     -F "files[q_default_files][]=@photo.jpg" \
     -F "access_code=secret123" \
     https://fileinbox.com/api/v1/pages/photos/submissions

Response: 201 Created

{
  "data": {
    "id": 42,
    "created_at": "2025-01-15T10:30:00Z"
  }
}
Field Type Required Description
answers object yes Map of question ID → answer value
files object no Map of file question ID → array of files
access_code string no Required if the page has an access code set

Use question IDs from the page's questions array as keys.

Rate limit: 10 requests/minute per IP.

Submit with JSON (Direct Upload)

For large files or browser-based uploads, you can use the two-step direct upload flow instead.

Step 1: Create upload URLs.

POST /api/v1/pages/:slug/uploads
curl -X POST \
     -H "Content-Type: application/json" \
     -d '{
       "blobs": [{
         "filename": "document.pdf",
         "byte_size": 1048576,
         "content_type": "application/pdf"
       }]
     }' \
     https://fileinbox.com/api/v1/pages/photos/uploads
{
  "data": [
    {
      "signed_id": "eyJfcm...",
      "filename": "document.pdf",
      "direct_upload": {
        "url": "https://storage.example.com/...",
        "headers": { "Content-Type": "application/pdf" }
      }
    }
  ]
}

Upload the file bytes with a PUT to direct_upload.url using the provided headers. Rate limit: 20 requests/minute per IP.

Step 2: Submit with signed IDs.

POST /api/v1/pages/:slug/submissions
Content-Type: application/json
curl -X POST \
     -H "Content-Type: application/json" \
     -d '{
       "answers": { "q_default_email": "jane@example.com" },
       "files": {
         "q_default_files": [
           { "signed_id": "eyJfcm...", "name": "document.pdf" }
         ]
       }
     }' \
     https://fileinbox.com/api/v1/pages/photos/submissions

Error Responses:

Status Description
403 API submissions not enabled for this page
401 Invalid access code
404 Page not found
422 Validation error (missing required fields)
429 Rate limit exceeded

MCP server

Fileinbox has an MCP (Model Context Protocol) server, so an AI agent can manage your pages and read your files without code.

POST https://fileinbox.com/mcp
  • Transport: Streamable HTTP, stateless (JSON-RPC 2.0 over POST, plain JSON answers, no session id). A GET answers 405.
  • Sign-in: the same API key as the REST API, sent as Authorization: Bearer fi_YOUR_KEY. Make a key at https://fileinbox.com/settings/api_tokens. The free plan includes the MCP server, like the API.
  • A missing, blank or wrong key answers 401 with the API error JSON (code, message, hint) and WWW-Authenticate: Bearer.
  • Same rate limit as the API (100 requests a minute per key, RateLimit-* headers, Retry-After on a 429). upload_file is also limited to 10 uploads a minute per key.
  • Tools use your default team. A read key can call the read tools only; a write tool with a read key answers forbidden.
  • A tool error is a normal tool result with isError: true. The text is the API error JSON, so the agent can read the hint.

Tools

Tool Key What it does
list_pages Read List your pages: slug, title, url, response count, questions, access code and API-submission settings. Arguments: page, per_page.
create_page Read+Write Create a page. Arguments: title, and optional slug, access_code, api_submissions_enabled, questions. Your plan's page limit applies (limit_reached).
update_page_settings Read+Write Change one page: slug, and any of title, access_code, api_submissions_enabled, branding, questions. It cannot delete a page.
list_responses Read List the responses on a page, with answers and files (file_id, name, size). Arguments: page_slug, optional since (ISO 8601), page, per_page. A response with gated: true is hidden by the free plan.
get_file_download_link Read Get a download link (valid 5 minutes) for one file: page_slug, response_id, file_id. Returns {url, expires_in_seconds, filename, byte_size}. Works for new files and for files copied from the old Fileinbox app. A file Google no longer has answers file_unavailable.
upload_file Read+Write Upload one file to a page, the way a visitor does: page_slug, filename, content_base64, and optional content_type, question_id, answers, access_code. The page owner must have turned on API submissions. The file goes inside the call as base64, up to 10 MB; a bigger file answers file_too_large (use the two-step upload under Submit with JSON).

There are no tools that delete pages, responses or files, and none that manage shares, account settings or API keys.

Set it up

Claude Code

claude mcp add --transport http fileinbox https://fileinbox.com/mcp \
  --header "Authorization: Bearer fi_YOUR_KEY"

Cursor (.cursor/mcp.json, or Settings, MCP)

{
  "mcpServers": {
    "fileinbox": {
      "url": "https://fileinbox.com/mcp",
      "headers": { "Authorization": "Bearer fi_YOUR_KEY" }
    }
  }
}

ChatGPT

ChatGPT cannot connect to this server yet. Its custom connectors sign in with OAuth or with no sign-in, and they do not send a fixed API key in a header. Fileinbox has no OAuth sign-in for MCP yet. Use Claude Code, Cursor, or another MCP client that lets you set a request header. Until then, ChatGPT can use the REST API above (see the OpenAPI file).

Any other client: use the URL https://fileinbox.com/mcp with the header Authorization: Bearer fi_YOUR_KEY.

Try it with curl

curl -s https://fileinbox.com/mcp \
  -H "Authorization: Bearer fi_xxxxx" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_pages","arguments":{}}}'

File Sharing

Share files by uploading them and getting a download link. Recipients can download without signing up.

Upload Flow

File sharing uses a two-step presigned upload flow:

  1. Request presigned URLs — tell the API what files you want to upload
  2. Upload directly to storage — upload each file to the presigned URL
  3. Finalize the share — create the share with the uploaded file references

Step 1: Request Presigned Upload URLs

POST /api/v1/share_uploads
Authorization: Token fi_xxxxx
Content-Type: application/json
{
  "blobs": [
    {
      "filename": "report.pdf",
      "byte_size": 2097152,
      "checksum": "abc123base64==",
      "content_type": "application/pdf"
    }
  ]
}

Response:

{
  "data": [
    {
      "signed_id": "eyJfcm...",
      "filename": "report.pdf",
      "byte_size": 2097152,
      "content_type": "application/pdf",
      "direct_upload": {
        "url": "https://nyc3.digitaloceanspaces.com/...",
        "headers": {
          "Content-Type": "application/pdf",
          "Content-MD5": "abc123base64=="
        }
      }
    }
  ]
}

Step 2: Upload Files

Upload each file directly to the presigned URL using a PUT request with the provided headers.

curl -X PUT \
     -H "Content-Type: application/pdf" \
     -H "Content-MD5: abc123base64==" \
     --data-binary @report.pdf \
     "https://nyc3.digitaloceanspaces.com/..."

Step 3: Create Share

POST /api/v1/shares
Authorization: Token fi_xxxxx
Content-Type: application/json
{
  "signed_ids": ["eyJfcm..."],
  "title": "Q4 Report",
  "message": "See page 3 for the summary.",
  "to": ["sarah@example.com"],
  "password": "optional-password",
  "expires_in": "7d"
}

Response (201 Created):

{
  "data": {
    "id": "k8m2x9p3",
    "url": "https://fileinbox.com/dl/k8m2x9p3",
    "title": "Q4 Report",
    "message": "See page 3 for the summary.",
    "files": [
      { "name": "report.pdf", "size": 2097152, "content_type": "application/pdf" }
    ],
    "to": ["sarah@example.com"],
    "password_protected": false,
    "expires_at": "2026-03-19T16:17:42Z",
    "download_count": 0,
    "created_at": "2026-03-12T16:17:42Z"
  }
}

List Shares

GET /api/v1/shares
Authorization: Token fi_xxxxx

Supports pagination with page and per_page parameters.

Get Share Details

GET /api/v1/shares/:code
Authorization: Token fi_xxxxx

Returns share details with _links and _actions for hypermedia navigation.

Update Share

PATCH /api/v1/shares/:code
Authorization: Token fi_xxxxx (write permission required)
Content-Type: application/json
{
  "title": "Updated Title",
  "message": "Updated message"
}

Delete Share

DELETE /api/v1/shares/:code
Authorization: Token fi_xxxxx (write permission required)

Returns 204 No Content. Soft-deletes the share.

Error Responses

Status Code Description
402 share_limit_reached Free plan share limit (25) exceeded
422 file_too_large File exceeds plan size limit (100 MB free, 10 GB Pro)
422 no_files No files provided
422 invalid_signed_id Invalid file reference
403 — Read-only token used for write operation
404 not_found Share not found
429 — Rate limit exceeded

Free vs Pro Limits

Free Pro ($29/mo)
Lifetime sends 25 Unlimited
Max file size 100 MB 10 GB
File availability 7 days Forever (or custom)
Custom expiry No Yes
Password protection Yes Yes

Download Page

Share download pages are publicly accessible at https://fileinbox.com/dl/:code. No authentication required to view or download files.

The download page supports content negotiation:
- Accept: text/html — Beautiful branded download page
- Accept: application/json — JSON with file metadata and download URLs

CLI

The command-line tool on npm is being updated; until then use the HTTP API below.

npm install -g fileinbox
fileinbox auth YOUR_API_KEY
fileinbox send report.pdf --title "Q4 Report" --to sarah@example.com