Errors

The Files.com API returns standard HTTP success (2xx) or error (4xx, 5xx) status codes. Status codes in the 5xx range are unexpected and indicate an error occurred with our API. Wait some time and then try again. If you get a 500 repeatedly, it may be a bug. Please report it.

Note that success codes can include 200, 201, and 204.

The Files.com API returns errors in a standard structure for both JSON and XML API requests as well as our SDKs. Because different types of errors will share the same HTTP response code, it is strongly recommended to use the type attribute of the returned error object and not the HTTP response code when handling errors.

When the request encounters an error while creating or updating a record, the response will include three additional JSON objects: errors, model_errors, and model_error_keys. The errors object contains user friendly error strings translated into your site's default language. The model_errors object contains the user friendly error strings from the errors object mapped to the parameter that caused the error. The model_error_keys object contains the translation keys used to generate the user friendly entries in model_errors. These keys can be used for language independent error handling logic. For errors which do not have translation keys, the model_error_keys entries will instead contain the English error string.

Each SDK implements exception handling in a native way using these error types. You can catch/rescue individual error types as well as error type families.

Example Responses

Invalid API key

{
   "error":"Unauthorized. The API key or Session token is either missing or invalid.",
   "http-code":401,
   "instance":"a69f6b06-6ba9-4e71-8542-60d2ff3d96f2",
   "title":"Authentication Required",
   "type":"not-authorized/authentication-required"
}

Invalid username or password

{
   "error":"Invalid username or password",
   "http-code":401,
   "instance":"d895ebaa-7e7e-4ced-87c9-2acf743a19c3",
   "title":"Invalid Username Or Password",
   "type":"bad-request/invalid-username-or-password"
}

No read permission for path

{
   "error":"You do not have read permission for this path, file.txt",
   "http-code":403,
   "instance":"37ffdbfb-8faa-4af9-8091-29162f0be67c",
   "title":"Read Permission Required",
   "type":"not-authorized/read-permission-required"
}

Model Save Error

{
  "error": "Error saving model.",
  "http-code": 422,
  "instance": "508503b0-2423-4edc-a46f-77d77ac4a7e3",
  "model_errors": {
    "username": [
      "Username must not contain multiple spaces together",
      "Username must not begin or end with a space"
    ]
  },
  "model_error_keys": {
    "username": [
      "multiple_spaces",
      "leading_trailing_space"
    ]
  },
  "errors": [
    "Username must not contain multiple spaces together",
    "Username must not begin or end with a space"
  ],
  "title": "Model Save Error",
  "type": "processing-failure/model-save-error"
}

Error Types

TypeDescription
bad-requestBad Request
bad-request/agent-upgrade-requiredAgent Upgrade Required
bad-request/attachment-too-largeAttachment Too Large
bad-request/cannot-download-directoryCannot Download Directory
bad-request/cant-move-with-multiple-locationsCant Move With Multiple Locations
bad-request/datetime-parseDatetime Parse
bad-request/destination-sameDestination Same
bad-request/destination-site-mismatchDestination Site Mismatch
bad-request/does-not-support-sortingDoes Not Support Sorting
bad-request/folder-must-not-be-a-fileFolder Must Not Be A File
bad-request/folders-not-allowedFolders Not Allowed
bad-request/internal-general-errorInternal General Error
bad-request/invalid-bodyInvalid Body
bad-request/invalid-cursorInvalid Cursor
bad-request/invalid-cursor-type-for-sortInvalid Cursor Type For Sort
bad-request/invalid-etagsInvalid Etags
bad-request/invalid-filter-alias-combinationInvalid Filter Alias Combination
bad-request/invalid-filter-fieldInvalid Filter Field
bad-request/invalid-filter-paramInvalid Filter Param
bad-request/invalid-filter-param-formatInvalid Filter Param Format
bad-request/invalid-filter-param-valueInvalid Filter Param Value
bad-request/invalid-input-encodingInvalid Input Encoding
bad-request/invalid-interfaceInvalid Interface
bad-request/invalid-oauth-providerInvalid Oauth Provider
bad-request/invalid-pathInvalid Path
bad-request/invalid-return-to-urlInvalid Return To Url
bad-request/invalid-search-queryInvalid Search Query
bad-request/invalid-sort-fieldInvalid Sort Field
bad-request/invalid-sort-filter-combinationInvalid Sort Filter Combination
bad-request/invalid-upload-offsetInvalid Upload Offset
bad-request/invalid-upload-part-gapInvalid Upload Part Gap
bad-request/invalid-upload-part-sizeInvalid Upload Part Size
bad-request/invalid-workspace-id-headerInvalid Workspace Id Header
bad-request/method-not-allowedMethod Not Allowed
bad-request/multiple-sort-params-not-allowedMultiple Sort Params Not Allowed
bad-request/no-valid-input-paramsNo Valid Input Params
bad-request/offset-upload-not-allowed-with-malware-scanningOffset Upload Not Allowed With Malware Scanning
bad-request/part-number-too-largePart Number Too Large
bad-request/path-cannot-have-trailing-whitespacePath Cannot Have Trailing Whitespace
bad-request/reauthentication-needed-fieldsReauthentication Needed Fields
bad-request/request-body-too-largeRequest Body Too Large
bad-request/request-params-contain-invalid-characterRequest Params Contain Invalid Character
bad-request/request-params-invalidRequest Params Invalid
bad-request/request-params-requiredRequest Params Required
bad-request/search-all-on-child-pathSearch All On Child Path
bad-request/unrecognized-sort-indexUnrecognized Sort Index
bad-request/unsupported-currencyUnsupported Currency
bad-request/unsupported-http-response-formatUnsupported Http Response Format
bad-request/unsupported-media-typeUnsupported Media Type
bad-request/user-id-invalidUser Id Invalid
bad-request/user-id-on-user-endpointUser Id On User Endpoint
bad-request/user-requiredUser Required
not-authenticated/additional-authentication-requiredAdditional Authentication Required
not-authenticated/api-key-sessions-not-supportedApi Key Sessions Not Supported
not-authenticated/authentication-requiredAuthentication Required
not-authenticated/bundle-registration-code-failedBundle Registration Code Failed
not-authenticated/files-agent-token-failedFiles Agent Token Failed
not-authenticated/inbox-registration-code-failedInbox Registration Code Failed
not-authenticated/invalid-credentialsInvalid Credentials
not-authenticated/invalid-oauthInvalid Oauth
not-authenticated/invalid-or-expired-codeInvalid Or Expired Code
not-authenticated/invalid-sessionInvalid Session
not-authenticated/invalid-username-or-passwordInvalid Username Or Password
not-authenticated/locked-outLocked Out
not-authenticated/lockout-region-mismatchLockout Region Mismatch
not-authenticated/one-time-password-incorrectOne Time Password Incorrect
not-authenticated/two-factor-authentication-errorTwo Factor Authentication Error
not-authenticated/two-factor-authentication-setup-expiredTwo Factor Authentication Setup Expired
not-authorized/api-key-is-disabledApi Key Is Disabled
not-authorized/api-key-is-path-restrictedApi Key Is Path Restricted
not-authorized/api-key-only-for-desktop-appApi Key Only For Desktop App
not-authorized/api-key-only-for-mobile-appApi Key Only For Mobile App
not-authorized/api-key-only-for-office-integrationApi Key Only For Office Integration
not-authorized/billing-information-hiddenBilling Information Hidden
not-authorized/billing-permission-requiredBilling Permission Required
not-authorized/bundle-maximum-uses-reachedBundle Maximum Uses Reached
not-authorized/bundle-permission-requiredBundle Permission Required
not-authorized/cannot-login-while-using-keyCannot Login While Using Key
not-authorized/cant-act-for-other-userCant Act For Other User
not-authorized/contact-admin-for-password-change-helpContact Admin For Password Change Help
not-authorized/files-agent-failed-authorizationFiles Agent Failed Authorization
not-authorized/folder-admin-or-billing-permission-requiredFolder Admin Or Billing Permission Required
not-authorized/folder-admin-permission-requiredFolder Admin Permission Required
not-authorized/full-permission-requiredFull Permission Required
not-authorized/history-permission-requiredHistory Permission Required
not-authorized/in-app-ai-assistant-unavailableIn App Ai Assistant Unavailable
not-authorized/insufficient-permission-for-paramsInsufficient Permission For Params
not-authorized/insufficient-permission-for-siteInsufficient Permission For Site
not-authorized/mover-access-deniedMover Access Denied
not-authorized/mover-package-requiredMover Package Required
not-authorized/must-authenticate-with-api-keyMust Authenticate With Api Key
not-authorized/need-admin-permission-for-inboxNeed Admin Permission For Inbox
not-authorized/non-admins-must-query-by-folder-or-pathNon Admins Must Query By Folder Or Path
not-authorized/not-allowed-to-create-bundleNot Allowed To Create Bundle
not-authorized/not-enqueuable-syncNot Enqueuable Sync
not-authorized/password-change-not-requiredPassword Change Not Required
not-authorized/password-change-requiredPassword Change Required
not-authorized/payment-method-errorPayment Method Error
not-authorized/preview-only-permission-cannot-downloadPreview Only Permission Cannot Download
not-authorized/read-only-sessionRead Only Session
not-authorized/read-permission-requiredRead Permission Required
not-authorized/reauthentication-failedReauthentication Failed
not-authorized/reauthentication-failed-finalReauthentication Failed Final
not-authorized/reauthentication-needed-actionReauthentication Needed Action
not-authorized/recaptcha-failedRecaptcha Failed
not-authorized/remote-desktop-debug-logging-disabledRemote Desktop Debug Logging Disabled
not-authorized/root-folder-behavior-site-admin-requiredRoot Folder Behavior Site Admin Required
not-authorized/root-folder-behavior-skip-site-admin-requiredRoot Folder Behavior Skip Site Admin Required
not-authorized/self-managed-requiredSelf Managed Required
not-authorized/site-admin-or-partner-admin-permission-requiredSite Admin Or Partner Admin Permission Required
not-authorized/site-admin-or-workspace-admin-or-folder-admin-permission-requiredSite Admin Or Workspace Admin Or Folder Admin Permission Required
not-authorized/site-admin-or-workspace-admin-or-partner-admin-or-folder-admin-permission-requiredSite Admin Or Workspace Admin Or Partner Admin Or Folder Admin Permission Required
not-authorized/site-admin-or-workspace-admin-or-partner-admin-permission-requiredSite Admin Or Workspace Admin Or Partner Admin Permission Required
not-authorized/site-admin-or-workspace-admin-permission-requiredSite Admin Or Workspace Admin Permission Required
not-authorized/site-admin-requiredSite Admin Required
not-authorized/site-files-are-immutableSite Files Are Immutable
not-authorized/two-factor-authentication-requiredTwo Factor Authentication Required
not-authorized/user-id-without-site-adminUser Id Without Site Admin
not-authorized/write-and-bundle-permission-requiredWrite And Bundle Permission Required
not-authorized/write-permission-requiredWrite Permission Required
not-foundNot Found
not-found/api-key-not-foundApi Key Not Found
not-found/bundle-path-not-foundBundle Path Not Found
not-found/bundle-registration-not-foundBundle Registration Not Found
not-found/code-not-foundCode Not Found
not-found/file-not-foundFile Not Found
not-found/file-upload-not-foundFile Upload Not Found
not-found/group-not-foundGroup Not Found
not-found/inbox-not-foundInbox Not Found
not-found/nested-not-foundNested Not Found
not-found/plan-not-foundPlan Not Found
not-found/site-not-foundSite Not Found
not-found/user-not-foundUser Not Found
processing-failureProcessing Failure
processing-failure/agent-push-update-blockedAgent Push Update Blocked
processing-failure/agent-unavailableAgent Unavailable
processing-failure/ai-task-cannot-be-run-manuallyAi Task Cannot Be Run Manually
processing-failure/already-completedAlready Completed
processing-failure/automation-cannot-be-run-manuallyAutomation Cannot Be Run Manually
processing-failure/behavior-not-allowed-on-remote-serverBehavior Not Allowed On Remote Server
processing-failure/buffered-upload-disabled-for-this-destinationBuffered Upload Disabled For This Destination
processing-failure/bundle-only-allows-previewsBundle Only Allows Previews
processing-failure/bundle-operation-requires-subfolderBundle Operation Requires Subfolder
processing-failure/configuration-locked-pathConfiguration Locked Path
processing-failure/could-not-create-parentCould Not Create Parent
processing-failure/destination-existsDestination Exists
processing-failure/destination-folder-limitedDestination Folder Limited
processing-failure/destination-parent-conflictDestination Parent Conflict
processing-failure/destination-parent-does-not-existDestination Parent Does Not Exist
processing-failure/exceeded-runtime-limitExceeded Runtime Limit
processing-failure/expectation-already-has-open-windowExpectation Already Has Open Window
processing-failure/expectation-not-manual-triggerExpectation Not Manual Trigger
processing-failure/expired-private-keyExpired Private Key
processing-failure/expired-public-keyExpired Public Key
processing-failure/export-failureExport Failure
processing-failure/export-not-readyExport Not Ready
processing-failure/failed-to-change-passwordFailed To Change Password
processing-failure/file-lockedFile Locked
processing-failure/file-not-uploadedFile Not Uploaded
processing-failure/file-pending-processingFile Pending Processing
processing-failure/file-processing-errorFile Processing Error
processing-failure/file-too-big-to-decryptFile Too Big To Decrypt
processing-failure/file-too-big-to-encryptFile Too Big To Encrypt
processing-failure/file-uploaded-to-wrong-regionFile Uploaded To Wrong Region
processing-failure/filename-too-longFilename Too Long
processing-failure/folder-lockedFolder Locked
processing-failure/folder-not-emptyFolder Not Empty
processing-failure/history-unavailableHistory Unavailable
processing-failure/invalid-bundle-codeInvalid Bundle Code
processing-failure/invalid-file-typeInvalid File Type
processing-failure/invalid-filenameInvalid Filename
processing-failure/invalid-priority-colorInvalid Priority Color
processing-failure/invalid-rangeInvalid Range
processing-failure/invalid-siteInvalid Site
processing-failure/invalid-zip-fileInvalid Zip File
processing-failure/metadata-not-supported-on-remotesMetadata Not Supported On Remotes
processing-failure/model-save-errorModel Save Error
processing-failure/multiple-processing-errorsMultiple Processing Errors
processing-failure/path-too-longPath Too Long
processing-failure/recipient-already-sharedRecipient Already Shared
processing-failure/remote-server-errorRemote Server Error
processing-failure/resource-belongs-to-parent-siteResource Belongs To Parent Site
processing-failure/resource-lockedResource Locked
processing-failure/subfolder-lockedSubfolder Locked
processing-failure/sync-in-progressSync In Progress
processing-failure/two-factor-authentication-code-already-sentTwo Factor Authentication Code Already Sent
processing-failure/two-factor-authentication-country-blacklistedTwo Factor Authentication Country Blacklisted
processing-failure/two-factor-authentication-general-errorTwo Factor Authentication General Error
processing-failure/two-factor-authentication-method-unsupported-errorTwo Factor Authentication Method Unsupported Error
processing-failure/two-factor-authentication-unsubscribed-recipientTwo Factor Authentication Unsubscribed Recipient
processing-failure/updates-not-allowed-for-remotesUpdates Not Allowed For Remotes
rate-limited/duplicate-share-recipientDuplicate Share Recipient
rate-limited/reauthentication-rate-limitedReauthentication Rate Limited
rate-limited/too-many-concurrent-loginsToo Many Concurrent Logins
rate-limited/too-many-concurrent-requestsToo Many Concurrent Requests
rate-limited/too-many-login-attemptsToo Many Login Attempts
rate-limited/too-many-requestsToo Many Requests
rate-limited/too-many-sharesToo Many Shares
service-unavailable/automations-unavailableAutomations Unavailable
service-unavailable/migration-in-progressMigration In Progress
service-unavailable/site-disabledSite Disabled
service-unavailable/uploads-unavailableUploads Unavailable
site-configuration/account-already-existsAccount Already Exists
site-configuration/account-overdueAccount Overdue
site-configuration/no-account-for-siteNo Account For Site
site-configuration/site-was-removedSite Was Removed
site-configuration/trial-expiredTrial Expired
site-configuration/trial-lockedTrial Locked
site-configuration/user-requests-enabled-requiredUser Requests Enabled Required