/v1/filesUpload a file
Uploads a file for use through the Files API. Send the file as multipart form data and optionally set expires_in_seconds to control how long its bytes remain available. The response includes file metadata and the expiration time when one is set.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Multipart form data containing the file to upload and optional expiration settings.
A 400 is returned for an invalid argument; a 401 for invalid authentication in the x-api-key header; a 403 when the caller lacks permission; a 404 when a requested entity is not found; a 408 when the deadline expires; and a 409 when a concurrency issue aborts the operation. A 412 is returned when a precondition is not met; a 413 when the operation exceeds a valid range; a 429 when a resource is exhausted; a 431 when request metadata is too large; a 499 when the client cancels the operation; a 500 for an internal error; a 501 when the operation is unsupported; a 503 when the service is unavailable; a 504 when an upstream service times out; and a 529 when the service is overloaded. The file form field is required, and expires_in_seconds must be between 3600 and 7776000 seconds.