Upload File

 

Uploads a file to Kintone.
Method POST
URL https://{subdomain}.kintone.com/k/v1/file.json
Authentication API Token Authentication , Password Authentication
Content-Type multipart/form-data

 

When a file is uploaded, it produces a fileKey.
Note that although this API uploads a file to Kintone, it does not upload the file to an Attachment field of an App.
To upload the file to an Attachment field, the fileKey is used with the Add Record or Update Record API.

Permissions

No record related permissions are needed, as this API does not directly attach a file to an App.

Request Parameters

Request format

The request is sent in a multipart/form-data format. Please look through RFC1867 and RFC2388 for more details.
Within the Content-Disposition header, specify "file" for the name parameter and the name of the file for the filename parameter.

Sample Request

JavaScript

curl Sample

Sample Response

The fileKey of the uploaded file will be returned.
Use this fileKey with the Add Record or Update Record API to attach it to an Attachment field of an app.

Attaching the file to an attachment field

Use the Add Record or Update Record API, and set the value of the fileKey as the fileKey obtained from the Upload File API, as shown in the example body below.

 

Limitations

Only 1 file can be uploaded at a time.
After the file is uploaded onto Kintone, the file will be deleted after 3 days if the Add Record or Update Record API is not used.
For other limitations, check the Kintone REST API Limitations.

Was this article helpful?
0 out of 0 found this helpful
Do you have any questions or issues related to this article?
Please share your views with us in the Community forums!