Upload a file
1 min
POST
https://api.optimizely.com/flags/v1//projects/{project_id}/files
project_idintegerThe project identifier
file_typestring<p>Restricts which file formats are accepted. When <code>test_plan</code>, only document formats (pdf, doc, docx, md) are allowed. When <code>variation_image</code>, only image formats (png, jpg, jpeg, gif, svg) are allowed. Omitting this parameter accepts all supported types.</p>
acceptstringGenerated from available response content types
filestring<binary><p>The file to upload. Allowed types depend on <code>file_type</code>: documents (pdf, doc, docx, md, max 10 MB) or images (png, jpg, jpeg, gif, svg, max 5 MB).</p>
201File uploaded successfully
400Malformed requests and invalid parameter names and types
401Invalid credentials
403Do not have permission to perform the operation
curl --request POST \
--url https://api.optimizely.com/flags/v1//projects/{project_id}/files \
--header 'accept: application/json' \
--header 'content-type: multipart/form-data' \
--form 'file=@"/path/to/file"'