Upload a file from inline content
Uploads a file from inline content (UTF-8 text) OR content_base64 (binary, standard base64, no line breaks) — exactly one, not both. Capped at 5 MB decoded. A freshly uploaded file is pending (not downloadable) until the virus scan clears it. Requires operation files:write.
content and the file name have to agree. The name is a claim about what the bytes are, so content is accepted only for a plain-text extension — documents (md, txt, rst, tex), data and config (csv, json, yml, xml, toml, ini, conf, env), markup and styles (html, svg, css, scss), source (js, ts, rb, py, sh, sql, graphql) and the rest of that kind — or a name with no extension at all. A .pdf name is the one exception: the content is read as markdown and rendered into a real PDF document, capped at 256 KB of markdown because the render holds a request thread for its whole duration. Any other extension is refused with a 422 rather than stored, because text under a container extension such as .docx produces a file no viewer can open. Send genuine bytes as content_base64 instead.
Request
- Base URL: https://app.fareeqy.com/api/v1
- URL: https://app.fareeqy.com/api/v1/projects/{project_id}/files
- Auth: HTTP bearer
Request body
Response
The uploaded file.
Example response
{
"data": {
"id": 108,
"url": "https://app.fareeqy.com/files/fil-3qd8n",
"name": "الهوية-البصرية.pdf",
"path": "التصاميم/الهوية-البصرية.pdf",
"folder_id": 42,
"content_type": "application/pdf",
"size_bytes": 2418176,
"size_human": "2.31 م.بايت",
"external_url": null,
"source": null,
"scan_state": "clean",
"downloadable": true,
"uploaded_by": "سارة العتيبي",
"created_at": "2026-07-10T16:31:44.000+03:00"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.