Simple File API request
Authentication
All REST File API queries require a valid API key. You can find the API key on the Accounts page in the CSVbox dashboard. Include your API key as anx-csvbox-api-key header on all API queries.
Endpoint
Submits a spreadsheet file.Headers
Request body
Response
200 OK: File submitted.200 OK
Example request
Direct file upload
As an alternative to providing a public file URL, you can upload the file contents directly. Instead ofimport.public_file_url, use the following body parameter.
Request body
Send the file with the
multipart/form-data content type.Example request
cURL
Rate limits
The REST File API supports a limit of 30 requests per minute. This allotment replenishes at a rate of 2 requests per second. Past the limit, the API returns a429 Too Many Requests error.
All REST API responses include the x-csvbox-file-api-call-limit header, which shows how many requests the client has made and the total number allowed per minute.
A 429 response also includes a retry-after header with the number of seconds to wait before retrying your query.
Status and error codes
All API queries return HTTP status codes that tell you more about the response.401 Unauthorized
The client doesn’t have the correct authentication credentials.402 Import Limit Reached
The monthly import limit for the account plan is reached. Upgrade the plan to increase the import limit.403 Forbidden
The server is refusing to respond. This is typically caused by the File API being disabled.404 Not Found
The referenced sheet was not found.422 Unprocessable File
The request body contains file errors. Typical causes are an incorrect file path, invalid file permissions, an incorrect file format, a corrupt file, or a file size that’s too large.429 Too Many Requests
The client has exceeded the rate limit.5xx errors
An internal error occurred in CSVbox. Report such errors to our team.Options
The following additional configuration options are available with the File API.max_rows
- Type: Integer
- Default: Null
- Description: The maximum number of rows to import.
has_header
- Type: Boolean
- Default:
0 - Description: Specify whether the file contains a header row. Acceptable values are
0(no header) and1(has a header row).
auto_map
- Type: Boolean
- Default:
false - Description: Enable automatic column mapping in cases where an exact match is not found.

