إنشاء مجلد
files:writeينشئ مجلداً.
بارامترات المسار
project_idstringمطلوبالمعرّف الثابت للمشروع، أو الـ slug الخاص به.
جسم الطلب
namestringمطلوبdescriptionstring | nullparent_folder_idinteger | nullالمجلد الأب. اتركه لإنشائه في جذر المشروع.
مثال الطلب
curl -X POST "https://app.fareeqy.com/api/v1/projects/prj-8f3kd/folders" \
-H "Authorization: Bearer $FAREEQY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"التصاميم","description":"ملفات الهوية وواجهات الموقع.","parent_folder_id":null}'مثال الاستجابة
{
"data": {
"id": 42,
"url": "https://app.fareeqy.com/projects/prj-8f3kd/files?folder_id=42",
"name": "التصاميم",
"path": "التصاميم",
"description": "ملفات الهوية وواجهات الموقع.",
"parent_folder_id": null,
"created_at": "2026-07-05T08:20:00.000+03:00"
}
}حالات الرفض:401403404409422429اعرض أمثلة الرفضأخفِ أمثلة الرفض
defaultMissing or invalid API key.
{
"error": {
"code": "unauthorized",
"message": "مفتاح الـ API غير صالح أو غير مُرسَل."
}
}forbiddenTwo different refusals share this status, and a client must tell them apart by error.code. forbidden means the key's scope or allowlist does not permit this operation, or Pundit denied the action. plan_upgrade_required means the company's plan carries no API access at all, so no key on it can ever succeed and there is nothing to retry.
{
"error": {
"code": "forbidden",
"message": "هذا الـ API key لا يملك صلاحية تنفيذ هذه العملية."
}
}{
"error": {
"code": "plan_upgrade_required",
"message": "خطة «الاحترافي» لا تشمل الوصول إلى API. رقِّ إلى «المتطور» أو «الإنتاجي» لتفعيله."
}
}not_foundResource not found or not accessible — also returned for EVERY endpoint when the company's rest_api feature flag is disabled (the surface is hidden). Lookups drill through the URL hierarchy, so another company's record is a 404 and never a leak. A path that matches no route at all answers 404 with the distinct code unknown_endpoint and echoes the path back, so a mistyped or half-built URL is told apart from a record that is missing or out of reach.
{
"error": {
"code": "not_found",
"message": "غير موجود، أو لا تملك صلاحية الوصول إليه."
}
}{
"error": {
"code": "unknown_endpoint",
"message": "لا يوجد endpoint يطابق GET /api/v1/projcts. راجع المسار في توثيق الـ API."
}
}defaultA uniqueness/record conflict; retry.
{
"error": {
"code": "conflict",
"message": "تعذّر إتمام العملية بسبب تعارض. أعد المحاولة."
}
}defaultA caller-fixable bad request (validation error, bad date, bad enum).
{
"error": {
"code": "unprocessable_entity",
"message": "قيمة due_at غير صالحة؛ أرسل تاريخاً مثل 2026-07-20. المهمة تُستحق في يوم، وأي وقت ترسله يُهمل."
}
}rate_limit_exceededEither the company's daily API allowance is spent (rate_limit_exceeded), or the per-key / per-IP burst throttle of 300 requests per minute fired. Both come back after a wait, so Retry-After is honest here. The two bodies are not the same shape. The daily-quota refusal uses the standard error envelope. The burst throttle is served by Rack::Attack ahead of the application, so its body is a flat {"error": "<string>"} with no code. A client that reads error.code has to tolerate error being a plain string.
{
"error": {
"code": "rate_limit_exceeded",
"message": "استهلكت رصيد اليوم من طلبات API في خطة «المتطور» (1000 طلب يوميًا). يتجدد الرصيد عند منتصف الليل بتوقيت Asia/Riyadh."
}
}{
"error": "Rate limit exceeded. Please try again later."
}